Subject: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c C-n

From: Sean Whitton <[email-masked]>
Date: Thu, 03 Oct 2024 08:50:37 +0800

Hello,

On Wed 02 Oct 2024 at 10:15am +03, Eli Zaretskii wrote:

> This doesn't really address the issue, IMO.
>
> The main problem I have here is with the "all" part of the first
> sentence, which is then contradicted by the second.  Also, in other
> places, you describe the behavior when region is active, but not when
> it isn't.
>
> Here's what I would suggest to say in the manual:
>
>   @item C-c @key{RET} k
>   Delete diff hunks other than the current one.  If the region is
>   active, this command deletes the hunks overlapped by the region;
>   otherwise it deletes all the hunks other than the current hunk.  Do
>   @emph{not} invoke this command in a narrowed buffer, as that could
>   produce unexpected results.

Okay, I've rewritten based on this, though I haven't included the
imprecation, because invoking it in a narrowed buffer could never
produce unexpected results -- the function will always do nothing.

> And this is for the command's doc string:
>
>   (defun diff-delete-other-hunks (&optional beg end)
>     "Delete diff hunks other than the current one.
>   Interactively, if the region is active, delete all the hunks which
>   the region overlaps; otherwise delete all the hunks except the
>   current one.
>   When calling from Lisp, pass BEG and END as the bounds of region in
>   which to delete diff hunks; BEG and END omitted or nil means to
>   delete all the hunks but the one which contains point.

Done, thanks.

-- 
Sean Whitton