From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: Re: inconsistent bindings of backspace and delete between X and xterm Date: Sat, 07 Feb 2004 15:38:03 +0100 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1076164919 1922 80.91.224.253 (7 Feb 2004 14:41:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Feb 2004 14:41:59 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 07 15:41:53 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ApTeb-00007D-00 for ; Sat, 07 Feb 2004 15:41:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ApTe3-0000VA-JX for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Feb 2004 09:41:19 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ApTe0-0000UP-R6 for bug-gnu-emacs@gnu.org; Sat, 07 Feb 2004 09:41:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ApTdU-0000Kv-02 for bug-gnu-emacs@gnu.org; Sat, 07 Feb 2004 09:41:15 -0500 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ApTdT-0000KV-E1 for bug-gnu-emacs@gnu.org; Sat, 07 Feb 2004 09:40:43 -0500 Original-Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 3B94C16E94C; Sat, 7 Feb 2004 15:40:41 +0100 (CET) Original-Received: by sykes.suse.de (Postfix, from userid 597) id A4AC914C9F45B; Sat, 7 Feb 2004 15:38:03 +0100 (CET) Original-To: Dale Hagglund X-Yow: UH-OH!! I put on ``GREAT HEAD-ON TRAIN COLLISIONS of the 50's'' by mistake!!! In-Reply-To: (Dale Hagglund's message of "Fri, 06 Feb 2004 20:35:13 -0700") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6899 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6899 Dale Hagglund writes: > [I read bug-gnu-emacs via the gatewayed newsgroup. Please cc me on > any followups, if possible. --rdh] > > I was experimenting with emacs 21.3 running under X and then inside > xterm, and I observe the following behaviour. In all cases, I started > emacs with the -q flag. > > 1. Under X, the backspace and delete keys generate the respective > window-system events, each of which is mapped to DEL via the > function-key-map, which is then bound to > `delete-previous-character'. > > 2. Under xterm version 4.2.99.903(174), backspace sends DEL and delete > sends `ESC [ 3 ~'. Emacs treats DEL, of course, as > `delete-previous-character', but `ESC [ 3 ~' is mapped to the event > , which is bound to `delete-char'. > > This behaviour is inconsistent. In each case, emacs can distinguish > between the Delete and Backspace keys, but in one environment they > behave, and in the other, differently. Also, is there any reason why > `ESC [ 3 ~' shouldn't be mapped to instead of . This is a property of the terminal description. For xterm it contains `kdch1=\E[3~' (terminfo) or `kD=\E[3~' (termcap), thus `ESC [ 3 ~' is mapped to . Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."