Subject: mailing-list for TeXmacs Users
List archive
From : "Adrian S." <address@hidden>- To: address@hidden
- Subject: [TeXmacs] Multiline-plugin
- Date: Mon, 5 Mar 2012 16:48:31 -0600
- Authentication-results: mr.google.com; spf=pass (google.com: domain of address@hidden designates 10.216.131.232 as permitted sender) smtp.mail=address@hidden; dkim=pass header.i=address@hidden
I attach a modified file of the file multiline.cpp with slightly
modified the headers so that it will compile (it did not before).
Simply replace the file that is inside of
TeXmacs/examples/plugins/multiline/src with what I attach. Then
simply run make in TeXmacs/examples/plugins/multiline.
You can add the multiline plugin then by simply copying the directory
multiline directory inside of your .TeXmacs/plugins directory so that
TeXmacs recognizes it. I am afraid that this change in the header
files is needed for many of the example plugins.
----------------------------------Possible
bug-------------------------------------------
I ran it using the tools->debug and in debug I enabled the io.
However, it seems that TeXmacs is not sending
\020(input-done? "what the user wrote;")
Here \020 means DATA_COMMAND, which is chr(16).
I ran the program emulating the part that TeXmacs did via emacs and
using ctrl-q ctrl-p to quote a ctrl-p in emacs shell mode. It seemed
to work fine.
which the program is expecting to be waiting for.
Can anybody confirm or hint me at a way to check if TeXmacs is indeed
sending the \020(input-done? "what the user wrote;") ?
I tracked down in the source and I saw the file plugin-cmd.scm where
the command default-format-command is defined, but would not find a
way to tell if this is used elsewhere.
Peace to all, and it was great to be there.
-Adrián.
/****************************************************************************** * MODULE : multiline.cpp * DESCRIPTION: A plugin which uses multiline input as long as * the input is not terminated by ';' * COPYRIGHT : (C) 2003 Joris van der Hoeven ******************************************************************************* * This software falls under the GNU general public license version 3 or later. * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>. ******************************************************************************/ #include <stdio.h> #include <iostream> #include <string.h> using namespace std; #define DATA_BEGIN ((char) 2)/* ctrl-b*/ #define DATA_END ((char) 5)/* ctrl-e*/ #define DATA_COMMAND ((char) 16)/* ctrl-p*/ #define DATA_ESCAPE ((char) 27) int main () { cout << DATA_BEGIN << "verbatim:"; cout << "Terminate your input by ';'"; cout << DATA_END; fflush (stdout); while (true) { char buffer[100]; cin.getline (buffer, 100, '\n'); if (buffer[0] != DATA_COMMAND) { cout << DATA_BEGIN << "verbatim:" << buffer; cout << DATA_END; } else { int n = strlen (buffer); cout << DATA_BEGIN << "scheme:"; if (buffer[n-3] == ';') {cout << "#t"; } else {cout << "#f"; } cout << DATA_END; } fflush (stdout); } return 0; }
- [TeXmacs] Multiline-plugin, Adrian S., 03/05/2012
- Re: [TeXmacs] Multiline-plugin, Joris van der Hoeven, 03/11/2012
- Re: [TeXmacs] Multiline-plugin, Adrian S., 03/11/2012
- Re: [TeXmacs] Multiline-plugin, Joris van der Hoeven, 03/11/2012
Archive powered by MHonArc 2.6.19.