[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: |
Lionel Elie Mamane |
Subject: |
Re: [Texmacs-dev] New special env variable: path to self |
Date: |
Thu, 23 Nov 2006 17:41:52 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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:
parm
(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:
<assign|self-path|<macro|x|<extern|my-scheme-macro|<quote-arg|x>|x>>>
Do you have a better solution?
Thanks for all your help,
--
Lionel
- Re: [Texmacs-dev] New special env variable: path to self, Lionel Elie Mamane, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Henri Lesourd, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self,
Lionel Elie Mamane <=
- Re: [Texmacs-dev] New special env variable: path to self, Henri Lesourd, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Lionel Elie Mamane, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Henri Lesourd, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Lionel Elie Mamane, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Henri Lesourd, 2006/11/24
- Re: [Texmacs-dev] New special env variable: path to self, Henri Lesourd, 2006/11/24
Re: [Texmacs-dev] New special env variable: path to self, Lionel Elie Mamane, 2006/11/24