unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: joakim@verona.se, emacs-devel@gnu.org
Subject: Re: binding c-h in isearch
Date: Fri, 18 Apr 2008 02:14:05 +0300	[thread overview]
Message-ID: <87d4oom6fm.fsf@jurta.org> (raw)
In-Reply-To: <jwvr6d5esbx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 16 Apr 2008 11:28:12 -0400")

> There's the following code in isearch.el:
>
>     ;; Turned off because I find I expect to get the global definition--rms.
>     ;; ;; Instead bind C-h to special help command for isearch-mode.
>     ;; (define-key map "\C-h" 'isearch-mode-help)
>
> So it seems that Richard found it inconvenient.  Could someone try and
> work out some clever way to reconcile the two functionalities?

I think a good binding for C-h in isearch-mode would be the following:

    (define-key isearch-mode-map "\C-h" help-map)

I gives what Richard wants since it uses the global definition of C-h,
and still it is intuitive to use just like its global definition when
a minor mode is active:

C-h m describes the isearch mode among other minor modes,

C-h b displays all isearch keybindings at the beginning of a list of all
      global keybindings (since it lists keys of minor modes first),

C-h k describes a key of isearch-mode that is natural to expect
      when C-h k is typed when isearch mode is active, so `C-h k C-w'
      will display:

  C-w runs the command isearch-yank-word-or-char, which is an
  interactive compiled Lisp function in `isearch.el'.

  (isearch-yank-word-or-char)

  Pull next character or word from buffer into search string.

-- 
Juri Linkov
http://www.jurta.org/emacs/




  parent reply	other threads:[~2008-04-17 23:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16 12:10 binding c-h in isearch joakim
2008-04-16 13:30 ` Lennart Borgman (gmail)
2008-04-16 22:35   ` Lennart Borgman (gmail)
2008-04-16 15:28 ` Stefan Monnier
2008-04-16 17:44   ` Paul R
2008-04-17 19:25   ` joakim
2008-04-17 23:14   ` Juri Linkov [this message]
2008-04-18  0:42     ` Stefan Monnier
2008-04-19 20:07       ` Juri Linkov
2008-04-19 20:49         ` Lennart Borgman (gmail)
2008-04-19 22:52           ` Juri Linkov
2008-04-20  0:53             ` Lennart Borgman (gmail)
2008-04-20 23:51               ` Juri Linkov
2008-04-21  0:13                 ` Lennart Borgman (gmail)
2008-04-19 20:57         ` Stefan Monnier
2008-04-19 22:49           ` Juri Linkov
2008-04-18 10:59     ` Johan Bockgård
2008-04-19 21:20   ` Drew Adams
2008-04-19 21:49     ` Stefan Monnier
2008-04-19 22:39       ` Drew Adams
2008-04-19 22:59     ` Juri Linkov
2008-04-19 23:39       ` 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=87d4oom6fm.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    --cc=monnier@iro.umontreal.ca \
    /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).