GNU bug report logs - #73387
30.0.90; C-x v v in diff-mode doesn't work after C-c C-n

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Fri, 20 Sep 2024 16:10:01 UTC

Severity: normal

Found in version 30.0.90

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 73387 <at> debbugs.gnu.org, juri <at> linkov.net, monnier <at> iro.umontreal.ca,
 spwhitton <at> spwhitton.name
Subject: Re: bug#73387: 30.0.90; C-x v v in diff-mode doesn't work after C-c
 C-n
Date: Wed, 02 Oct 2024 09:17:45 +0300
> Date: Tue, 1 Oct 2024 22:13:03 +0300
> Cc: 73387 <at> debbugs.gnu.org, juri <at> linkov.net, monnier <at> iro.umontreal.ca
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> 
> 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."




This bug report was last modified 281 days ago.

Previous Next


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