I can't manage to insert an inactive* like this:

<assign|sa2|<macro|x|<inactive*|<arg|x>>>>

And I'm still working out how to strip the inactive* when it exists in the
main tree enclosing the macro argument, but it looks like it is no longer
there but already taken effect.

By hacky take-to-pieces macros like this:
<assign|showme|<macro|x|[<get-label|<arg|x>>(<length|<arg|x>>)=<arg|x>]>>

<assign|sa|<\xmacro|x>

<assign|z|<look-up|<quasi|<tuple|<unquote*|<quote-arg|x>>>>|0>><showme|<look-up|<value|z>|0>><assign|zz|<look-up|<value|z>|2>>[<showme|<look-up|<value|zz>|1>>]<assign|zzz|<look-up|<value|zz>|1>>

  <showme|<look-up|<value|zzz>|1>>
</xmacro>>

I can confirm that:
<sa|<unquote*|...
passes the already re-written tree.

Maybe I can temporarily re-define inline-tag and such like so that it can
be recovered.

darn: <with|inline-tag|<value|identity>|... caused CPU to reach 100%

Sam

On Fri, May 25, 2012 at 12:24 PM, Sam Liddicott <[email protected]> wrote:

> Well... I leaned enough to do:
>
> <with|mode|<quote|src>... and then crash texmacs again
> ./Edit/Interface/edit_interface.cpp:35: string MODE_LANGUAGE(string):
> Assertion `false' failed.
>
>
> I got to that because this:
>
> <sa|<inactive*|<assign|ll|<macro|x|<with|ornament-color|#eeeeee|ornament-sunny-color|#000000|ornament-shadow-color|#000000|ornament-borderx|2l|ornament-hpadding|2ex|ornament-vpadding|2ex|<ornament|<surround||<htab|0spc>|<indent-both|1cm|1cm|<arg|x>>>>>>>>>
>
> when sa is defined as:
>
> <assign|sa|<macro|x|<quasiquote|<compound|<merge|get-label|>|<unquote*|<arg|x>>>>>>
>
> emits:
> <compound|get-label|mode|<quote|src>|<assign|ll|<macro...
>
> So I presume that <unquote* must be <with|mode|<quote|src>|...
>
> What I'm trying to define is a macro which takes an argument and renders
> it in source view AND evaluates it.
>
> Sam
>
>
> On Fri, May 25, 2012 at 9:20 AM, Sam Liddicott <[email protected]> wrote:
>
>> It's failing for me because (!is_func (t[0], ARG)) is failing in
>> env_exec.cpp
>>
>> I don't understand what is_func is doing:
>>
>> inline bool is_func (tree t, tree_label l) { return (t.rep->op==l) &&
>> (N(t)!=0); }
>>
>> it seems to mean that ...
>> and the first argument to rewrite-inactive has to have children
>>
>> But is suggests a relationship between the first argument, and ARG
>> (whatever ARG is)
>>
>>
>> On Fri, May 25, 2012 at 8:46 AM, Sam Liddicott <[email protected]> wrote:
>>
>>> Does anyone have an example of rewrite-inactive called from a texmacs
>>> document which doesn't result in: "invalid rewrite-inactive" ?
>>>
>>> It is mentioned here:
>>> http://www.texmacs.org/tmweb/manual/webman-styling.en.html
>>>
>>> These all fail
>>>
>>> <rewrite-inactive|<length|<tuple|1|2|3>>|once>
>>>
>>> <assign|t|once><rewrite-inactive|<length|<tuple|1|2|3>>|<value|t>>
>>>
>>> <assign|t|once><rewrite-inactive|<length|<tuple|1|2|3>>|t>
>>>
>>> Thanks
>>>
>>> Sam
>>>
>>
>>
>
_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to