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

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

bug#17321: 24.3.50; Fill paragraph fails with period in fill-column


From: Glenn Morris
Subject: bug#17321: 24.3.50; Fill paragraph fails with period in fill-column
Date: Fri, 02 May 2014 20:47:41 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Geoff Shannon wrote:

> When the final character on a line is a period, auto filling both with
> do-auto-fill and with fill-paragraph incorrectly moves the entire word
> preceding the period to the next line.  This is not the case when it is
> a letter in the fill-column.
>
> To reproduce, `emacs -Q` Then load up this text in a buffer, and turn
> auto-fill-mode on, and assuming that fill-column is set to 70.
>
> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius.
>
> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusm
>
> Both lines are the same except for the final character.  If we type a
> space at the end of both lines, the one word with a trailing period is
> (incorrectly) moved to the next line, while the other does nothing.
[...]
> Also, it appears that setting sentence-end-double-space changes the
> behaviour to what I would expect.  However, in terms of the aesthetic
> result of the fill, I think the current behaviour is still incorrect.

I believe the reason for this is explained in a comment in the
definition of fill-nobreak-p:

     ;; Don't break after a period followed by just one space.
     ;; Move back to the previous place to break.
     ;; The reason is that if a period ends up at the end of a
     ;; line, further fills will assume it ends a sentence.
     ;; If we now know it does not end a sentence, avoid putting
     ;; it at the end of the line.

So it sounds like it is not possible to get the behaviour that you would
prefer.





reply via email to

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