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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Oct 2024 09:17:45 +0300

> Date: Tue, 1 Oct 2024 22:13:03 +0300
> Cc: [email-masked], [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 01/10/2024 18:51, Eli Zaretskii wrote:
> > I can explain the rationale for doing the opposite: when describing
> > the operation with active region, we usually start with "If the region
> > is active..." or with some other similar conditional language.  This
> > then makes it natural to explain the behavior in the other cases,
> > because the active-region one is clearly conditional, and thus not the
> > general case.
> 
> When using commands like kill-region, or kill-ring-save, etc, having an 
> active region is the "usual" case (among other things because without it 
> the user doesn't see the bounds that would be acted on).
> 
> With the command in question, not having an active region will likely be 
> the more frequent case, and the boundaries of the text acted upon are 
> already visible in the buffer.

Thanks for providing the rationale.

However, IME, clarity of documentation is so important that it trumps
many other considerations of the order of describing things, so I'm
still not happy with your proposed order.  If you search diff-mode.el
for "region", you will see that this very file uses the conventions I
explained above.  Here's one example:

  (defun diff-context->unified (start end &optional to-context)
    "Convert context diffs to unified diffs.
  START and END are either taken from the region
  \(when it is highlighted) or else cover the whole buffer.
  With a prefix argument, convert unified format to context format."