GNU bug report logs - #66113
Apply the entire diff buffer

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 20 Sep 2023 06:51:01 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 66113 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 66113 <at> debbugs.gnu.org
Subject: Re: bug#66113: Apply the entire diff buffer
Date: Tue, 26 Sep 2023 02:07:33 +0300
On 25/09/2023 20:49, Juri Linkov wrote:
>>>> I tried testing it out too. There is a patch where the third hunk doesn't
>>>> apply (errors with "can't find the text to patch" in regular usage). This
>>>> command ends with cryptic "No next hunk".
>>> This is what I expected that diff-hunk-next might signal an error
>>> that we should catch, but still couldn't find a patch that fails
>>> with such error.  So I will try to construct such a patch manually.
>> Try the patch attached to this message:
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63896#5
> Thanks, I forgot about signatures in git patches.
> diff-mode already handles them in diff-fixup-modifs:
> 
>                          ;; In git format-patch "^-- $" signifies
>                          ;; the end of the patch.
> 			(and (eq diff-buffer-type 'git)
> 			     (looking-at "^-- $"))
> 
> So I just copied this code here:

That works. Thanks!

Ideally, I think point would move to the first failing hunk. But that's 
not urgent, could be a TODO for later.

Aside from that, I'm still not crazy about the binding. But that's not a 
technical issue.




This bug report was last modified 1 year and 233 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.