[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] towards Literate Programming plugin

From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] towards Literate Programming plugin
Date: Mon, 20 Jun 2005 14:42:59 +0200
User-agent: Mutt/1.5.6+20040907i

Hi Felix,

On Sun, Jun 19, 2005 at 01:47:18PM +0000, Felix Breuer wrote:
> 1) Indententation/formatting in .tmml files
>   Is there some way I can prevent TeXmacs from reformatting/indenting
>   of some node's contents in the .tmml output. Sometimes contents are
>   reformatted, sometimes they are not and xml:space="preserve" is added
>   and sometimes things change even though xml:space="preserve" is set!
>   E.g.
>   <tm-par xml:space="preserve">  DESCRIPTION : Generate MyCode XML from 
> TMML</tm-par>
>   <tm-par xml:space="preserve">  <lp-include>license in
>   source</lp-include></tm-par>
>   <tm-par>
>     --&gtr;
>   </tm-par>

I am not on this part of TeXmacs right now. I recommend to
take a look at the corresponding source code and try to patch it
if something is incorrect. Notice that the symbol/entity issue
also has to be fixed, still.

> 2) Convert and run LP from Scheme
>   I want to define a Guile function that 
>     i) exports the current document as .tmml, and writes it to
>        a location determined by my script, and then

You may use

        (texmacs-save-buffer file format)


        (save-buffer file format)

The second routine prompts for confirmation when overwriting.
You may discover this by yourself, by looking at the scheme code.
Start by looking at file-menu.scm, where you find that
the File -> Export menu leads to the routine buffer-saver.
This routine is defined in tm-file.scm and points to "save-buffer",
which points to "texmacs-save-buffer". 

>     ii) runs a system command, more concretely
>       <path to lp plugin>/bin/lp-gen <some path>

<path to lp plugin>/bin is already in your $PATH
(read the documentation about plug-ins!).
You may use "system", "eval-system" and "var-eval-system"
for executing system commands.

>     iii) and finally displays a message in the status line. 
>   How can I achieve this?

The command (set-message left-message right-message) will do the job.

Best wishes, Joris

reply via email to

[Prev in Thread] Current Thread [Next in Thread]