Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Emacs Bug: universal argument & key-translation-map disables undo.

17 views
Skip to first unread message

Xah Lee

unread,
Apr 10, 2011, 8:27:14 PM4/10/11
to
Emacs Bug: universal argument & key-translation-map disables undo.

This seems like a bug. Steps to reproduce:

• Start GNU Emacs 23.2 with “-Q”. (so it doesn't load any custome init
files.)

• Evaluate this: (define-key key-translation-map (kbd "M--") (kbd
"─")) (it lets you press 【Alt+-】 to insert a unicode char “BOX
DRAWINGS LIGHT HORIZONTAL” (U+2500).)

• Open a new buffer.

• Type 【C-u 30 M--】. (insert the char 30 times.)

• You get this error: universal-argument-other-key: Args out of range:
" ─", 0, 7

• Now, do Type 【C-u 30 M--】 again. This time, no problem.

• The worst problem is this: Now, when you try to undo, emacs says “No
further undo information”.

Notes: The exactly unicode char doesn't matter. The key used doesn't
seem to matter neither. Perhaps even unicode doesn't matter. The
problem seems to be using “key-translation-map” and with universal
argument.

Xah

Tassilo Horn

unread,
Apr 11, 2011, 2:36:27 AM4/11/11
to help-gn...@gnu.org
Xah Lee <xah...@gmail.com> writes:

Hi Xah,

> This seems like a bug. Steps to reproduce:
>
> • Start GNU Emacs 23.2 with “-Q”. (so it doesn't load any custome init
> files.)
>
> • Evaluate this: (define-key key-translation-map (kbd "M--") (kbd
> "─")) (it lets you press 【Alt+-】 to insert a unicode char “BOX
> DRAWINGS LIGHT HORIZONTAL” (U+2500).)
>
> • Open a new buffer.
>
> • Type 【C-u 30 M--】. (insert the char 30 times.)
>
> • You get this error: universal-argument-other-key: Args out of range:
> " ─", 0, 7

I can confirm that I get this error with Emacs 23.3. However, it seems
to be already fixed in the current bzr trunk. I'm not sure, but most
probably that fix has also been applied to the emacs-23 branch, so both
Emacs 24.1 and Emacs 23.5 should be ok when they are released.

Bye,
Tassilo


Xah Lee

unread,
Apr 11, 2011, 6:25:18 AM4/11/11
to

hi Tassilo,

that's interesting. Any idea what's the problem?

Xah

0 new messages