![](https://secure.gravatar.com/avatar/95b5a1ad800a34624a9394503f8d40fc.jpg?s=120&d=mm&r=g)
Hi Hans,
(no patch nor example of usage attached) *sigh*, attaching files is always hard :-)
Anyway, I've attached it now, together with an exapmle prettyprinter that uses it. I've also slightly changed the patch since my last message. Now, begin_of_buffer and end_of_buffer are always called, even for single line \type's. I found that I had to do all kinds of magic to make things work for \type as well, so this seems cleaner. To be able to differentiate, the type of buffer ('single', 'buffer' or 'file') and the name of the buffer/file gets passed to begin/end_of_buffer, though my example prettyprinter does not use these yet. Before, \type directly called hooks.flush_line. I've added buffers.typesingle to be called instead, which calls begin_of_line, flush_line and end_of_line. To prevent confusing with \type, I've renamed buffers.type to buffers.typebuffer. Finally, I've added some comments to the hooks.* functions, to document when they are called. Is there any place where lua pretty printers are documented? The wiki seems to say only "wait for lua", but not how to use them. If there isn't, I'll try to put something useful on the wiki. Gr. Matthijs