Dear list,

As the subject line states, I am looking for a means of retrieving a table of all saved buffer names from lua. A MNWE would looks like:

\starttext
\startbuffer[ex1]
Buffer 1
\stopbuffer
\startbuffer[ex2]
Buffer 2
\stopbuffer
% Should return {ex1, ex2} or similar
\ctxlua{context(...)}
\stoptext

The underlying idea is to store a large number of example problems in individual buffers that could be retrieved either by specific name or as a complete list. I'm having a problem with the latter as it seems like all the lua buffer commands I've encountered assume that buffer names are known in advance:

buffers.getcontent(b)
buffers.raw(b)
buffers.getlines(b)
buffers.erase(b)
buffers.assign(b, text, catcodes)
buffers.append(b, text)
buffers.exists(b)
buffers.collectcontent(names, seperator)

Thanks,

Stan



___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to