emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Alinea filling (hanlding of explicit line-breaks)
@ 2011-02-13  8:47 Vincent Belaïche
  2011-02-14 18:16 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Belaïche @ 2011-02-13  8:47 UTC (permalink / raw)
  To: Org mode, emacs-devel; +Cc: Vincent Belaïche

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.

VBR,
   Vincent.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Alinea filling (hanlding of explicit line-breaks)
  2011-02-13  8:47 Alinea filling (hanlding of explicit line-breaks) Vincent Belaïche
@ 2011-02-14 18:16 ` Stefan Monnier
  2011-02-14 20:59   ` [Orgmode] " Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2011-02-14 18:16 UTC (permalink / raw)
  To: Vincent Belaïche; +Cc: Org mode, emacs-devel

> 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.

I'm not completely sure I understand the details, so let me try to
describe what I think you're suggesting: you're suggesting to
distinguish the notion of paragraph (as used by the paragraph-forward
movement command) from the notion of "unit of text to fill"m which you
call alinea.  And you also propose to complete this by adding
a corresponding forward-alinea command.

Is that right?

If that's the case, then I think we already have most of it in Emacs-24,
in the form of the fill-forward-paragraph-function, which decouples the
navigation command from the "unit of text to fill".  You can see it in
action in ChangeLog files, where M-q will only refill the current
"alinea" starting with a function or variable name whereas M-} will jump
over the text of the whole file (which is made of several alineas, each
describe one (or sometimes a set of) variables or functions).


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)
  2011-02-14 18:16 ` Stefan Monnier
@ 2011-02-14 20:59   ` Samuel Wales
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2011-02-14 20:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Vincent Belaïche, Org mode, emacs-devel

Vincent, examples?

-- 
The Kafka Pandemic:
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-14 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-13  8:47 Alinea filling (hanlding of explicit line-breaks) Vincent Belaïche
2011-02-14 18:16 ` Stefan Monnier
2011-02-14 20:59   ` [Orgmode] " Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).