GNU TeXmacsUser manualReferenceAboutEnglishยทDeutsch
Miscellaneous features

Several other features are supported in order to write interfaces between TeXmacs and extern applications. Some of these are very hairy or quite specific. Let us briefly describe a few miscellaneous features:

Interrupts

The “stop” icon (or the Interrupt execution entry of the session menus) can be used in order to interrupt the evaluation of some input. When pressing this button, TeXmacs will just send a SIGINT signal to the process group of your application (this is not implemented under Windows). It expects your application to finish the output as usual. In particular, you should close all open DATA_BEGIN-blocks.

The Close session entry terminates the application by sending SIGTERM to its process group, followed by SIGKILL two seconds later.

Testing whether the input is complete

Some systems start a multiline input mode as soon as you start to define a function or when you enter an opening bracket without a matching closing bracket. TeXmacs allows your application to implement a special predicate for testing whether the input is complete. First of all, this requires you to specify the configuration option

(:test-input-done #t)

As soon as you will press ↩ in your input, TeXmacs will then send the command

DATA_COMMAND(input-done? input-string)↩

Your application should reply with a message of the form

DATA_BEGINscheme:doneDATA_END

where done is either #t or #f. The input-string is a quoted Scheme string, obtained by serializing the input with the serializer of the plug-in (without the final newline), and the command is sent using the same mechanism as tab-completion requests (so that it can be customized using the :commander option). The multiline plug-in provides an example of this mechanism (see in particular the file multiline/src/multiline.cpp).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".