* bug#9417: digit-argument doesn't work with `key-translation-map'
@ 2011-09-01 10:26 Le Wang
2011-09-02 2:37 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Le Wang @ 2011-09-01 10:26 UTC (permalink / raw)
To: 9417
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.
In Emacs 23, the behavior is slightly different. C-1 C-j calls
`eval-print-last-sexp' withing the final C-f key chord.
--
Le
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#9417: digit-argument doesn't work with `key-translation-map'
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
2011-09-02 2:52 ` 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
2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2011-09-02 2:37 UTC (permalink / raw)
To: Le Wang; +Cc: 9417
>>>>> "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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#9417: digit-argument doesn't work with `key-translation-map'
2011-09-02 2:37 ` Stefan Monnier
@ 2011-09-02 2:52 ` Le Wang
2011-09-03 13:28 ` Le Wang
0 siblings, 1 reply; 6+ messages in thread
From: Le Wang @ 2011-09-02 2:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 9417
On Fri, Sep 2, 2011 at 10:37 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> I hope you meant "Bazaar head" since we stopped using CVS a few
> years ago.
I used the git mirror git://git.savannah.gnu.org/emacs.git .
--
Le
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#9417: digit-argument doesn't work with `key-translation-map'
2011-09-02 2:52 ` Le Wang
@ 2011-09-03 13:28 ` Le Wang
0 siblings, 0 replies; 6+ messages in thread
From: Le Wang @ 2011-09-03 13:28 UTC (permalink / raw)
To: Stefan Monnier, xahlee, Tassilo Horn; +Cc: 9417
Adding Xah, Tassilo. I arrived at this independently, but Xah blogged
about it here:
http://xahlee.blogspot.com/2011/04/emacs-bug-using-universal-argument-to.html
there was a discussion on gnu.emacs.help here:
https://groups.google.com/group/gnu.emacs.help/browse_thread/thread/a7b3cb2605b33646?pli=1
Tassilo, you mentioned in this thread that it was fixed in the trunk.
Can you clarify?
On Fri, Sep 2, 2011 at 10:52 AM, Le Wang <l26wang@gmail.com> wrote:
> On Fri, Sep 2, 2011 at 10:37 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>> I hope you meant "Bazaar head" since we stopped using CVS a few
>> years ago.
>
> I used the git mirror git://git.savannah.gnu.org/emacs.git .
>
> --
> Le
>
--
Le
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#9417:
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
@ 2011-10-13 2:11 ` mmpedros
2021-09-07 18:02 ` bug#9417: digit-argument doesn't work with `key-translation-map' Lars Ingebrigtsen
2 siblings, 0 replies; 6+ messages in thread
From: mmpedros @ 2011-10-13 2:11 UTC (permalink / raw)
To: 9417
Recipe:
1. emacs -Q
2. eval-region
(define-key key-translation-map [?\C-x] [?\C-u])
(define-key key-translation-map [?\C-u] [?\C-x])
3. C-u M-x eshell
Expected: open eshell
Result: "eeeeshell" is inserted
Further details:
+ Emacs version 23.3.1 in an Archlinux box.
+ If I type `C-u M-x M-x eshell' (i.e., M-x twice) it works as expected
(i.e., eshell opens).
Thanks!
mak
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#9417: digit-argument doesn't work with `key-translation-map'
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
2011-10-13 2:11 ` bug#9417: mmpedros
@ 2021-09-07 18:02 ` Lars Ingebrigtsen
2 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-07 18:02 UTC (permalink / raw)
To: Le Wang; +Cc: 9417
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'
Le Wang <l26wang@gmail.com> writes:
> Tassilo, you mentioned in this thread that it was fixed in the trunk.
> Can you clarify?
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I'm unable to reproduce this problem in Emacs 28, so I guess Tassilo was
correct here, and I'm closing this bug report. If there's still some
issues here, please respond to the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-07 18:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).