GNU bug report logs - #10309
24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Fri, 16 Dec 2011 12:48:01 UTC

Severity: wishlist

Found in version 24.0.92

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10309 in the body.
You can then email your comments to 10309 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 12:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Dec 2011 12:48:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92; [wishlist] Add an option to disable "auto-refining" while
	moving between hunks in diff mode
Date: Fri, 16 Dec 2011 13:45:59 +0100
Severity: wishlist

In diff mode, the commands bound to M-n/M-p move the point to the
next/previous hunk, but they do one more thing: they also refine the
hunk where point jumps to.

I'd like to have the option to control (enable/disable) that automatic
refining, because:
* Sometimes I don't _need_ it (so my browsing could be faster).
* Sometimes I don't _want_ it (when the hunk contains many changed
lines, the refined hunk looks confusing).

TIA.

In GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600)
 of 2011-12-10 on DANI-PC
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.6) --no-opt --cflags
-fno-omit-frame-pointer'

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 14:22:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org
Subject: Re: bug#10309: 24.0.92;
	[wishlist] Add an option to disable "auto-refining" while moving
	between hunks in diff mode
Date: Fri, 16 Dec 2011 15:19:29 +0100
Dani Moncayo <dmoncayo <at> gmail.com> writes:

> I'd like to have the option to control (enable/disable) that automatic
> refining, because:

diff-auto-refine-mode

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 16:57:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 10309 <at> debbugs.gnu.org
Subject: Re: bug#10309: 24.0.92; [wishlist] Add an option to disable
	"auto-refining" while moving between hunks in diff mode
Date: Fri, 16 Dec 2011 17:54:23 +0100
>> I'd like to have the option to control (enable/disable) that automatic
>> refining, because:
>
> diff-auto-refine-mode

Ok, thanks.  Then:

1) I'd like to control whether that minor mode is enabled by default
after invoking the `diff' command.  Currently it is, and I'd like it
wasn't.

2) IMO, the info node "(emacs)Diff Mode" should explain the concept of
"refined hunks" and also the `diff-auto-refine' minor mode.


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 17:37:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Dani Moncayo'" <dmoncayo <at> gmail.com>,
	"'Andreas Schwab'" <schwab <at> linux-m68k.org>
Cc: 10309 <at> debbugs.gnu.org
Subject: RE: bug#10309: 24.0.92;
	[wishlist] Add an option to disable "auto-refining" while
	movingbetween hunks in diff mode
Date: Fri, 16 Dec 2011 09:34:33 -0800
> IMO, the info node "(emacs)Diff Mode" should explain the concept of
> "refined hunks" and also the `diff-auto-refine' minor mode.

+1.

And instead of just saying "make it writable first", say "make it writable first
(`C-x C-q')" to let newbies know how to do that.  That costs only a few extra
characters and does not interrupt the flow.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 17:45:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#10309: 24.0.92; [wishlist] Add an option to disable
	"auto-refining" while moving between hunks in diff mode
Date: Fri, 16 Dec 2011 18:42:22 +0100
On Fri, Dec 16, 2011 at 17:54, Dani Moncayo <dmoncayo <at> gmail.com> wrote:

> 1) I'd like to control whether that minor mode is enabled by default
> after invoking the `diff' command.  Currently it is, and I'd like it
> wasn't.

What about

  (setq-default diff-auto-refine-mode nil)

in your .emacs?

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 17:56:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#10309: 24.0.92; [wishlist] Add an option to disable
	"auto-refining" while moving between hunks in diff mode
Date: Fri, 16 Dec 2011 18:53:38 +0100
>> 1) I'd like to control whether that minor mode is enabled by default
>> after invoking the `diff' command.  Currently it is, and I'd like it
>> wasn't.
>
> What about
>
>  (setq-default diff-auto-refine-mode nil)
>
> in your .emacs?

