- From: Joris van der Hoeven <address@hidden>
- To: address@hidden
- Cc: Lionel Elie Mamane <address@hidden>
- Subject: Re: [TeXmacs] extern-exec and "further customization"
- Date: Fri, 3 Feb 2006 12:02:58 +0100
On Fri, Feb 03, 2006 at 12:34:09AM +0100, Lionel Elie Mamane wrote:
>
>> Yes, this seems to do it. Thanks. TeXmacs doesn't seem to like the
>
>> second thing I tried, though... It doesn't appreciate plugin foo
>
>> telling it
>
>> DATA_BEGIN command:(plugin-eval "foo" "default" "bar") DATA_END
>
>> it seems to go into an infinite loop of issuing bar to plugin foo.
>
>
> That is not surprising, since your plug-in seems to ask TeXmacs to
>
> ask the *same* plug-in for executing some command, all over the
>
> *same* pipe.
>
>
Yes, exactly :) I'm not surprised it doesn't work, but I don't see why
>
it cannot work.
Because you use the same connection state variables for
two different executions: the outer and the inner one.
>
> This is not reasonable: your plug-in might directly execute the command
>
> instead of passing through TeXmacs.
>
>
This supposes that the command does not depend on the TeXmacs state. I
>
was hoping to get information about the TeXmacs state in this
>
way. Something like:
>
>
DATA_BEGIN command:(plugin-eval "foo" "default" (string-append "callback:
>
pos foo " (object->string (position-get foo)))) DATA_END
I agree that we might want to send some information back on
DATA_BEGIN command: ... DATA_END
You may try to hack the TeXmacs source code so as to send
DATA_BEGIN return: ... DATA_END
back to your plug-in when the command evaluates to a non-void result.
If done correctly, I will include such a hack in the main distribution.
Best wishes, Joris
Archive powered by MHonArc 2.6.19.