Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Re: Reporting bugs in TeXmacs

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Re: Reporting bugs in TeXmacs


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: Lionel Elie Mamane <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] Re: Reporting bugs in TeXmacs
  • Date: Tue, 08 Aug 2006 00:21:38 +0200

Lionel Elie Mamane wrote:

I'm listening. Where is that documented? grepping for "socket"
case-insensitively in a fresh CVS HEAD checkout of the documentation
finds only a changelog entry:

<item>Support for connections by sockets (1.0.2.1).

but no further documentation on how this works.


[...] so a clean way to
send s-expressions (only) interests me.


OK, here is my simple (and even simplest I hope)
implementation of a TeXmacs plugin for speaking
to a basic Scheme server by means of exchanging
only s-expressions on a Scheme socket.

The files are :

1. server.scm, which is a library for implementing
straightforward socket I/O at the Scheme level
directly (this is why you saw nothing about
this in the TeXmacs documentation per se).

This library is very short (102 lines) and
completely self-contained (modulo the use
of standard SRFI Scheme functions), and
this is done on purpose, in order to
allow people to read it and understand
everything ;

2. server1.scm : a simple example of a server
implemented by means of the library ;

3. sse.scm : the client-side part of the
application : it is made by means of
redefining a keyboard shortcut in the
context of a particular tag (i.e. <sse-document|...>,
which is defined in the stylesheet associated with
the plugin), and by implementing the Scheme function
(send-chink) for extracting a chunk of markup around
the cursor pos & send it to the server ;

Please note the <use-module|sse> in sse.ts : this
is for disabling lazy loading of the Scheme code
for the module sse (this way, the things defined
in the module [i.e. : the keyboard shortcuts] become
active immediately, not 30 seconds after the loading
of the document).

Everything about installing & trying this example
plugin is explained in the README file contained
in the tarball joined as an attachment to this
email.


Best, Henri

P.S. : I plan to post a little bit more explanations
about how to do Scheme programming with markup trees
in TeXmacs in some time from now, but any questions
related to this example server are welcomed in
between (as well as later), anyway.

Attachment: sse.tar
Description: Unix tar archive




Archive powered by MHonArc 2.6.19.

Top of Page