Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Re: extern-exec and "further customization"

Subject: mailing-list for TeXmacs Users

List archive

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


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: Lionel Elie Mamane <address@hidden>
  • Cc: Joris van der Hoeven <address@hidden>, address@hidden, address@hidden
  • Subject: Re: [TeXmacs] Re: extern-exec and "further customization"
  • Date: Tue, 07 Feb 2006 22:33:05 +0100



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


You can already do this without changing
anything in the standard components
of TeXmacs (but this remains somehow
a hack) ; write a new plugin (let's
call it "foo", to define things clearly),
and in the plugin "foo", do :
<<
(define (foo-plugin-eval name session t)
(display* "foo-plugin-eval=" name "; session=" session "; t=" t "\n")
(if (equal? name "foo")
(begin
... the stuff for the foo plugin ...
)
; Default case
(plugin-eval0 name session t))
)
(define plugin-eval0 plugin-eval)
(set! plugin-eval foo-plugin-eval)))
>>

This way, (foo-plugin-eval) behaves as a
stub for the real (plugin-eval0) that uses
the socket, and you can preprocess/postprocess
the input & the output exactly the way you
want.

Is that what you wanted, or are there some
missing things ?

Best, Henri




Archive powered by MHonArc 2.6.19.

Top of Page