all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* forward-paragraph, paragraph-start trouble
@ 2008-04-05 23:20 John J Foerch
  2008-04-07 14:32 ` Andreas Röhler
  0 siblings, 1 reply; 3+ messages in thread
From: John J Foerch @ 2008-04-05 23:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I am writing a major mode for a particular flavor of plain text file.  I
am having trouble coercing `forward-paragraph' to recognize the
paragraph style.  Here is some example text:

==begin example==

    This is the first paragraph.  It is
totally awesome.
    This is the second paragraph.  forward-paragraph
won't normally treat this one as a separate paragraph.

    But the real difficulty is when
    there is a paragraph like this.
    To find out whether a given line
    is a start-paragraph, you have
    to be able to look at the previous
    line to compare the amount of
    indentation.
        Crazy though it may seem,
    this sentence begins a new
    paragraph.

    This sentence, though formatted
    a bit strangely, should also be
treated as a single paragraph.

==end example==


`forward-paragraph' uses two regular expressions, `paragraph-start' and
`paragraph-separate' to find paragraphs.  I simply need to be able to
say that a line with more identation than the previous line is a
paragraph-start.  However, since emacs regular expressions lack
look-behind assertions, I am under the impression that what I want to do
is impossible.

Any advice?

Thank you,
John Foerch





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

end of thread, other threads:[~2008-04-10 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05 23:20 forward-paragraph, paragraph-start trouble John J Foerch
2008-04-07 14:32 ` Andreas Röhler
2008-04-10 20:14   ` John J Foerch

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.