emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#5541: 23.1; after upgrading to emacs-23, meta key in xterm no lo


From: Thomas Dickey
Subject: Re: bug#5541: 23.1; after upgrading to emacs-23, meta key in xterm no longer works
Date: Sat, 13 Mar 2010 18:57:49 -0500 (EST)

On Sat, 13 Mar 2010, Jim Paris wrote:

Chong Yidong wrote:
Glenn Morris <address@hidden> writes:

Does anyone on this list have xterm-253 available to test?

Yes.

With "emacs23 -nw" running inside xterm-253, my meta key does not work
for things like M-x.  Instead, the terminal bell beeps, and the string
;120~ appears in the buffer.

Something similar happens for me too (and with the trunk).

And does xterm-24* behave OK?

It's possible this is a bug in xterm-253, which would be why Sven
Joachim does not see it on xterm-255.

I did some more testing and it only happens on some of my systems.
Turns out the problem shows up when this .Xresources setting is
present:

! Shift-paste to paste CLIPBOARD instead of PRIMARY.
xterm*VT100.Translations: #override \
        Shift <Btn2Up>: insert-selection(CLIPBOARD)\n \
        Ctrl ~Shift Meta <Key>-: smaller-vt-font() \n \
        Ctrl ~Shift Meta <Key>=: larger-vt-font() \n

That's worked for me forever... I have no idea why it would cause new
versions of emacs to act funny.  CCing Thomas Dickey, any ideas?
The original report is at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5541

The various key-modifier resources are all ifdef'd as a single group
(no escape sequence is implemented to disable the feature).  I suppose
emacs is checking the version number from xterm to decide if the feature
is present, since there's no other indication that it's available.

xterm generally doesn't know what the translations do, but it does check if the meta key appears in a translation. For that, and alt, xterm decides to not use those in modified function-keys - to try to avoid odd conflicts with cases such as this translation. (They may be the same key - same general effect). But the particular combination caught by the translations wouldn't be seen by xterm; it only massages the seen keycodes.

The escape sequence says xterm's sending a 3 (for alt). Perhaps it's something along the lines of xterm deciding that meta isn't part of the modify-other-keys feature, but alt (on the same key) still is. I assume that emacs is looking for 9 (meta) rather than 3 (alt), and so it errors out.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]