texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Literate Programming in TeXmacs?


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Literate Programming in TeXmacs?
Date: Tue, 22 May 2007 10:01:01 +0200
User-agent: Mutt/1.5.9i

On Tue, May 22, 2007 at 01:45:41AM +0200, Ralf Hemmecke wrote:
> On 05/21/2007 10:07 PM, Todd Wilson wrote:
> >Felix Breuer wrote:
> >>So, having thought about both approaches I would also go for approach
> >>(2) (as in Joris' numbering), *but* I would like to point out one severe
> >>difficulty: generating source code makes debugging much less
> >>convenient, as the line numbers a compiler complains about refer to the
> >>generated code and not the TeXmacs document.

With a bit of work, this problem can be overcome:
the TeXmacs->source converter just has to have support for line numbers,
i.e. for each generated line, keep track of the corresponding location
in the TeXmacs document. Another reason why I recommend the use of Scheme.

> >Another useful feature would be the ability to parse compiler output and 
> >locate and/or cycle through positions in the code with errors, as the 
> >Emacs compiling modes allow one to do.
> 
> I don't think that would be terribly hard, but it is sad to hear that 
> TeXmacs is so far away from Emacs.

Most compilers follow a standard convention like

        source-file:line-number:line-column:message

for error messages. This is easy to parse and should raise no particular
problem except from minor compiler-specific changes in the message format.

> >And how about automatic syntax highlighting?
> 
> Oh, TeXmacs seems to be a better WORD with no support for programming?

This is more complex, and is related to a more ambitious project
about document styling. Nevertheless, a poor man's solution,
which does the highlighting on request, or which highlights
only certain keywords, should be easier. Notice also that you
may need special treatment for features like mathematical formulas
in programs. I would keep this on the list for stage 2 of a LP project.

> How close is TeXmacs to Emacs? Could one perhaps reuse some .el files?

The analogy is that we both use an extension language, but there is no
hard-wired compatability, for the simple reason that TeXmacs documents
are not strings, but trees.

Best wishes, Joris




reply via email to

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