From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Adding xterm-extras to Emacs Date: Fri, 12 Oct 2007 12:18:38 -0400 Message-ID: References: <200709131658.l8DGw86P000060@oogie-boogie.ics.uci.edu> <200709140102.l8E12pVF020239@oogie-boogie.ics.uci.edu> <200709140130.l8E1U9Hi020965@oogie-boogie.ics.uci.edu> <200709140232.l8E2Wj0A022451@oogie-boogie.ics.uci.edu> <200709141638.l8EGcegt015804@oogie-boogie.ics.uci.edu> <200709150032.l8F0Wkix005504@oogie-boogie.ics.uci.edu> <200709211351.l8LDpEXR008997@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192206711 18605 80.91.229.12 (12 Oct 2007 16:31:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 16:31:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 18:31:50 2007 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.50) id 1IgNEE-0004fL-Ph for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 18:19:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgNE8-0000Ns-GZ for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 12:19:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgNE4-0000Mn-V7 for emacs-devel@gnu.org; Fri, 12 Oct 2007 12:19:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgNE3-0000Kk-I7 for emacs-devel@gnu.org; Fri, 12 Oct 2007 12:18:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgNE3-0000Kb-6y for emacs-devel@gnu.org; Fri, 12 Oct 2007 12:18:59 -0400 Original-Received: from x-132-204-252-255.xtpr.umontreal.ca ([132.204.252.255] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IgNDu-00051D-R3 for emacs-devel@gnu.org; Fri, 12 Oct 2007 12:18:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id F10EEB41BB; Fri, 12 Oct 2007 12:18:38 -0400 (EDT) In-Reply-To: (Leo's message of "Fri\, 12 Oct 2007 08\:18\:36 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:80727 Archived-At: >>> However, Alt+Ctrl+Right is shown as "" but not "" >>> while Alt+Right is shown as "" but not . You can see >>> they are _INCONSISTENT_. >> >> Can you check C-h l as well to see if Alt+Ctrl+Right sends ESC followed by >> the escape sequence for Ctrl+Right and if Alr+Right does the same. >> If not, then the inconsistency is in xterm and should be reported there >> (after reporting there, we may also decide to workaround the problem in >> Emacs by binding those escape sequences to M-right instead). > Yes, it looks like Alt+Ctrl+Right and Alt+Right send ESC. > Alt+Ctrl+Right ^[[1;7C > Alt+Right ^[[1;3C You mean "it looks like they *don't*"! The ESC you see are the first char of an escape sequence, not standalone ESC characters. What "metaSendsEscape" is supposed to do is to turn Alt+A into ESC A, so if Right sends ^[[C (aka ESC [ C), then Alt+Right should send ^[^[[C (aka ESC ESC [ C). Please report this as a feature request to xterm's maintainers. But looking at lisp/xterm.el now I see that we indeed inconsistently map things to S-M-foo but A-foo, so the inconsistency is our fault and should be corrected with the patch below, Stefan --- xterm.el 09 oct 2007 01:14:42 -0400 1.51 +++ xterm.el 12 oct 2007 11:28:38 -0400 @@ -89,18 +89,18 @@ (define-key map "\e[23;6~" [C-S-f11]) (define-key map "\e[24;6~" [C-S-f12]) - (define-key map "\eO3P" [A-f1]) - (define-key map "\eO3Q" [A-f2]) - (define-key map "\eO3R" [A-f3]) - (define-key map "\eO3S" [A-f4]) - (define-key map "\e[15;3~" [A-f5]) - (define-key map "\e[17;3~" [A-f6]) - (define-key map "\e[18;3~" [A-f7]) - (define-key map "\e[19;3~" [A-f8]) - (define-key map "\e[20;3~" [A-f9]) - (define-key map "\e[21;3~" [A-f10]) - (define-key map "\e[23;3~" [A-f11]) - (define-key map "\e[24;3~" [A-f12]) + (define-key map "\eO3P" [M-f1]) + (define-key map "\eO3Q" [M-f2]) + (define-key map "\eO3R" [M-f3]) + (define-key map "\eO3S" [M-f4]) + (define-key map "\e[15;3~" [M-f5]) + (define-key map "\e[17;3~" [M-f6]) + (define-key map "\e[18;3~" [M-f7]) + (define-key map "\e[19;3~" [M-f8]) + (define-key map "\e[20;3~" [M-f9]) + (define-key map "\e[21;3~" [M-f10]) + (define-key map "\e[23;3~" [M-f11]) + (define-key map "\e[24;3~" [M-f12]) (define-key map "\eO4P" [M-S-f1]) (define-key map "\eO4Q" [M-S-f2]) @@ -164,12 +164,12 @@ (define-key map "\e[1;8F" [C-M-S-end]) (define-key map "\e[1;8H" [C-M-S-home]) - (define-key map "\e[1;3A" [A-up]) - (define-key map "\e[1;3B" [A-down]) - (define-key map "\e[1;3C" [A-right]) - (define-key map "\e[1;3D" [A-left]) - (define-key map "\e[1;3F" [A-end]) - (define-key map "\e[1;3H" [A-home]) + (define-key map "\e[1;3A" [M-up]) + (define-key map "\e[1;3B" [M-down]) + (define-key map "\e[1;3C" [M-right]) + (define-key map "\e[1;3D" [M-left]) + (define-key map "\e[1;3F" [M-end]) + (define-key map "\e[1;3H" [M-home]) (define-key map "\e[2~" [insert]) (define-key map "\e[3~" [delete]) @@ -206,10 +206,10 @@ (define-key map "\e[5;8~" [C-M-S-prior]) (define-key map "\e[6;8~" [C-M-S-next]) - (define-key map "\e[2;3~" [A-insert]) - (define-key map "\e[3;3~" [A-delete]) - (define-key map "\e[5;3~" [A-prior]) - (define-key map "\e[6;3~" [A-next]) + (define-key map "\e[2;3~" [M-insert]) + (define-key map "\e[3;3~" [M-delete]) + (define-key map "\e[5;3~" [M-prior]) + (define-key map "\e[6;3~" [M-next]) (define-key map "\e[4~" [select]) (define-key map "\e[29~" [print]) @@ -425,18 +425,18 @@ (define-key map [f47] [C-S-f11]) (define-key map [f48] [C-S-f12]) - (define-key map [f49] [A-f1]) - (define-key map [f50] [A-f2]) - (define-key map [f51] [A-f3]) - (define-key map [f52] [A-f4]) - (define-key map [f53] [A-f5]) - (define-key map [f54] [A-f6]) - (define-key map [f55] [A-f7]) - (define-key map [f56] [A-f8]) - (define-key map [f57] [A-f9]) - (define-key map [f58] [A-f10]) - (define-key map [f59] [A-f11]) - (define-key map [f60] [A-f12]) + (define-key map [f49] [M-f1]) + (define-key map [f50] [M-f2]) + (define-key map [f51] [M-f3]) + (define-key map [f52] [M-f4]) + (define-key map [f53] [M-f5]) + (define-key map [f54] [M-f6]) + (define-key map [f55] [M-f7]) + (define-key map [f56] [M-f8]) + (define-key map [f57] [M-f9]) + (define-key map [f58] [M-f10]) + (define-key map [f59] [M-f11]) + (define-key map [f60] [M-f12]) map) "Keymap of possible alternative meanings for some keys.")