Skip to Content.
Sympa Menu

texmacs-users - Re: Strange bug with <with> and <indent>

Subject: mailing-list for TeXmacs Users

List archive

Re: Strange bug with <with> and <indent>


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: Strange bug with <with> and <indent>
  • Date: Wed, 3 Oct 2001 01:41:57 +0200 (MET DST)


On Wed, 3 Oct 2001, David Allouche wrote:

> Hello to all (?) structured typesetting junkies out there. I have found a
> strange bug you may find preoccuping. Other, sane people, do not need to
> worry about this bug, they will never run into it.
>
> To reproduce it follow the steps. You can just copy-paste the macro
> definitions in the TeXmacs buffer, they are in TeXmacs native document
> format.
>
> 1. Define a macro wich puts its argument in a <with> block that locally
> define another macro
> <assign|miw|<macro|x|<indent|<with|m2|<macro|y|<arg|y>>|<arg|x>>>>>
>
> 2. Now apply miw, inside it, apply m2.
> \ m i w RET \ m 2 RET
> Strangely the m2 macro is not evaluated.

I found out what goes wrong.

The \ instruction is very hybrid: on activation, it may yield
a value, a macro expansion, a function application or
do something else, like executing a LaTeX command.
What happened is that \ failed to recognize that
at the context you were working, m2 was a macro with one argument.
You may take a look at the routine edit_dynamic_rep::activate
in Edit/Modify/edit_dynamic.gen.cc in order to correct this bug.

What *does* work is the macro expansion itself: instead of
\ m 2 RET
type
E-i e m 2 TAB something RET
and the expansion of 'something' is fine.

-Joris-




Archive powered by MHonArc 2.6.19.

Top of Page