emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a pa


From: Juri Linkov
Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349)
Date: Wed, 31 Aug 2022 19:06:59 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> I've tried it out, but it gets stuck asking the same question:
>>    Hunk has already been applied; undo it? (y or n)
>> because of the infinite loop in:
>>              (while (not (eobp))
>>                (diff-apply-hunk))
>> After removing the loop, everything works fine.
>
> Do you perhaps have customized diff-advance-after-apply-hunk to nil?
> I guess a let-binding is in order.

diff-advance-after-apply-hunk is still t.

> But a loop is necessary because the diff can have more than one hunk, isn't
> it?

A loop is necessary indeed.  The problem is that I tried it with Bzr,
but it has such a bug that `bzr diff` adds an extra line at the end,
so it's not (eobp) after the last diff hunk.  After removing the
final newline in the *vc-diff* buffer the loop can be finished.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]