* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
@ 2011-12-16 12:45 Dani Moncayo
2011-12-16 14:19 ` Andreas Schwab
0 siblings, 1 reply; 10+ messages in thread
From: Dani Moncayo @ 2011-12-16 12:45 UTC (permalink / raw)
To: 10309
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 12:45 bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode Dani Moncayo
@ 2011-12-16 14:19 ` Andreas Schwab
2011-12-16 16:54 ` Dani Moncayo
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2011-12-16 14:19 UTC (permalink / raw)
To: Dani Moncayo; +Cc: 10309
Dani Moncayo <dmoncayo@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 14:19 ` Andreas Schwab
@ 2011-12-16 16:54 ` Dani Moncayo
2011-12-16 17:34 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while movingbetween " Drew Adams
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Dani Moncayo @ 2011-12-16 16:54 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 10309
>> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while movingbetween hunks in diff mode
2011-12-16 16:54 ` Dani Moncayo
@ 2011-12-16 17:34 ` Drew Adams
2011-12-16 17:42 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between " Juanma Barranquero
2012-01-07 8:12 ` Chong Yidong
2 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2011-12-16 17:34 UTC (permalink / raw)
To: 'Dani Moncayo', 'Andreas Schwab'; +Cc: 10309
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 16:54 ` Dani Moncayo
2011-12-16 17:34 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while movingbetween " Drew Adams
@ 2011-12-16 17:42 ` Juanma Barranquero
2011-12-16 17:53 ` Dani Moncayo
2011-12-16 19:32 ` Eli Zaretskii
2012-01-07 8:12 ` Chong Yidong
2 siblings, 2 replies; 10+ messages in thread
From: Juanma Barranquero @ 2011-12-16 17:42 UTC (permalink / raw)
To: Dani Moncayo; +Cc: Andreas Schwab, 10309
On Fri, Dec 16, 2011 at 17:54, Dani Moncayo <dmoncayo@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 17:42 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between " Juanma Barranquero
@ 2011-12-16 17:53 ` Dani Moncayo
2011-12-16 18:19 ` Juanma Barranquero
2011-12-16 19:32 ` Eli Zaretskii
1 sibling, 1 reply; 10+ messages in thread
From: Dani Moncayo @ 2011-12-16 17:53 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Andreas Schwab, 10309
>> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 17:53 ` Dani Moncayo
@ 2011-12-16 18:19 ` Juanma Barranquero
2011-12-16 18:31 ` Dani Moncayo
0 siblings, 1 reply; 10+ messages in thread
From: Juanma Barranquero @ 2011-12-16 18:19 UTC (permalink / raw)
To: Dani Moncayo; +Cc: Andreas Schwab, 10309
On Fri, Dec 16, 2011 at 18:53, Dani Moncayo <dmoncayo@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 18:19 ` Juanma Barranquero
@ 2011-12-16 18:31 ` Dani Moncayo
0 siblings, 0 replies; 10+ messages in thread
From: Dani Moncayo @ 2011-12-16 18:31 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Andreas Schwab, 10309
>> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 17:42 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between " Juanma Barranquero
2011-12-16 17:53 ` Dani Moncayo
@ 2011-12-16 19:32 ` Eli Zaretskii
1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2011-12-16 19:32 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: schwab, 10309
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Fri, 16 Dec 2011 18:42:22 +0100
> Cc: Andreas Schwab <schwab@linux-m68k.org>, 10309@debbugs.gnu.org
>
> On Fri, Dec 16, 2011 at 17:54, Dani Moncayo <dmoncayo@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode
2011-12-16 16:54 ` Dani Moncayo
2011-12-16 17:34 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while movingbetween " Drew Adams
2011-12-16 17:42 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between " Juanma Barranquero
@ 2012-01-07 8:12 ` Chong Yidong
2 siblings, 0 replies; 10+ messages in thread
From: Chong Yidong @ 2012-01-07 8:12 UTC (permalink / raw)
To: Dani Moncayo; +Cc: Andreas Schwab, 10309
Dani Moncayo <dmoncayo@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-01-07 8:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 12:45 bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between hunks in diff mode Dani Moncayo
2011-12-16 14:19 ` Andreas Schwab
2011-12-16 16:54 ` Dani Moncayo
2011-12-16 17:34 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while movingbetween " Drew Adams
2011-12-16 17:42 ` bug#10309: 24.0.92; [wishlist] Add an option to disable "auto-refining" while moving between " Juanma Barranquero
2011-12-16 17:53 ` Dani Moncayo
2011-12-16 18:19 ` Juanma Barranquero
2011-12-16 18:31 ` Dani Moncayo
2011-12-16 19:32 ` Eli Zaretskii
2012-01-07 8:12 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.