From: Stephen Berman <stephen.berman@gmx.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 53343@debbugs.gnu.org
Subject: bug#53343: 29.0.50; assertion failure in diff--iterate-hunks
Date: Fri, 21 Jan 2022 14:29:21 +0100 [thread overview]
Message-ID: <87r191b4jy.fsf@rub.de> (raw)
In-Reply-To: <874k5xtkhm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 21 Jan 2022 12:07:49 +0100")
On Fri, 21 Jan 2022 12:07:49 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Stephen Berman <stephen.berman@gmx.net> writes:
>
>> On the other hand, I get the assertion failure with the above recipe in
>> emacs-28 and emacs-27, and it seems unlikely that such a bug in
>> diff-mode would have gone unnoticed till now, so maybe the diff is
>> malformed. (Though if so, why does the failure not happen when visiting
>> the file containing the diff?)
>
> I tried
>
> (setq debug-on-error t)
>
> put the diff in a file, and got a backtrace when loading it.
>
> Debugger entered--Lisp error: (error "Unknown diff hunk type")
> signal(error ("Unknown diff hunk type"))
> error("Unknown diff hunk type")
> diff-hunk-text("" nil nil)
> diff-syntax-fontify-hunk(506 506 t)
> etc
Yes, I get this too. I must have mistested that before.
> So I've now made that function less assertative, and that fixes this
> issue.
Thanks, and I confirm your fix avoids the error. However, you added
this to the doc string of `diff-ignore-whitespace-hunk': "If
INHIBIT-ERROR, ignore malformed hunks." But you didn't add an
INHIBIT-ERROR argument.
Steve Berman
next prev parent reply other threads:[~2022-01-21 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 11:02 bug#53343: 29.0.50; assertion failure in diff--iterate-hunks Stephen Berman
2022-01-18 12:20 ` Stephen Berman
2022-01-21 11:07 ` Lars Ingebrigtsen
2022-01-21 13:29 ` Stephen Berman [this message]
2022-01-21 13:31 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r191b4jy.fsf@rub.de \
--to=stephen.berman@gmx.net \
--cc=53343@debbugs.gnu.org \
--cc=larsi@gnus.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.