Changes

Jump to navigation Jump to search
64 bytes removed ,  07:35, 17 July 2023
remove dead mailing list link
== Accessing buffer names ==
From the [https://mailman.ntg.nl/pipermail/ntg-context/2019/093692.html mailing list]:
It's not easy to access buffer names from ConTeXt because ConTeXt stores the buffers in a local variable <code>cache</code> which is an upvalue for all the other functions. However, you can use the Lua <code>debug</code> library to access upvalues. The <code>buffers.erase</code> function only has a single upvalue which is <code>cache</code>, making it easy to extract all the buffer names from that. However, you can't get them in the order of declaration because <code>cache</code> is a hashmap and not an array. Moreover, ConTeXt is usually in sandboxing mode. To get access to the `debug` library you have to run ConTeXt with:

Navigation menu