emacs-devel
[Top][All Lists]
Advanced

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

Re: Beginingless paragraphs


From: Alan Mackenzie
Subject: Re: Beginingless paragraphs
Date: Wed, 31 Aug 2005 18:11:56 +0000 (GMT)

Hi, Emacs!

On Wed, 31 Aug 2005, Richard M. Stallman wrote:

>    What is a "paragraph" in Emacs?  I can't find a @dfn{paragraph}
>    anywhere in the Emacs/Elisp manuals.

>Do we need one?  Certainly in the Emacs Lisp manual we don't.
>It is a high-level concept used in just a few user-level commands.

I disagree most strongly here.  Hackers need to know how to set up
paragraph-s\(tart\|eparate\) so that they can make the canonical
paragraph commands behave the way they want them to.

For example, I was tearing my hair out in frustration a couple of years
back, trying to get the sentence/paragraph movement and filling stuff to
work properly in CC Mode.  (Comment prefixes and escaped newlines in
strings complicate things.)  In the end, I had to edebugger my way
through forward-paragraph to get a handle on things.

For another example, it would be nice if M-q in a Shell Script mode
comment would regard a line like "#   " as a blank line (i.e. paragraph
separator).  (Maybe this has already been done for 22.1 - if so,
apologies.)  This would be easier, I think, with a clear definition of a
paragraph.

I think it would be far easier to understand a description like

  "The paragraph functions recognise the start of a paragraph as
   <expression containing p-start and p-separate> and the end of a
   paragraph as <another such expression>."

than the ones saying "p-start matches ...." and "p-separate matches ...".

>Defining paragraphs better might be useful in the Emacs Manual.

I think they should either be properly defined there or the references to
paragraph-s\(tart\|eparate\) replaced by an xref to a description in the
Elisp manual.  The logical absurdity ("beginningless paragraphs")
implicit in the manual surely should be sorted out one way or the other.

>Would this really make a difference for users, though?  I am not sure.
>Right now the manual effectively takes for granted that users know what
>a paragraph is.  Is this a problem?

I think Users will know exactly what a paragraph is until they've seen
the descriptions of paragraph-start and paragraph-separate, after which
they'll not be so sure any more.  ;-)

#########################################################################

Looking at @node "Standard Regexps" in Elisp's searching.texi, perhaps
the node's title should be amended.  What does "Standard Regular
Expressions used in Editing" really say?  Well, "Standard" and "used in
Editing" both seem content-free, so all the title really means is "A few
regexps".

The four regexps documented on this page all define chunks of
natural-language text: paragraphs, pages and sentences.  So how about
renaming this @section something like "Sentences, Paragraphs and Pages",
and making the focus of the @node the definition of these things in terms
of the regexps, rather than the regexps themselves?

It goes without saying, I'm ready and willing to make these amendments
myself.

-- 
Alan Mackenzie (Munich, Germany)






reply via email to

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