[Top][All Lists]

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

[Texmacs-dev] Re: [TeXmacs] Re: extern-exec and "further customization"

From: Lionel Elie Mamane
Subject: [Texmacs-dev] Re: [TeXmacs] Re: extern-exec and "further customization"
Date: Mon, 6 Feb 2006 19:17:37 +0100
User-agent: Mutt/1.5.11

On Mon, Feb 06, 2006 at 06:20:38PM +0100, Joris van der Hoeven wrote:
> On Mon, Feb 06, 2006 at 04:59:30PM +0100, Lionel Elie Mamane wrote:
>>> 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.

>> What about adding a level of indirection in the communication between
>> "session" and the plug-in? What I mean is:

>>  - When the user types a command for the plug-in in a session, instead
>>    of sending what he typed, call a scheme procedure with arguments:

>>    * the string the user typed
>>    * the port used to talk to the child process

> It is already possible to associate a rewriting function to each
> type of plug-in, which is probably close to what you want.  This is
> for instance used for mathematical input.

Aha, I'll study how the existing plug-ins do mathematical input then,
to see whether I can bow this to my needs.

>>  - Something adequate for the other direction (communication from the
>>    child process to TeXmacs).

>>    For example:
>>    - A plug-in can install a handler "foo" for
>>      DATA_BEGIN "foo: " data DATA_END
>>      that will get data passed as an argument.

> What would this extension be useful for?
> Why not simply send a scheme command like

>       DATA_BEGIN command: (my-foo-cmd "data") DATA_END

Ah yes, that's true.

> By the way, all this does not really answer your original question.

Well... the "rewrite the TeXmacs -> child process" part cleanly
subsumes the reasons I was trying to have the plug-in tell TeXmacs
"please make myself execute this command". The additional info I
wanted to get from TeXmacs in this way (get the command the user
typed, answer "give me this info" and then give a result) can also be
given in the first place with the initial request (get the command the
user typed _and_ the information) with the rewriting.


reply via email to

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