[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] Path computations
From: |
Philippe Audebaud |
Subject: |
[Texmacs-dev] Path computations |
Date: |
Mon, 23 Jun 2003 10:59:11 +0200 |
User-agent: |
Mutt/1.4i |
Hi,
Assume (for a reason or another) one wants to allow a script or program
external to TeXmacs making computations on paths for a document.
here is my experiment (the document is attached to this mail):
----------------------------------><8---------------------------------------
this is a string
<verbatim|(0 13)> is the path, cursor left to the second 'i' letter.
- the meaning is 0=first paragraph in the document, 13=position in the string
<strong|this is a string>
<verbatim|(3 1 13)> for the same postion, and the structure is
<verbatim|\<less\>strong\|this is a string\<gtr\>>
- the meaning is 3=fourth paragraph, 1=second position in the macro, 13=...
<with|mode|math|this is a string>
<verbatim|(6 2 13)> for the same position, the structure being
<verbatim|\<less\>with\|mode\|math\|this is a string\<gtr\>>
- the meaning is 6=sixth para, 2=fourth position in the macro, 13=...
----------------------------------><8---------------------------------------
So what ? 'strong' is a user macro, defined in some TeXmacs package, while
'with' is a TeXmacs *primitive*. In the first case, the macro name position
is taken into account in the computation. In the second case, it is *not*
taken into account.
1) what are the very reasons for such a difference within the two kinds of
'macros' ?
2) If such a behavior must be preserved, then I think a scheme function like
'primitive?', 'tm-primitive?' (...which ever the name), returning the status
for these names will be welcome to help developers.
I feel really bad with such a distinction, and TeXmacs crashed badly for many
times until I figured out that the problem was *that* one. Moreover, I
remember defining a macro with name 'group' without knowing it was a TeXmacs
primitive. Of course, several documents of mime behaved badly in this
context! But no warning was given for redefining a primitive... And as a
matter of consequence, path computation changed ! I can also imagine status
changing from a TeXmacs version to another, so the way of computing paths
seems too much context sensitive to me.
How can we deal best with this issue?
best,
--
Philippe Audebaud.
paths.tm
Description: Path computations
- [Texmacs-dev] Path computations,
Philippe Audebaud <=