unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Dickey <dickey@his.com>
To: Jim Paris <jim@jtan.com>
Cc: Chong Yidong <cyd@stupidchicken.com>,
	5541@debbugs.gnu.org, dickey@invisible-island.net,
	emacs-devel@gnu.org
Subject: 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)	[thread overview]
Message-ID: <20100313182742.U88710__40602.9459358708$1268600982$gmane$org@mail101.his.com> (raw)
In-Reply-To: <20100313220934.GA23155@psychosis.jim.sh>

On Sat, 13 Mar 2010, Jim Paris wrote:

> Chong Yidong wrote:
>> Glenn Morris <rgm@gnu.org> 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






  parent reply	other threads:[~2010-03-13 23:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <873a04ysew.fsf@stupidchicken.com>
2010-02-07 19:55 ` bug#5541: 23.1; after upgrading to emacs-23, meta key in xterm no longer works Jim Paris
2010-03-13 18:42   ` Chong Yidong
2010-03-13 19:57   ` Glenn Morris
2010-03-13 19:10 ` Sven Joachim
     [not found] ` <xdk4tggfk7.fsf@fencepost.gnu.org>
2010-03-13 20:29   ` Chong Yidong
     [not found]   ` <876350rmmx.fsf@stupidchicken.com>
2010-03-13 22:09     ` Jim Paris
     [not found]     ` <20100313220934.GA23155@psychosis.jim.sh>
2010-03-13 23:57       ` Thomas Dickey [this message]
     [not found]       ` <20100313182742.U88710@mail101.his.com>
2010-03-19 15:19         ` Chong Yidong
2010-03-14 19:05     ` 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='20100313182742.U88710__40602.9459358708$1268600982$gmane$org@mail101.his.com' \
    --to=dickey@his.com \
    --cc=5541@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=dickey@invisible-island.net \
    --cc=emacs-devel@gnu.org \
    --cc=jim@jtan.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 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).