unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 47338@debbugs.gnu.org, Evgeny Zajcev <lg.zevlg@gmail.com>
Subject: bug#47338: 28.0.50; Unexpected error in fill-region
Date: Wed, 24 Mar 2021 10:24:48 +0100	[thread overview]
Message-ID: <87o8f8ewf3.fsf@gnus.org> (raw)
In-Reply-To: <83lfad7nk2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 23 Mar 2021 20:05:49 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> This is the result of fixing bug#45720.  In the above scenario, the
> first time through the loop LINEBEG in the fragment below is set to
> EOB+1 instead of the point where the fill-prefix ends:
>
> 	(let ((first t)
>               linebeg)
> 	  (while (< (point) to)
>             ;; On the first line, there may be text in the fill prefix
>             ;; zone.  In that case, don't consider that area when
>             ;; trying to find a place to put a line break (bug#45720).
>             (if (not first)
> 	        (setq linebeg (point))
>               (setq first nil
>                     linebeg (+ (point) (length fill-prefix)))) <<<<<<<<<<
>
> CC'ing Lars who made that change.

Right...  the change tried to fix the case where there's a pre-computed
fill prefix being passed in.  In this bug, however, the prefix is
computed, and this logic shouldn't be done here.  I've now fixed this in
Emacs 28, but I'm still not quite sure about the original fix...

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





  reply	other threads:[~2021-03-24  9:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  9:43 bug#47338: 28.0.50; Unexpected error in fill-region Evgeny Zajcev
2021-03-23 15:31 ` bug#47338: [External] : " Drew Adams
2021-03-23 16:44   ` Eli Zaretskii
2021-03-23 17:19     ` Drew Adams
2021-03-23 17:55 ` Gregory Heytings
2021-03-23 19:24   ` Eli Zaretskii
2021-03-23 19:42     ` Gregory Heytings
2021-03-23 18:05 ` Eli Zaretskii
2021-03-24  9:24   ` Lars Ingebrigtsen [this message]
2021-03-25 18:27     ` Evgeny Zajcev

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=87o8f8ewf3.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=47338@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lg.zevlg@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).