texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] rewrite-inactive


From: Sam Liddicott
Subject: Re: [Texmacs-dev] rewrite-inactive
Date: Fri, 25 May 2012 12:24:26 +0100

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 <address@hidden> 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 <address@hidden> wrote:
Does anyone have an example of rewrite-inactive called from a texmacs document which doesn't result in: "invalid rewrite-inactive" ?


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



reply via email to

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