[Top][All Lists]

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

Alinea filling (hanlding of explicit line-breaks)

From: Vincent Belaïche
Subject: Alinea filling (hanlding of explicit line-breaks)
Date: Sun, 13 Feb 2011 09:47:27 +0100

Dear all,

I would like to suggest an evolution of fill.el. I can make the update
and provide the diff file.

The proposal is to add, in addition to paragraph separator, an alinea
separator. Accordingly there would be a forward-alinea function similar
to forward-paragraph.

An alinea is, in French regulatory jargon, (er, what is the English word
for alinea? ) a part in a paragraph that is separated by a line break,
and typically starting with an indentation. Not all pargraphs are
separated into alineas.

That evolution would be completely backward compatible: with a nil
alinea separator, the behaviour would be same as the current one, and
otherwise paragraph filling would fill each alineas within the current
paragraph as if they were paragraphs on their owns.

I felt the need for this in two occasions, the first one was for EUPP
(cf http://vincentbelaiche.pagesperso-orange.fr/#sec-1_2), and the
second one was with Org mode.

EUPP embeds lisp code into comments thanks to special markup added onto
the usual comment marks. With EUPP, I needed to prevent the paragraph
filling to mangle those comment extra marks, as otherwise they would be
erroneously separated from normal comment marks. One solution would be
that the EUPP mark that is at each end of line of embedded lisp code is
configured as an alinea separator.

I suggested an evolution on AUCTeX (as I use EUPP mostly in conjunction
with LaTeX code), but the answer from Ralf Angeli at that time was that
this should rather be an evolution of generic filling service in
fill.el, and I was convinced by him that this would be a better way.

Another occasion, is for Org mode. In Org-mode: the explicit line break
is a `\\' placed at end of line. If `\\' is not at end of line it loses
its meaning of line-break. Filling a paragraph that contains an explicit
line break is quite a disturbance because most often the line tailing \\
is moved and as after filling it is no longer at the end of line, it
loses its linebreaking power. The solution would be to configure `\\\\$'
into the alinea separator, so that filling a paragraph does not mix
alineas together.

Feedback to this proposal is most welcome, in case that there is a
consensus on the usefulness of alinea separation, I would provide the
updated code/bazaar diff.


reply via email to

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