Am 06.03.2014 um 16:04 schrieb Rik Kabel <cont...@rik.users.panix.com>:
> Could you please ensure that this handles text in buffers the same way that > it handles other strings? I noticed that this is handled a bit differently, > as the following shows,but perhaps it is my clumsy coding. The buffer result > is closer to what I expect in terms of internal whitespace, but still does > not show expected trimming of leading and trailing whitespace. That trimming, > of course, is the point of the exercise. This can’t work because \getbuffer is a unexpandable command and what you pass to Lua is the string \getbuffer[testbuffer] and not the content of the buffer. When you want to manipulate the content of a buffer you have to access the content at the Lua side with the buffers.getcontent(…) function. BTW: You don’t need \long in MkIV because definitions use it by default. Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________