Ralf Angeli a écrit :
* Vincent Belaïche (2008-08-10) writes:
Then there are two drawbacks for that
1) the user has to care not to make a M-q when the point is in the
pre-preprocessor code
That's what I've already written above. Of course this would not be a
problem if there were dedicated filling code which would be able to deal
with the syntax of the preprocessor code. This would be a superior
solution to simply making the preprocessor code immutable to the filling
code.
Just for clarification : the preprocesor (EUPP) code is not immutable.
The preprocessor (EUPP) that I have developped comprises an edit command
`eupp-edit'. The preprocessor code is comprised into bloc (EUPP blocs),
when the pointer in on a bloc, and you call eupp-edit, then all the
processor code of this bloc is copied to another buffer (*Eupp edit*
buffer) which is in Emacs-lisp mode. There you can modify and fill the
code at you guise, and then, when you are over with it, you call `C-c
C-c' which is, within *Eupp edit* buffer bound to function
eupp-edit-finish. The eupp-edit-finish functions then copies back the
modified, and possibly filled, eupp code, back the orginal (e.g. LaTeX)
buffer into the Eupp bloc (using special comments)
With this approach all Elisp specific editing commands, including
filling, are normal used without any need for new commands.
The latter way would just be a quick way of providing something
like the verbatim environment in LaTeX.
Ok, what you mean is that you prefer some marks delimiting a whole
section of Eupp code, rather than line-by-line delimitation.
Actually, I had not in mind that the verbatim environment is not
fillable when it is within comments.
Since in Eupp marks that delimit the Eupp bloc are configurable, I can
easilly configure them for the whole Eupp block comment to start with a
\begin{verbatim}
and end with an \end{verbatim} without changing the current Eupp code
(only some variable default value) and without changing AUCTeX.
However, I had in mind that it would be better if this kind of
delimitation was configurable, in that case I could reuse the same marks
that I have (for your clarification: there are marks at the beginning
and end of each line, but also the beginning of the first line of a
block, and the end of the last line in a block have their own marks).
I'd use something like that for
content which does not follow a certain syntax. In other cases
a separate major mode would usually be better. I've hinted at that
before as well.
2) the pre-processor code will split paragraphs into pieces, which I
think is awkward.
I don't understand this statement.
Forget about it.
I just meant that you would need to make that each line of the Eupp code
be interpreted as a single paragraph in order that the filling does not
shift Eupp code line begin/end marks from one line to another, and that
this would make many small paragraphs, which is a bit awkward.
I can still see some use for the definition of sections which should be
spared from filling (especially if a larger region is to be filled), but
perhaps there should better be a general mechanism in Emacs which could
be used or adopted by AUCTeX once it is there.
[...]
What you suggest would need that AUCTeX filling mechanism should be a
layer on top of some general filling kernel provided by Emacs, whereas
it seems to be currently a complete overload of Emacs filling procedure
(w/o reuse).
It would be good if we could use more of the functionality from Emacs
proper, but filling in AUCTeX has to jump through quite some hoops to be
able to fill docTeX documentation parts and cater for special break
points in LaTeX code. Since the standard Emacs filling code did not
provide this, it was implemented in AUCTeX.
But this is just an implementation detail. What I was talking about
earlier is that _conceptually_ the possibility to make sections
immutable to filling should not be a trait of AUCTeX, but of Emacs,
i.e. _if_ there really is a need for this it should be provided as a
general functionality. Personally I think it would be better to improve
Emacs' provisions for multi major mode files types.
I fully agree with this point. Actually Eupp is not specific to LaTeX,
but it can be used with any Language that allows line-wise comments with
free comment content
*Please confirm your intention* :
do you object to my contribution ?
If yes, you seem however to see some need for unfillable sections, could
you please tell me how I could make this function available in an
acceptable manner, as I do need for it, and I am sure that other people
may need for it too.
I'd post the idea on the Emacs development list for discussion.
Ok, I will follow this. Anyhow, I am not in a hurry as I have this local
version of latex.el which I contribution to fulfill my need for the time
being.
Does this idea also mean that the AUCTeX specific filling for docstring
will also need to rely on an Emacs generic filling kernel ?
BR,
Vincent.
_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex