mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] TeXmacs server


Chronological Thread 
  • From: Karl Hegbloom <address@hidden>
  • To: Philippe Joyez <address@hidden>, address@hidden
  • Subject: Re: [TeXmacs] TeXmacs server
  • Date: Mon, 29 May 2017 18:45:10 +0000

I agree that that's a really good idea. I use emacsclient all the time, even setting it as the EDITOR variable. This would make an excellent summer of code project.

In terms of its (simple) architecture I suggest using a shell script or a Guile script that processes command-line arguments and then connects to a server handler listening inside texmacs, which opens the file, falling back on launching texmacs if it's not already running. Perhaps like emacsclient it could also be able to execute some scheme code or call on a scheme function.

In terms of using texmacs  as sort of a web server, it would not be very difficult to call on scheme function to translate electric string into texmacs and Export that as a PNG and so forth.


On Mon, May 29, 2017, 07:46 Philippe Joyez <address@hidden> wrote:
>The question: is there a way to communicate with a running TeXmacs
>to ask it to open the file xdg-open sends?

xdg-open opens the file just like double-clicking on it would; it does not
"send" anything.
If you want to communicate with an already running instance of texmacs you'll
need to use "sockets" and setup texmacs so that it accepts the communication.
This will require some scripting in both applications. You may find a working
example of such socket communication in https://github.com/slowphil/zotexmacs
(look in /src/content/zotexmacsbrowserOverlay.js and in "place in my-init-
texmacs.scm")

Best,
Philippe
--



Archive powered by MHonArc 2.6.19.

Top of page