From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thomas Dickey Newsgroups: gmane.emacs.devel 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) Message-ID: <20100313182742.U88710@mail101.his.com> References: <873a04ysew.fsf@stupidchicken.com> <876350rmmx.fsf@stupidchicken.com> <20100313220934.GA23155@psychosis.jim.sh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: dough.gmane.org 1268538762 4853 80.91.229.12 (14 Mar 2010 03:52:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 14 Mar 2010 03:52:42 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, dickey@invisible-island.net, 5541@debbugs.gnu.org To: Jim Paris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 14 04:52:37 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NqesX-0002jj-4C for ged-emacs-devel@m.gmane.org; Sun, 14 Mar 2010 04:52:37 +0100 Original-Received: from localhost ([127.0.0.1]:47147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqesW-0003zK-Re for ged-emacs-devel@m.gmane.org; Sat, 13 Mar 2010 22:52:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqbDR-0007jH-7U for emacs-devel@gnu.org; Sat, 13 Mar 2010 18:57:57 -0500 Original-Received: from [140.186.70.92] (port=46999 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqbDP-0007hb-NP for emacs-devel@gnu.org; Sat, 13 Mar 2010 18:57:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NqbDN-0008RI-Vm for emacs-devel@gnu.org; Sat, 13 Mar 2010 18:57:55 -0500 Original-Received: from pgh-220.his.com ([75.149.19.220]:52444 helo=smtp602.his.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NqbDN-0008RA-PK; Sat, 13 Mar 2010 18:57:53 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by smtp602.his.com (Postfix) with ESMTP id BF2D880C003; Sat, 13 Mar 2010 18:57:51 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at smtp602.his.com Original-Received: from smtp602.his.com ([127.0.0.1]) by localhost (smtp602.his.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qol4nHMjrFZu; Sat, 13 Mar 2010 18:57:50 -0500 (EST) Original-Received: from mail101.his.com (dc-131.his.net [72.66.110.131]) by smtp602.his.com (Postfix) with ESMTP id 360282A417C; Sat, 13 Mar 2010 18:57:50 -0500 (EST) Original-Received: from mail101.his.com (localhost [127.0.0.1]) by mail101.his.com (8.14.3/8.13.3) with ESMTP id o2DNvnuq052365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Mar 2010 18:57:49 -0500 (EST) (envelope-from dickey@his.com) Original-Received: from localhost (dickey@localhost) by mail101.his.com (8.14.3/8.13.4/Submit) with ESMTP id o2DNvnel052361; Sat, 13 Mar 2010 18:57:49 -0500 (EST) (envelope-from dickey@his.com) X-Authentication-Warning: mail101.his.com: dickey owned process doing -bs In-Reply-To: <20100313220934.GA23155@psychosis.jim.sh> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sat, 13 Mar 2010 22:50:29 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121934 Archived-At: On Sat, 13 Mar 2010, Jim Paris wrote: > Chong Yidong wrote: >> Glenn Morris 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 : insert-selection(CLIPBOARD)\n \ > Ctrl ~Shift Meta -: smaller-vt-font() \n \ > Ctrl ~Shift Meta =: 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