From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Le Wang <l26wang@gmail.com>
Cc: 9417@debbugs.gnu.org
Subject: bug#9417: digit-argument doesn't work with `key-translation-map'
Date: Thu, 01 Sep 2011 22:37:44 -0400 [thread overview]
Message-ID: <jwvmxen3dli.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAM=K+iozZhrSLjjLy9GoKO9=84ZEpEMybgzQXJROXKqpk=6Rbw@mail.gmail.com> (Le Wang's message of "Thu, 1 Sep 2011 18:26:34 +0800")
>>>>> "Le" == Le Wang <l26wang@gmail.com> writes:
> repro:
> 1. emacs -Q
> 2. eval-region:
> (define-key key-translation-map [(control x)] [(control j)])
> (define-key key-translation-map [(control j)] [(control x)])
> 3. C-1 C-j C-f
> expectation: call `find-file'
> actual: call binding of C-j `eval-print-last-sexp'
> Emacs version: CVS Head built today on Windows 7.
I hope you meant "Bazaar head" since we stopped using CVS a few
years ago.
I think the problem is that universal-argument-other-key reads the key
just pressed with this-command-keys (which is the key after translation)
and then puts it into unread-command-events which will cause this key to
be re-translated.
My experience is that reading an event and putting it back into
unread-command-events is something fiendishly difficult to do right,
which prompted me to develop set-temporary-overlay-map, but this is not
ready for 24.1 (and it may never be ready, since it may come with
its own set of problems).
> In Emacs 23, the behavior is slightly different. C-1 C-j calls
> `eval-print-last-sexp' withing the final C-f key chord.
And in both Emacs23 and current Bzr head, C-u 1 C-j gives me
Args out of range: " C-x", 0, 5
tho it seems to depend on what I've done before. This seems to be
a separate bug.
Stefan
next prev parent reply other threads:[~2011-09-02 2:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 10:26 bug#9417: digit-argument doesn't work with `key-translation-map' Le Wang
2011-09-02 2:37 ` Stefan Monnier [this message]
2011-09-02 2:52 ` Le Wang
2011-09-03 13:28 ` Le Wang
2011-10-13 2:11 ` bug#9417: mmpedros
2021-09-07 18:02 ` bug#9417: digit-argument doesn't work with `key-translation-map' Lars Ingebrigtsen
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=jwvmxen3dli.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=9417@debbugs.gnu.org \
--cc=l26wang@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.