[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 18:14:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Lionel Elie Mamane wrote:

On Thu, Nov 23, 2006 at 03:10:19PM +0100, Henri Lesourd wrote:

Have a look at the attached .tm file, and tell me if you can
still trick it the way you did in the examples of your previous
mail (i.e., try to interactively change the parameter of
the two instances of the <self-path*|...> macros in the
document). I guess that as far as the <self-path|...> macro
is concerned, you can't trick it anymore, now ;-).

It does have the disadvantage of variable capture, namely the "x" is
hardcoded in the Scheme function. I tried to return:

(list 'unquote parm)
(list 'eval parm)

instead, but this breaks interactive editing: e.g. typing '^' in math
mode doesn't make a superscript anymore, but a '^' character. The best
I could find is:

(tm-define (my-scheme-macro parm perm)
  (:type (tree -> tree))
  (:secure #t)
  (with path (tree->path parm)
     (display* "\nparm(" path ")\n"))
  `(arg ,perm))

and call with:


Do you have a better solution?

To my knowledge, this doesn't work, it would require some
sharing the datastructures/communication for the environments
between Scheme and the TeXmacs macro expander.

This is currently not implemented at all, as far as I know.

Best, Henri

reply via email to

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