emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: suggestion: add "repunctuate" functionality


From: Daniel Ortmann
Subject: Re: suggestion: add "repunctuate" functionality
Date: 27 May 2003 10:11:20 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Eli Zaretskii" <address@hidden> writes:

> > From: Daniel Ortmann <address@hidden>
> > Date: 20 May 2003 12:27:30 -0500
> > 
> > Text sentences are recognized by double space after punctuation with
> > optional ' " or ) characters to the right.
> > 
> > Email, news and other text commonly uses French spacing with a
> > single character after a sentence.  Emacs does not recognize
> > sentences with French spacing, causing reformatting and M-a / M-e
> > difficulties.
> > 
> > One solution is to facilitate updating single-spaced sentences with
> > double spaces.
> > 
> > Consider adding functionality similar to the following:
> > 
> > (defun repunctuate () (interactive)
> >   (query-replace-regexp "\\([\"')]?\\)\\([.?!]\\)\\([\"')]?\\) +" 
> > "\\1\\2\\3  "))

> The node "Sentences" in the Emacs manual tells you how to adapt Emacs
> to sentences that end with a sinle space after the period.  Does the
> advice there help?  If not, why not?

Often a message text's inconsistent punctuation still needs editing.
While the above functionality helps, the Sentences info only changes
recognition of sentences; it does not assist editing.

The last paragraph of the Sentences advice gives the caveat:

    Note that this makes it impossible to distinguish between periods
    that end sentences and those that indicate abbreviations.

-- 
Daniel Ortmann, LSI Logic, 3425 40th Av NW, Suite 200, Rochester MN 55901
work: address@hidden / 507.535.3861 / 63861 int / 8012.3861 gdds
home: address@hidden / 507.288.7732, 2414 30Av NW #D, Rochester MN 55901




reply via email to

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