From: Ryo Furue <furue@hawaii.edu>
To: monnier@IRO.UMontreal.CA
Cc: bug-gnu-emacs@gnu.org, 4709@emacsbugs.donarmstrong.com
Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon
Date: Thu, 15 Oct 2009 08:26:54 -1000 (HST) [thread overview]
Message-ID: <20091015.082654.165304271.furue@hawaii.edu> (raw)
In-Reply-To: <jwvy6ncbswj.fsf-monnier+emacsbugreports@gnu.org>
Hi Stefan,
Thank you. You are so kind and patient.
| [. . . keyboard-translate is an obsolete feature . . .]
|
OK.
Now, I'm totally confused about the so-called "delete" key.
My original problem was that I want to delete the character
before the cursor with C-h . I thought emacs originally assigns
it to the "delete" key. But, it seems there's a confusion
in terminology. You see, I'm so ignorant about those "special"
keys :-) because I don't usually use them except for ESC
(which sits next to "1/!"), TAB, CTRL (which sits next to "A"),
and SHIFT. I can't type arrow keys, BACKSPACE, ALT, or DELETE,
without searching for them, looking at the keyboard.
| > 1) My delete key doesn't work in the first place. I don't know
| > what's wrong but it doesn't do anything on the bash prompt,
| > for example, and it doesn't delete the character before the cursor
| > on emacs (A message "End of Buffer" appears in the message line).
|
| That looks like a problem in itself which you may want to fix.
| What does C-h k <your delete key here> say?
The answer was surprising to me:
C-d (translated from <delete>) runs the command delete-char, which is
an interactive built-in function in `C source code'.
It is bound to <deletechar>, C-d.
I don't know who translates my "delete" to C-d. But, I've just
found that it does what C-d does.
I've also found that my BACKSPACE key seems to be what emacs
calls DEL:
DEL (translated from <backspace>) runs the command
backward-delete-char-untabify, which is an interactive compiled Lisp
function.
It is bound to DEL.
(By the way, I obtained these results on "/usr/bin/emacs23 -q", so
they are not affected by my ~/.emacs .)
So . . . for so many years, I've had the wrong notion that emacs
used the DELETE key (the one below "Insert" and to the left of "End"
on a Dell keyboard which I don't use but happen to find here) to
delete the character before the cursor. Because of this
misunderstanding, I was confusing you, I suppose. Sorry.
In any case, my problem stands the same because I don't use
BACKSPACE either (and I'd like to avoid it, if at all
possible).
| The invocation below:
|
| (define-key key-translation-map [?\C-h] [?\C-?])
|
| should do the trick.
Thank you very much for finding that out! That's much
better than keyboard-translate:
$ emacs --daemon
$ emacsclient -c
# key-translation is NOT effective.
# Evaluate (define-key key-translation-map [?\C-h] [?\C-?]).
# Exit.
$ emacsclient -c
# key-translation IS effective.
$ emacsclient -c -nw
# key-translation IS effective.
As you can see, the emacs daemon seems to ignore it
in your ~/.emacs and you still have to manually
evaluate it on an emacsclient. But, once you've evaluated
it, it seems to stick. That's a huge improvement.
Since my emacs daemon is sitting on my desktop for many
days, I can live with the current situation. Maybe
in the future, I hope the emacs daemon recognizes
key-translation-map in ~/.emacs.
Thank you again for your help.
Regards,
Ryo
next prev parent reply other threads:[~2009-10-15 18:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 20:37 bug#4709: 23.1; keyboard-translate not working with emacs daemon Ryo Furue
2009-10-14 13:25 ` Stefan Monnier
2009-10-14 21:07 ` Ryo Furue
2009-10-15 3:34 ` Stefan Monnier
2009-10-15 7:34 ` Ryo Furue
2009-10-15 15:22 ` Stefan Monnier
2009-10-15 18:26 ` Ryo Furue [this message]
2009-10-15 20:28 ` Stefan Monnier
2009-10-17 0:55 ` Ryo Furue
2009-10-17 2:22 ` Stefan Monnier
2009-10-17 3:19 ` Glenn Morris
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=20091015.082654.165304271.furue@hawaii.edu \
--to=furue@hawaii.edu \
--cc=4709@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
--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).