Article View: gnu.misc.discuss
Article #2191backspace and help keys, and future versions of Emacs
From: Erik Naggum
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
86 lines
4425 bytes
4425 bytes
(this was already posted to gnu.emacs.bug, which removed the cross-posting.)
this is a solicitation of user feedback on solutions to a problem some feel
is pressing. if you try any of this out and want to share you experiences,
please mail the to <emacs@naggum.no>. if you want to discuss the options I
have listed, please use gnu.misc.discuss.
problem:
Emacs' universal help key (C-h) conflicts with user settings and
terminals where C-h means deleting the previous input character.
requirements for a solution:
(1) MUST NOT CHANGE ANYTHING FOR USERS WHO ARE USING C-h FOR HELP.
(2) both help and delete-backward-char must be easily available on
terminals that have the backspace problem to begin with.
suggestions:
(1) make C-x ?, M-?, and/or M-h be the canonical help-command binding(s).
this is what you type to get help like apropos-command, info,
describe-mode, etc.
in a standard Emacs, you can obtain these settings by appending the
following lines to your .emacs.
(define-key ctl-x-map "?" 'help-command)
(define-key esc-map "?" 'help-command)
(define-key esc-map "h" 'help-command) ;was `mark-paragraph'
if you think one or more of the key bindings don't work, are cumbersome
to use, or screw up something, please let me know. if you favor one
strongly over the others, please tell me. if you think one or more of
these should _not_ be help keys, also let me know.
(2) make ? be the _normal_ help-char. this is what you type to get help
inside various modes, and also what you type to get a list of
keybindings after a prefix. e.g., C-x r ? gives a list of rectangle
commands.
append the following line to your .emacs file.
(setq help-char ??)
if this causes any trouble with existing bindings, please let me know.
(3) terminal-dependent settings. these will be automated in the future,
but please test them both under all possible conditions.
(3A) for terminals on which C-h IS available, retain the binding, and add
it to the other help events.
(setq help-event-list (cons ?\C-h help-event-list))
if this causes help on C-h to be unavailable where it was available
before, please let me know.
(3B) for terminals on which C-h IS NOT available, append the following
lines to your .emacs file to make C-h behave exactly as DEL:
(define-key global-map "\C-h" nil)
(or key-translation-map (setq key-translation-map (make-sparse-keymap))
(define-key key-translation-map "\C-h" [127])
this asks Emacs to treat C-h in terminal mode like DEL, just as it
treats the backspace and delete keys under X, namely as low-level
aliases for the delete character. key-translation-map is used only
for individual keys, not when used with modifiers. e.g., ESC C-h is
interpreted as ESC DEL, but M-C-h is still M-C-h. this is likely to
cause some confusion. if you have any trouble with this, please let
me know which bindings are affected -- it is not obvious which is the
right solution: to add them to the key-translation-map, or to let them
be distinguished because people type M-C-h, not M-<backspace>.
PLEASE -- I know what you _don't_ like, so there is no need to repeat it.
I'm trying to find out what you _do_ like, so perhaps I can make it so, and
help avoid more complaints in the future. also, please note the first
requirement for a solution above: this WILL NOT AFFECT C-h as the help key
on terminals or keyboards that do not have any problems with it now, so
there is no need to object to any adverse changes because there won't be
any.
#\Erik
Technical Details
Message-ID:
<3057840712725203@naggum.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,184df76797d60d4e,start X-Google-Attributes: gid103b8b,public X-Google-Thread: 1025b4,184df76797d60d4e,start X-Google-Attributes: gid1025b4,public X-Google-Thread: 102b9a,184df76797d60d4e,start X-Google-Attributes: gid102b9a,public From: Erik Naggum <emacs@naggum.no> Subject: backspace and help keys, and future versions of Emacs Date: 1996/11/24 Message-ID: <3057840712725203@naggum.no> X-Deja-AN: 198429316 supersedes: <3057840009505063@naggum.no> followup-to: gnu.misc.discuss organization: Naggum Software; +47 2295 0313; http://www.naggum.no newsgroups: gnu.misc.discuss,gnu.emacs.help,comp.emacs