unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Juri Linkov'" <juri@jurta.org>
Cc: 3746@emacsbugs.donarmstrong.com, 'Dan Nicolaescu' <dann@ics.uci.edu>
Subject: bug#3746: M-r in comint mode should use isearch
Date: Thu, 9 Jul 2009 08:01:43 -0700	[thread overview]
Message-ID: <84007A40B39D4D1F97E2E01F3B07B59F@us.oracle.com> (raw)
In-Reply-To: <87zlbf1kr0.fsf@mail.jurta.org>

> > The general objection is rather Occam's razor: _Why_ add 
> > such complexity? What is gained? Occasionally the added
> > convenience of having a single key to use makes a DWIM
> > command worth it. But usually not.
> 
> This case is an exception.

I leave that to your judgment; I can't speak to that.

> C-r is the most frequent key I use in bash running in xterm because
> it is very convenient to search for old commands in the shell history.
> I suppose the same is true for other users.
> 
> Using a different key in Emacs for the same functionality
> will cause too much trouble.  Just imagine when you have a habit
> typing C-r to search on the shell history, typing it in the Emacs
> shell buffer will not do what you mean.  This recalls that
> Emacs has a different key M-r.  Then switching back to xterm
> and typing M-r: Ahh, that M-r is valid only in Emacs,
> but in xterm it is C-r.  Arrrgh!
> 
> I think having two different keys for the same functionality
> (C-r and M-r for Isearch on the history) is worse than having
> the same key for different contexts (the shell prompt or the
> rest of the shell buffer).

The alternative is not necessarily to have two completely different keys. The
typical, traditional, and simpler approach is to use the same key but still
allow two behaviors and keep the behavior distinction under explicit user
control: Initiate one of the two behaviors using `C-u'. Depending on context is
far more complicated.

And depending on context doesn't necessarily mean fewer keystrokes (even though
you never need to hit `C-u'): If the cursor is not in the right place for the
particular behavior you want, then you must first move it there. I'm not sure
that anything significant is gained by the approach you propose, except added
complexity. `C-r' for history search and `C-u C-r' for normal search seems
reasonable, to me.

But it's your call, of course.






  parent reply	other threads:[~2009-07-09 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ocmknicw.fsf@mail.jurta.org>
2009-07-03 13:26 ` bug#3746: M-r in comint mode should use isearch Dan Nicolaescu
2009-07-03 23:36   ` Juri Linkov
2009-07-05 15:03     ` Dan Nicolaescu
2009-07-07  0:09       ` Juri Linkov
2009-07-07  1:21         ` Dan Nicolaescu
2009-07-08  0:45           ` Juri Linkov
2009-07-08  5:53             ` Drew Adams
2009-07-08 23:27               ` Juri Linkov
2009-07-08 23:42                 ` Lennart Borgman
2009-07-09 15:01                 ` Drew Adams [this message]
2009-07-09 22:16                   ` Juri Linkov
2009-07-09 22:32                     ` Drew Adams
2009-07-09 23:05                       ` Juri Linkov
2009-07-09 23:15                         ` Drew Adams
2009-07-08 23:49             ` Dan Nicolaescu
2009-07-09 22:19               ` Juri Linkov
2009-11-19 17:30                 ` Juri Linkov
2009-11-19 21:12                   ` Stefan Monnier
2009-11-20  9:28                     ` Juri Linkov
2009-11-23 20:39                     ` Juri Linkov
2009-11-30 16:30   ` bug#3746: marked as done (M-r in comint mode should use isearch) Emacs bug Tracking System

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=84007A40B39D4D1F97E2E01F3B07B59F@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=3746@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    --cc=juri@jurta.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).