unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Roland Winkler" <winkler@gnu.org>
Cc: 45720@debbugs.gnu.org
Subject: bug#45720: 28.0.50; fill-region-as-paragraph with long unbreakable lines
Date: Sun, 10 Jan 2021 15:06:49 +0100	[thread overview]
Message-ID: <87eeisubra.fsf@gnus.org> (raw)
In-Reply-To: <40659.67204.506971.24567@gargle.gargle.HOWL> (Roland Winkler's message of "Thu, 7 Jan 2021 17:52:51 -0600")

"Roland Winkler" <winkler@gnu.org> writes:

> Then put point on letter `b' of the following line and run M-x foo
>
> aaa =   baaaaaaaaaaaaaaaaaaaaaaaaaaaa
>
> This fills the line as
>
> aaa =
>         baaaaaaaaaaaaaaaaaaaaaaaaaaaa
>
> The line break introduced here does not make sense.  The line should
> be kept what it was.

Yup.  Looking at the code, this looked suspiciously easy to fix.
However, there's absolutely no tests for this stuff, so my confidence
that I didn't break anything here is pretty low.  I've added a couple
tests (based on your test case) and pushed it to the trunk, though.  Let
me know whether it works in your real cases or not:

> Command `foo' is really the essence of bibtex-fill-field-bounds in
> textmodes/bibtex.el that uses fill-region-as-paragraph to fill the
> fields of BibTeX entries.  If the field holds a URL, it may happen
> more easily that the value of the field is a string that goes beyond
> fill-column and that fill-region-as-paragraph cannot break into
> words.  I haven't tried to construct a yet more minimalistic version
> of this problem.

Or whether this breaks something else, and if it does, please do feel
free to add more tests to test/lisp/textmodes/fill-tests.el.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-01-10 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 23:52 bug#45720: 28.0.50; fill-region-as-paragraph with long unbreakable lines Roland Winkler
2021-01-10 14:06 ` Lars Ingebrigtsen [this message]
     [not found] <87y232r0ee.fsf@gnus.org>
2022-06-07 14:54 ` 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=87eeisubra.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45720@debbugs.gnu.org \
    --cc=winkler@gnu.org \
    /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).