[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] trees
From: |
Michael Lachmann |
Subject: |
Re: [Texmacs-dev] trees |
Date: |
Tue, 2 Oct 2012 20:52:00 +0200 |
On 2 October 2012 18:29, Massimiliano Gubinelli <address@hidden> wrote:
> 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).
>
I agree. I'll try to do it with select on nf-chunks. I'd still ike to
know if it is possible...
And, I'd like to know if it is possible to select all nf-chunks which
have a certain name with a "select" command.
Thanks!
Michael