unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Geoff Shannon <geoffpshannon@gmail.com>
Cc: 17321@debbugs.gnu.org
Subject: bug#17321: 24.3.50; Fill paragraph fails with period in fill-column
Date: Fri, 02 May 2014 20:47:41 -0400	[thread overview]
Message-ID: <khzjizit76.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CA+pAvvy7Uen9H3iiQ0mg0vEE4qXDd3OBFpd6yC_jRLCkC-1+mw@mail.gmail.com> (Geoff Shannon's message of "Tue, 22 Apr 2014 17:51:03 -0700")

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	other threads:[~2014-05-03  0:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23  0:51 bug#17321: 24.3.50; Fill paragraph fails with period in fill-column Geoff Shannon
2014-05-03  0:47 ` Glenn Morris [this message]
2014-05-03  0:49   ` Glenn Morris
2014-05-03 21:00     ` Geoff Shannon
2014-05-04  4:22   ` Stefan Monnier
2021-09-04  8:53     ` Lars Ingebrigtsen
2021-10-10 23:01       ` Stefan Kangas
2021-10-11  7:59         ` Lars Ingebrigtsen
2021-10-11 20:18           ` Stefan Kangas
2021-10-11  8:18         ` Lars Ingebrigtsen
2021-12-25  6:08           ` Stefan Kangas
2021-12-25 11:59             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=khzjizit76.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=17321@debbugs.gnu.org \
    --cc=geoffpshannon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).