emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: add non-chord keys to repeat isearch


From: Drew Adams
Subject: RE: add non-chord keys to repeat isearch
Date: Wed, 10 Jun 2009 10:32:17 -0700

> > Precisely the point. Which do you repeat 14 times in a row, 
> > `scroll-up' or `isearch-repeat-forward'?
> 
> Scrolling up and down, actually.  Thought the "repetition" is 
> more often at different matches: something like C-s <next>
> <prior> C-s C-s <next> <prior> <next> C-s, ....

(That's not repetition. That's thrashing: scrolling once, then undoing the
scroll.  <next> <next> <next> is repeating.)

Just use `C-l'. Repeating it (twice) puts you back where you were. It works fine
with non-nil `isearch-allow-scroll' (thank you for that).

> > Using a chord to scroll is not a biggee. Especially since
> > apparently repeating `C-v' in Isearch has no effect.
> > If you can do `C-v' only once in a row, pinky can have no
> > complaint.
> 
> It's a biggee for me. It's having to shift between C-v and M-v.

Just use `C-l'.

> What happens often is that C-s finds a match 2 lines above 
> the bottom of the window, and you need to see the line just
> below the window to see if you've found the right match, yet.
> That bugged me so badly that I wrote the scrolling feature.

Just use `C-l'.

> <next> and <prior> are much easier to type alternately than 
> C-v and M-v.

`C-l' is even easier. Repeat, don't alternate at all. No need for two different
keys to do what you want, and no need to leave the home row of the keyboard.

> I do this often enough for it to matter to me.
> > > I quite often scroll up and down in rapid succession (in isearch),
>
> Actually, although I'm not in favour of making your bindings a
> standard default, I wouldn't be that vehement in arguing against them.

As a compromise, we could bind <next> and <prior> in Isearch to commands that do
what you want when `isearch-allows-scroll' is non-nil, and that repeat Isearch
when it is nil.

(I personally will use those keys for repeated Isearch even though I now use
non-nil `isearch-allows-scroll' (thank you) - but that's a personal
customization.)


Suggestion #1: Since repeated `C-v' and repeated `M-v' are no-ops in your
scrolling context, you might consider letting each of them toggle between the
two: scrolling up/down. That way, you could use `C-v C-v' or `M-v M-v' instead
of `C-v M-v' or `M-v C-v'. Just a suggestion. Either of those is slightly
shorter and less distracting than `C-l C-l C-l'.

But if you decide to make no change in this regard, at least provide some
feedback, to let users know that repeating the scrolling command is not supposed
to have any effect. Users naturally expect repeating these commands to keep
scrolling - let them know that not doing so is intended, not a bug.


Suggestion #2: Add some info to the doc string for `isearch-allow-scroll', to
let users know that it is not just "scrolling commands" (unclear just what that
means) that are affected, but any command whose symbol has non-nil property
`isearch-scroll'. That's important information for users:

1. It helps them discover that commands such as `C-l', which they might not
think of as "scrolling commands" can also work here. (`recenter' is mentioned in
the Emacs manual, but not in the doc string. BTW, `C-l' is no longer `recenter',
by default.)

2. It lets them know that _they_ can add or remove commands for which scrolling
is allowed, and how to do that. This feature means the option can act not only
as a general boolean - the behavior can be command-specific. This info is in the
Emacs manual, but it would help to mention it in the doc string - it has a major
impact on the option's behavior.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]