[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] New special env variable: path to self

From: Henri Lesourd
Subject: Re: [Texmacs-dev] New special env variable: path to self
Date: Thu, 23 Nov 2006 22:36:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Lionel Elie Mamane wrote:

These are not the Scheme unquote and eval, but strees (thus TeXmacs

documents) whose label is unquote and eval. It didn't seem too far
fetched that the TeXmacs macro-expander unquote would turn the result
of <quote-arg|x> in the result of <arg|x>, or that an extra round of
evaluation would do that.

That is a good idea, in effect. It seems that the language
for the macro-expander is not fully complete, yet.

instead, but this breaks interactive editing: e.g. typing '^' in math
mode doesn't make a superscript anymore, but a '^' character.
This happens only if you edit the parameter in the version of
the macro without <quote-arg|...> (for some reason I don't fully
understand, to be honest...).

As far as I can test, even with quote-arg, it happens if you return
your parameter, or anything based on your parameter.

That's right, if you **return** something, this is
different, and you cannot prevent the evaluation
of your output.

The thing in practice, for nested macros, is that if
your output becomes the input of another macro
call that uses <quote-arg|...>, **then** it should
not be evaluated (hopefully...).

I tried all combinations of

interactive edit is broken with all of these 8 things.

No, it is not broken with my macro <self-path|...>, but it is with
the other one (i.e. <self-path-buggy|...>). And my macro <self-path|...>
falls into one of your 8 categories.

If you want to call the macro-expander from inside Scheme,
use (texmacs-exec x). For example, you could try :
(tree->stree (texmacs-exec '(underline "abcde")))

Ah, it is called texmacs-exec. Thanks.

Yes, this one is also quite useful for performing
the reverse operation.

Best, Henri

reply via email to

[Prev in Thread] Current Thread [Next in Thread]