I thought it too, and it seems to work, but I saw the docstring of
that variable, and it seem to advise against changing the variable at
user-level:

  Non-nil if Diff-Auto-Refine mode is enabled.
  Use the command `diff-auto-refine-mode' to change this variable.

Why?

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 18:22:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#10309: 24.0.92; [wishlist] Add an option to disable
	"auto-refining" while moving between hunks in diff mode
Date: Fri, 16 Dec 2011 19:19:37 +0100
On Fri, Dec 16, 2011 at 18:53, Dani Moncayo <dmoncayo <at> gmail.com> wrote:

> I thought it too, and it seems to work, but I saw the docstring of
> that variable, and it seem to advise against changing the variable at
> user-level:
>
>  Non-nil if Diff-Auto-Refine mode is enabled.
>  Use the command `diff-auto-refine-mode' to change this variable.
>
> Why?

Usually, every minor mode as as associated variable, but obviously the
work is done by the function (the variable just acts as a flag to know
whether the minor mode is active or not).

In this case, the minor mode is defined with ":init-value t", so it
defaults to active. If you check the macroexpansion of the minor-mode
definition, you'll see it does

  (defvar diff-auto-refine-mode t
    "Non-nil if Diff-Auto-Refine mode is enabled.
  Use the command `diff-auto-refine-mode' to change this variable.")
  (make-variable-buffer-local 'diff-auto-refine-mode)

so if you want it to default to disabled, you have to set it so.

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 18:34:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#10309: 24.0.92; [wishlist] Add an option to disable
	"auto-refining" while moving between hunks in diff mode
Date: Fri, 16 Dec 2011 19:31:58 +0100
>> I thought it too, and it seems to work, but I saw the docstring of
>> that variable, and it seem to advise against changing the variable at
>> user-level:
>>
>>  Non-nil if Diff-Auto-Refine mode is enabled.
>>  Use the command `diff-auto-refine-mode' to change this variable.
>>
>> Why?
>
> Usually, every minor mode as as associated variable, but obviously the
> work is done by the function (the variable just acts as a flag to know
> whether the minor mode is active or not).
>
> In this case, the minor mode is defined with ":init-value t", so it
> defaults to active. If you check the macroexpansion of the minor-mode
> definition, you'll see it does
>
>  (defvar diff-auto-refine-mode t
>    "Non-nil if Diff-Auto-Refine mode is enabled.
>  Use the command `diff-auto-refine-mode' to change this variable.")
>  (make-variable-buffer-local 'diff-auto-refine-mode)
>
> so if you want it to default to disabled, you have to set it so.

I understand.

So, in the info node I mentioned before, please also explain this,
i.e., that the diff-auto-refine minor mode can be turned off by
default by setting the default value of `diff-auto-refine-mode' to
`nil'.

Thank you.

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Fri, 16 Dec 2011 19:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, schwab <at> linux-m68k.org, dmoncayo <at> gmail.com
Subject: Re: bug#10309: 24.0.92;
	[wishlist] Add an option to disable "auto-refining" while
	moving	between hunks in diff mode
Date: Fri, 16 Dec 2011 21:32:42 +0200
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Fri, 16 Dec 2011 18:42:22 +0100
> Cc: Andreas Schwab <schwab <at> linux-m68k.org>, 10309 <at> debbugs.gnu.org
> 
> On Fri, Dec 16, 2011 at 17:54, Dani Moncayo <dmoncayo <at> gmail.com> wrote:
> 
> > 1) I'd like to control whether that minor mode is enabled by default
> > after invoking the `diff' command.  Currently it is, and I'd like it
> > wasn't.
> 
> What about
> 
>   (setq-default diff-auto-refine-mode nil)
> 
> in your .emacs?

Or turn diff-auto-refine-mode off in the diff-mode-hook.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10309; Package emacs. (Sat, 07 Jan 2012 08:14:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10309 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#10309: 24.0.92;
	[wishlist] Add an option to disable "auto-refining" while moving
	between hunks in diff mode
Date: Sat, 07 Jan 2012 16:12:56 +0800
Dani Moncayo <dmoncayo <at> gmail.com> writes:

> 2) IMO, the info node "(emacs)Diff Mode" should explain the concept of
> "refined hunks" and also the `diff-auto-refine' minor mode.

Done.




bug closed, send any further explanations to 10309 <at> debbugs.gnu.org and Dani Moncayo <dmoncayo <at> gmail.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 07 Jan 2012 08:15:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Feb 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 109 days ago.

Previous Next


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