[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] Re: A first step towards a clean spec of LP mode for texma
[Texmacs-dev] Re: A first step towards a clean spec of LP mode for texmacs
Sun, 12 Feb 2006 19:22:53 +0100
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)
Felix Breuer <address@hidden> writes:
> thanks for getting things started! The spec you wrote summarizes
> what we discussed really well.
> = Save, Load & Import
> I had not thought of importing plain source files (without tm-comments)
> before. Good idea! I think this kind of import should be available from
> File->Import->Source..., while the everyday import/export to source
> +tm-comments should happen automatically when selecting File->Save or
> This is not only less cumbersome for the user than
> File->Export->..., but also avoids redundant duplication of data.
Yes. Maybe we could even add in the future a File->Export-> feature that
saves the original source file with all LP-texmacs content rendered as
plain text in language comments.
> = Determining the File Type in Load and Save
> Obviously we need some way to distinguish when to use our
> overloaded load/save functions and when to read a file as
> a standard .tm file. The .tm.c extensions are a very good
> mechanism for that. But we cannot rely on that exclusively:
> Think of a shell script that you want to run by calling
> "script" instead of "script.tm.sh". Joris suggested
> deciding which save method to use based on which style
> is set for a document. The load method can be chosen based
> on whether or not the document begins with "<TeXmacs" or not.
Yes, "<TeXmacs" in the few first lines of the document.
As with "-*- foo-mode -*-" notation of Emacs, should be prepare some tag
so the user can force the source kind in TeXmacs, like:
> = Special First Lines
> Speaking of the beginning of a document. We need to allow the
> user to customize what the first line of the saved file will
> look like:
Ok, you are right. Well spotted.
> I am thinking of a special tag, like
> When writing the document the contents of this tag are put at
> the very top of the text file (and the tag itself is serialized
> as the empty string, to make sure there is no redundancy). When
> reading a literate document everything preceding "#<TeXmacs..."
> is put into a lp-preamble tag at the beginning of the body.
Ok. At first read your scheme seems ok to me.
> = Which Tags are to be Serialized Verbatim?
> Of course we could hard-code the tags that are supposed to be
> serialized as verbatim LP blocks. In fact that is probably the
> best way to do this in a first iteration. But in the long run
> we should use DRDs for this. I will have to investigate that.
As you wish for the long term, but right now hard-code blocks seem much
simpler to me. ;)
> = Reordering Code Chunks
> I suggest we forget about this until TeXmacs documents are proper
> graphs, even though this may be a long time of.
Ok. I still fear that too much TeXmacs code in comments would impact
source code readability. First experiments will tell if this is really
an issue and if we need to solve it in an ad-hoc way.
> = To Do
> The way I see it right now the objectives are to create
> 1) overloaded load-save functions for source files with tm-comments
> 2) an import function for plain source files (treating comments as
> plain text) - 2) will share a lot of code with 1)
> 3) a database of commenting syntax (simply as a scheme file)
> 4) create style files that format verbatim blocks nicely (or do we
> use the <code> tag as is in TeXmacs?)
> 4) create convenience functions that split/join verbatim blocks
> (how would you want the user interface for this one to be like?)
> All of the above can be done from Scheme AFAICT. I will have to look
> at the load/save mechanism and the DRD stuff. Have you already started
> writing code?
> Have you any experience using TeXmacs' Scheme API?
No experience at all. Any pointer to relevant TeXmacs documentation or
source code would be useful to me.
> Thanks again for your work,
And thank you for your review. I propose that we continue in that low
speed mode. On my own side, I'll refresh my Scheme and look at Scheme
API of TeXmacs, with in mind your points (1)-(4) above.
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <address@hidden>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A