[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Showing all sequences bound to a prefix?
From: |
Drew Adams |
Subject: |
RE: Showing all sequences bound to a prefix? |
Date: |
Wed, 2 Sep 2009 09:40:41 -0700 |
> > > > how can you know all keybindings which start with a key?
> > > > For instance, "C-h c" asks me to enter a key. If I enter
> > > > "C-w" it waits for more input, which means that "C-w"
> > > > is a prefix.
> > >
> > > Use C-h, e.g. `C-x r C-h' will show you all key bindings
> > > starting with `C-x r'.
> >
> > That doesn't always work. Try C-s C-h, for instance.
>
> C-s is not a key sequence
Huh? The only reason `C-s C-h' does not work (show you the isearch bindings) is
because RMS did not want it to work. He prefers that `C-h' break out of isearch
(and so initiate global help).
(isearch+.el does let `C-s C-h' give you isearch help, including listing all of
the bindings - http://www.emacswiki.org/emacs/IsearchPlus)
> in that case you can always use C-h k.
How will C-h k help you discover the isearch keys? Sure, if you already know
that `C-s M-s w' is one of the isearch keys, then you can use `C-h k C-s M-s w'
to discover that its command is `isearch-toggle-word'. But you can't discover
the keys using `C-h k' (except by trying all keys).
`C-h f isearch-forward' gives you information about the isearch keys.
Another possibility for listing the keys in the `isearch-mode-map' is to use
library help-fns+.el, and use `C-h C-k isearch-mode-map'.
http://www.emacswiki.org/emacs/HelpPlus
> Do you have a better example for when C-h breaks?
Not offhand. I used to know some, but things change with every version of Emacs,
and I've fixed this long ago locally, so I don't keep track of which
combinations don't work in vanilla Emacs. Maybe `C-s C-h' is the only one
nowadays - dunno.
> I agree that it is not guaranteed to work, but it's a well
> established convention not to bind C-h in a key sequence to
> something else.
Agreed: (a) it might not work (my point), and (b) it's good to let it work, when
it does.
And it's good that you mentioned `C-h' as a means to discover the suffix keys
for a prefix key. I just wanted to point out that it might not work in some
cases.
- Showing all sequences bound to a prefix?, Elena, 2009/09/02
- Re: Showing all sequences bound to a prefix?, Anselm Helbig, 2009/09/02
- RE: Showing all sequences bound to a prefix?, Drew Adams, 2009/09/02
- Message not available
- Re: Showing all sequences bound to a prefix?, Anselm Helbig, 2009/09/02
- RE: Showing all sequences bound to a prefix?,
Drew Adams <=
- Re: Showing all sequences bound to a prefix?, Kevin Rodgers, 2009/09/03
- RE: Showing all sequences bound to a prefix?, Drew Adams, 2009/09/03
- Message not available
- Re: Showing all sequences bound to a prefix?, Anselm Helbig, 2009/09/03
- RE: Showing all sequences bound to a prefix?, Drew Adams, 2009/09/03
- Re: Showing all sequences bound to a prefix?, Bernardo, 2009/09/03
Re: Showing all sequences bound to a prefix?, Peter Dyballa, 2009/09/02
RE: Showing all sequences bound to a prefix?, Drew Adams, 2009/09/02
Message not available