all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'YSK'" <koyfman@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: redefine C-h
Date: Sun, 10 Aug 2008 21:07:40 -0700	[thread overview]
Message-ID: <005201c8fb67$cc429ce0$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <c4957ad3-0922-4725-bced-12e6cbd799ab@r66g2000hsg.googlegroups.com>

> > Icicles does not bind `C-h'. `C-h' with Icicle mode is the 
> > same as it is without it.
>
> I must have turned on an icicles setting to override these keys,
> since commenting out these lines in icicles-mode.el gave me the
> C-h behavior I was looking for:
> 
> ;    (icicle-remap 'where-is 'icicle-where-is
> ;                  icicle-mode-map (current-global-map)) ; `C-h w'
> ;    (define-key icicle-mode-map "\C-h\C-o" 'icicle-describe-option-
>       of-type) ; `C-h C-o'

1. That should have nothing to do with your binding of `C-h'.

2. The right way to remove those Icicle mode bindings, if you want to, is to
customize option `icicle-top-level-key-bindings', as I mentioned. That is the
way to customize all top-level (i.e., non-minibuffer) Icicles bindings. You
don't need to know any Lisp to do this; it's very simple.

> I'm not exactly sure why, actually. Possibly I made another change at
> around the same time that I can't recall right now that actually
> "fixed" my C-h issue.

I expect so. I don't think Icicles is related to your problem in any way.

> > Similarly, for `C-M-h': Icicles should not affect it....
> 
> Yes, C-M-h worked correctly right away. It's the 'C-h' rebinding that
> was not taking.

Others have explained why. See below for a summary recipe.

> > Icicle mode does, however make some changes in the 
> > minibuffer keymaps. One that is pertinent here is that
> > it remaps command `delete-backward-char' to
> > `icicle-delete-backward-char' in the minibuffer completion 
> > keymaps. This is so that whenever you delete a character
> > in the minibuffer the set of candidate completions is
> > updated to reflect your edited input...
> 
> Yes..I would prefer to keep the iciciles minibuffer features intact
> since I do use icicles entirely for its minibuffer enhancements.
>
> In my current setup, C-h does do the right thing in the minibuffer -
> delete the char before point, and update the completion list.

And it does the right thing outside the minibuffer too, right? Doesn't it delete
a char there too? If so, then the only thing that is not yet working is `C-M-h'
for `help-command', is that correct? Or is that working now also?

The following should do what you need. It should work whether or not you use
Icicles (it does for me).

(global-set-key "\C-h" 'delete-backward-char)
(setq help-char ?\C-\M-h)
(define-key global-map (char-to-string help-char) 'help-command)

`C-M-h w' should then give you `where-is', and so on.

Note, BTW, that `C-M-h C-h' gives you `help-for-help' - don't expect this to be
`C-M-h C-M-h'.



[Instead of using `setq' to set `help-char', you can use Customize:
`M-x customize-option help-char'.
In the Customize buffer, type: C-q C-M-h
(that is, Control-q key followed by Control-Meta-h chord)

`C-q' quotes the key you hit after it. You will see \210 as the displayed new
value of `help-char' in Customize, but that's OK. (Sometimes Customize is less
user-friendly than Lisp. ;-))

But you might as well just use (setq help-char ?\C-\M-h), to keep all of this
stuff together.]





      reply	other threads:[~2008-08-11  4:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 17:13 redefine C-h YSK
2008-08-09  1:45 ` Joel J. Adamson 
2008-08-09 14:14 ` Kevin Rodgers
     [not found] ` <mailman.16197.1218291299.18990.help-gnu-emacs@gnu.org>
2008-08-09 16:00   ` YSK
2008-08-10 18:40     ` Xah
2008-08-11  1:10       ` YSK
2008-08-10 17:36 ` YSK
2008-08-11  0:41   ` Drew Adams
     [not found]   ` <mailman.16321.1218415295.18990.help-gnu-emacs@gnu.org>
2008-08-11  1:00     ` YSK
2008-08-11  4:07       ` Drew Adams [this message]

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

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

  git send-email \
    --in-reply-to='005201c8fb67$cc429ce0$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=koyfman@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.