unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: 'Emacs-Devel devel' <emacs-devel@gnu.org>
Subject: Re: add non-chord keys to repeat isearch
Date: Tue, 9 Jun 2009 17:48:07 +0000	[thread overview]
Message-ID: <20090609174807.GC11634@muc.de> (raw)
In-Reply-To: <8D5E1C403AD94F20A406381F2679E64A@us.oracle.com>

Hi, Drew!

On Tue, Jun 09, 2009 at 10:08:34AM -0700, Drew Adams wrote:
> > Please don't.  These two keys are already used in Isearch Mode for
> > scrolling.  To see this, set `isearch-allow-scroll' to t.  Then <next>
> > and <prior> are handy keys for seeing more text around the 
> > match without having to leave isearch and start again.

> (I wasn't aware of that option. I've just filed a bug to index it in
> the Emacs manual.)

> However, just because some binding was made previously (when someone
> first had the idea of scrolling without exiting Isearch) is no reason
> not to reconsider that binding in light of a better suggestion. Emacs
> is not purely first-come-first-served.

That someone was me, by the way.

> `M-v' and `C-v' can be used for scrolling (when the option is non-nil).
> And `<prior>' and `<next>' can be used for repeat search. There's room
> for all.

What about people's poor pinkies while operating those key sequences?
;-)

Of course, another idea would be to allow C-s (etc.) to get a repeat
count - wouldn't be at all hard to do.  C-u C-u C-s could take you a
long, long way.

> [BTW, scrolling during isearch doesn't seem to work beyond a single
> screen height. Is that a bug or a feature? IOW, `C-s C-v C-v': the
> second `C-v' has no effect.]

It's a feature as far as I'm concerned, a bug to a few others.  In Emacs,
point is always in the Window, so this carries over quite naturally to
the whole isearch match staying in the window, too.  The other design
alternative would have been to allow point to scroll to the top/bottom of
the window even when that would put part of the match outside it.

As a matter of interest, you can give a repeat count to scroll that
number of lines.

> > The same applies to any keys bound to commands which have the
> > `isearch-scroll' non-nil.

> That's fine, but a specific key binding can override that. We can
> choose to bind `<prior>' to `isearch-repeat-backward' even though
> `scroll-up' has non-nil property `isearch-scroll'. Works fine. There is
> no need to sacrifice all keys that might be bound globally to
> `scroll-up'.

For consistency, the same operation (modulo your above comment) should
have the same key binding(s) inside and outside Isearch Mode.  If any
(non self-inserting) keys have a standard meaning throughout "all"
computer programs, it's surely <prior> and <next>.

Another argument in their favour is that anybody who's scrolling up and
down within Isearch is in a mode where there's no cost in using keys not
in the home position.  I quite often scroll up and down in rapid
succession (in isearch), and would find switching between C-v and M-v
intolerably awkward.

-- 
Alan Mackenzie (Nuremberg, Germany).




  parent reply	other threads:[~2009-06-09 17:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 15:44 add non-chord keys to repeat isearch Drew Adams
2009-06-09 15:51 ` Deniz Dogan
2009-06-09 15:59   ` Drew Adams
2009-06-09 16:47 ` Alan Mackenzie
2009-06-09 17:08   ` Drew Adams
2009-06-09 17:45     ` Deniz Dogan
2009-06-09 17:48     ` Alan Mackenzie [this message]
2009-06-09 18:27       ` Drew Adams
2009-06-09 19:56         ` Alan Mackenzie
2009-06-10 17:32           ` Drew Adams
2009-06-14 17:12             ` Alan Mackenzie
2009-06-09 23:06         ` Miles Bader
2009-06-10 17:32           ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090609174807.GC11634@muc.de \
    --to=acm@muc.de \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).