Hi, On 2 oct. 2012, at 17:47, Michael Lachmann wrote:
>>> >>> However, you have the choice of redefining your nf-chunk macro to set an >>> environment variable (say, "current-nf-chunk" to the value you want, then >>> read that variable at any point in your document to decide where you are. >>> >> >> Oh, yes - that is much better! > > I tried to implement that, but the environment variable (which I read > with (get-env ..., and set with <assign|, and defined with <new-env| ) > ) > is set to the name of the nf-chunk only within that chunk, whereas I'd > like to set a variable that will have > that value in the chunk, or after the chunk, until we hit the next > chunk. Is that possible? > this seems to me a bad idea (even if possible). I think that if you need that capability for editing then it should be implemented by looking at the document tree and finding the previous instance of the macro. If the capability is needed for the document maybe you can use the label mechanism, since iirc when you redefine a label it take the last value so that when you use reference it will update it correctly (maybe). Max > Thanks! > Michael > > _______________________________________________ > Texmacs-dev mailing list > Texmacs-dev@gnu.org > https://lists.gnu.org/mailman/listinfo/texmacs-dev _______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev