From unknown Sat Jun 21 10:14:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2057 <2057@debbugs.gnu.org> To: bug#2057 <2057@debbugs.gnu.org> Subject: Status: 23.0.60; delete key and deletechar Reply-To: bug#2057 <2057@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:14:15 +0000 retitle 2057 23.0.60; delete key and deletechar reassign 2057 emacs submitter 2057 Robert Brown severity 2057 normal thanks From robert.brown@gmail.com Sun Jan 25 15:01:35 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Jan 2009 23:01:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.2 required=4.0 tests=FOURLA,MURPHY_SEX_L2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PN1VhU014316 for ; Sun, 25 Jan 2009 15:01:32 -0800 Received: from mail.gnu.org ([199.232.76.166]:44247 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LRDxL-0007FI-9h for emacs-pretest-bug@gnu.org; Sun, 25 Jan 2009 17:59:55 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LRDys-0003xu-3O for emacs-pretest-bug@gnu.org; Sun, 25 Jan 2009 18:01:30 -0500 Received: from mu-out-0910.google.com ([209.85.134.186]:31575) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRDyr-0003xg-IY for emacs-pretest-bug@gnu.org; Sun, 25 Jan 2009 18:01:29 -0500 Received: by mu-out-0910.google.com with SMTP id i2so4156309mue.6 for ; Sun, 25 Jan 2009 15:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=j8CawTSlJBpBL1+zT9TldWmlVW4zBT1UYgxCXQ+OvkE=; b=MezwUmYQGU37GXQ30bAo4K0pWvqC+jGsAeldsgTwhdbnlk7ybH18fxlTyTW7dboda5 IlI4KzZ6WEPaI2w9e5siJ8yu7ksEdYSVZCzdfIZ7Ob0lO24GF4NkOGDouN5iAoYpsc6L NSE01f1i/qJmXfAQCVwm3eyKHvuh2Yjn5Tnwk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=K1SvlSc1GFe4BMwi7vAusv/MUAfyr/Rv4A//AoOx/qIluFUZfbStLfiDJR0HN258ZB X7BS4gS8O4P5UlyPNjCsCxr+GwOoKJfDU4AD19kx4bhh183Mqkbe8AoY1Qs/w6W2QQsR S0SPLaXHBGTn9JuVJnYrSkz8PCae+LYcUz1A4= MIME-Version: 1.0 Received: by 10.103.106.1 with SMTP id i1mr211450mum.0.1232924486652; Sun, 25 Jan 2009 15:01:26 -0800 (PST) Date: Sun, 25 Jan 2009 18:01:26 -0500 Message-ID: <78d2fb3b0901251501q78585866h4856d8d0ca8d3ea6@mail.gmail.com> Subject: 23.0.60; delete key and deletechar From: Robert Brown To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I start Emacs 23.0.60.2 on Ubuntu 8.10 inside a gnome-terminal emulation window using the command "emacs -q -nw". The backspace key on my keyboard is set up to generate ASCII code 127, but Emacs incorrectly maps this code to deletechar with input-decode-map which is: (keymap (127 . [deletechar]) (27 keymap (79 keymap (83 . .... I believe this input translation is set up by term_get_fkeys_1 in term.c when it looks at the termcap/terminfo function key definitions for my terminal type, xterm-color, and sees that the termcap description contains: kD=\177 which means that the delete *function* key produces ASCII code 127. Emacs should look at both kD and kb. If they are the same ASCII character, then Emacs should not install a translation in input-decode-map for delete. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /local/software/package/emacs-23.0.60.2/share/emacs/23.0.60/etc/DEBUG for instructions. In GNU Emacs 23.0.60.2 (i686-pc-linux-gnu) of 2009-01-18 on ugg configured using `configure '--without-x' '--prefix=/local/software/package/emacs-23.0.60.2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: C value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Info Minor modes in effect: savehist-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC [ > 1 ; 1 7 0 4 ; 0 c C-h i m e m a c s RET C-s b u g SPC C-a C-n C-f C-f C-f C-f C-f C-f RET SPC SPC ESC x r e p o r t - e m a c s - b u g RET Recent messages: ("emacs") Composing main Info directory...done Mark saved where search started From brown@google.com Thu Apr 16 08:10:19 2009 Received: (at 2057) by emacsbugs.donarmstrong.com; 16 Apr 2009 15:10:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.13]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GFAGPU010511 for <2057@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 08:10:17 -0700 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id n3GFAFKI003100; Thu, 16 Apr 2009 08:10:15 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1239894616; bh=1z50hCx4fjoQELr02XQ+8rINbog=; h=DomainKey-Signature:Date:Message-Id:From:To:Subject:CC: X-System-Of-Record; b=spXPVbBmF58V8s47xqShEzqEk36n22kOaprX/C/7FXro 40iXWXSvTy4jLn4pO25WwDdTfqgayUAKcR+PsVDoNQ== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:message-id:from:to:subject:cc:x-system-of-record; b=Qb6ny96LcJGAteI+QTdp667k0gtRrY3tuB5dLizFjNXSKmJqCbHY5zfC4n5k5OEAH OMMfVOBgxVbYcDs5WiDvQ== Received: from paradicsom.nyc.corp.google.com.google.com (paradicsom.nyc.corp.google.com [172.26.104.255]) by zps35.corp.google.com with ESMTP id n3GFADo6008607; Thu, 16 Apr 2009 08:10:14 -0700 Date: Thu, 16 Apr 2009 11:10:13 -0400 Message-Id: From: Robert Brown To: 2057@debbugs.gnu.org Subject: bug#2057: 23.0.60; delete key and deletechar CC: emacs-pretest-bug@gnu.org X-System-Of-Record: true I believe the following patch may be the right fix for bug 2057. When looking at the key sequences generated by function keys, Emacs should only register those that generate two or more ASCII characters. My termcap entry, xterm-color, contains "kD=\177", which means that the delete *function* key generates code 177. The function key mapping code in term.c incorrectly creates a translation that maps charcter code 177 to deletechar. The translation is incorrect because the normal backspace/delete key on my keyboard also generates code 177. Once the translation is set up, hitting backspace/delete causes Emacs to delete characters to the right instead of to the left, since Emacs thinks I'm hitting the delete *function* key. bob ==================== --- src/term.c.~1~ 2009-04-13 14:57:19.000000000 -0400 +++ src/term.c 2009-04-16 10:59:32.000000000 -0400 @@ -1410,7 +1410,7 @@ for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) { char *sequence = tgetstr (keys[i].cap, address); - if (sequence) + if (sequence && strlen(sequence) > 1) Fdefine_key (kboard->Vinput_decode_map, build_string (sequence), Fmake_vector (make_number (1), intern (keys[i].name))); From brown@google.com Thu Apr 16 08:33:42 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Apr 2009 15:33:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GFXZiU016254 for ; Thu, 16 Apr 2009 08:33:36 -0700 Received: from mx10.gnu.org ([199.232.76.166]:53983) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LuTao-00088i-Ol for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 11:33:34 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LuTan-0006lS-8I for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 11:33:34 -0400 Received: from smtp-out.google.com ([216.239.33.17]:20824) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LuTam-0006kt-Nu for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 11:33:33 -0400 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id n3GFXOPl013291; Thu, 16 Apr 2009 16:33:25 +0100 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1239896005; bh=yq31/R9k7kA5GV9UP/NTBzEs2QE=; h=DomainKey-Signature:Date:Message-Id:From:To:Subject:CC: X-System-Of-Record; b=OG+O0JKFxdjriiQ2utLYoXqKaniQN2nvgq0yR80Pz7vk vtDE04GwWOmujNs55IyHu7ljfOI9vjf0mdVC8BAU9w== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:message-id:from:to:subject:cc:x-system-of-record; b=gR8ngdhptbwZtuF+tLPkzc9twZFLEROw55Ogtyu8gQ0dXlnxI3w7LqOm4Prcq+6Dk +u4CRI/cL6neQHuwKFsUg== Received: from paradicsom.nyc.corp.google.com.google.com (paradicsom.nyc.corp.google.com [172.26.104.255]) by zps36.corp.google.com with ESMTP id n3GFXMDN001931; Thu, 16 Apr 2009 08:33:22 -0700 Date: Thu, 16 Apr 2009 11:33:21 -0400 Message-Id: From: Robert Brown To: 2057@debbugs.gnu.org Subject: bug#2057: 23.0.60; delete key and deletechar CC: emacs-pretest-bug@gnu.org X-System-Of-Record: true X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) On second thought, maybe the real bug is with the termcap entry. Hitting the function key labeled delete on my keyboard generates: escape [ 3 ~ not character 177. Maybe function keys always generate multi-character sequences, so there's generally no confusion between the function key and a normal key. bob ==================== --- src/term.c.~1~ 2009-04-13 14:57:19.000000000 -0400 +++ src/term.c 2009-04-16 10:59:32.000000000 -0400 @@ -1410,7 +1410,7 @@ for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) { char *sequence = tgetstr (keys[i].cap, address); - if (sequence) + if (sequence && strlen(sequence) > 1) Fdefine_key (kboard->Vinput_decode_map, build_string (sequence), Fmake_vector (make_number (1), intern (keys[i].name))); From dann@godzilla.ics.uci.edu Thu Apr 16 09:20:42 2009 Received: (at 2057) by emacsbugs.donarmstrong.com; 16 Apr 2009 16:20:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GGKdaN030909 for <2057@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 09:20:40 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n3GGJtVn002035; Thu, 16 Apr 2009 09:19:55 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n3GGJt3l014011; Thu, 16 Apr 2009 09:19:55 -0700 (PDT) Date: Thu, 16 Apr 2009 09:19:55 -0700 (PDT) Message-Id: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Robert Brown Cc: 2057@debbugs.gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar References: X-Debbugs-No-Ack: yes In-Reply-To: (Robert Brown's message of "Thu, 16 Apr 2009 11:10:13 -0400") Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n3GGJtVn002035 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Robert Brown writes: > I believe the following patch may be the right fix for bug 2057. When > looking at the key sequences generated by function keys, Emacs should only > register those that generate two or more ASCII characters. > > My termcap entry, xterm-color, contains "kD=\177", which means that the > delete *function* key generates code 177. Interesting, it seems that you have a modified termcap database, the normal one has kD=\E[3~ for xterm-color. What you are seeing is probably the effect of what `normal-erase-is-backspace' does. Can you try setting TERM to xterm-256color and see if that the delete key works better then? (It's quite likely that nowadays terminal emulators are compiled with 256 color support) From brown@google.com Thu Apr 16 10:54:38 2009 Received: (at 2057) by emacsbugs.donarmstrong.com; 16 Apr 2009 17:54:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.13]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GHsWj8023259 for <2057@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 10:54:33 -0700 Received: from spaceape14.eur.corp.google.com (spaceape14.eur.corp.google.com [172.28.16.148]) by smtp-out.google.com with ESMTP id n3GHsVgT007045; Thu, 16 Apr 2009 10:54:31 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1239904472; bh=0imgYbpdXtA13x/SMlWVipS5aJE=; h=DomainKey-Signature:From:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-ID:Date:To:Cc:Subject: In-Reply-To:References:X-Mailer:X-System-Of-Record; b=EBHtL1j3+f9E vYqb2TeSJukmwP5oLF89l50t/RM564LQbbi9x3aFwCNrsiy9CBIXi8WP2hBrCuCC5Ju TnszVeQ== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:mime-version:content-type: content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to:references:x-mailer:x-system-of-record; b=Qq5owEEiDa25GkMvuerVhrg/nPAbNIQD+Vt5KuS5RMTIq85ZMHBqeTaGqGLSKhFwj XKZhXTy+lWHgPXsg75oRA== Received: from paradicsom.nyc.corp.google.com.google.com (paradicsom.nyc.corp.google.com [172.26.104.255]) by spaceape14.eur.corp.google.com with ESMTP id n3GHsSPG023570; Thu, 16 Apr 2009 10:54:29 -0700 From: Robert Brown MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> Date: Thu, 16 Apr 2009 13:54:28 -0400 To: Dan Nicolaescu Cc: 2057@debbugs.gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar In-Reply-To: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> References: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> X-Mailer: VM 7.19 under Emacs 22.0.55.1 X-System-Of-Record: true Dan Nicolaescu writes: > Robert Brown writes: > > > I believe the following patch may be the right fix for bug 2057. When > > looking at the key sequences generated by function keys, Emacs should only > > register those that generate two or more ASCII characters. > > > > My termcap entry, xterm-color, contains "kD=\177", which means that the > > delete *function* key generates code 177. > > Interesting, it seems that you have a modified termcap database, the normal one > has kD=\E[3~ for xterm-color. Yes, it's definitely a bug in the termcap entry. Hitting the delete function key generates \E[3~ for me. I can fix the termcap. > Can you try setting TERM to xterm-256color and see if that the delete > key works better then? Switching to a different termcap works well. I still think it may incorrect for Emacs to map single character function key sequences. But perhaps these just never occur in practice. bob From dann@godzilla.ics.uci.edu Thu Apr 16 11:20:18 2009 Received: (at 2057-done) by emacsbugs.donarmstrong.com; 16 Apr 2009 18:20:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GIKCH0030727 for <2057-done@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 11:20:13 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n3GIHmeh004571; Thu, 16 Apr 2009 11:17:48 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n3GIHmJn015568; Thu, 16 Apr 2009 11:17:48 -0700 (PDT) Date: Thu, 16 Apr 2009 11:17:48 -0700 (PDT) Message-Id: <200904161817.n3GIHmJn015568@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Robert Brown Cc: 2057-done@debbugs.gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar References: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> X-Debbugs-No-Ack: yes In-Reply-To: <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> (Robert Brown's message of "Thu, 16 Apr 2009 13:54:28 -0400") Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n3GIHmeh004571 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Robert Brown writes: > Dan Nicolaescu writes: > > Robert Brown writes: > > > > > I believe the following patch may be the right fix for bug 2057. When > > > looking at the key sequences generated by function keys, Emacs should only > > > register those that generate two or more ASCII characters. > > > > > > My termcap entry, xterm-color, contains "kD=\177", which means that the > > > delete *function* key generates code 177. > > > > Interesting, it seems that you have a modified termcap database, the normal one > > has kD=\E[3~ for xterm-color. > > Yes, it's definitely a bug in the termcap entry. Hitting the delete > function key generates \E[3~ for me. I can fix the termcap. > > > Can you try setting TERM to xterm-256color and see if that the delete > > key works better then? > > Switching to a different termcap works well. OK, so it's not an emacs bug, closing this then. > I still think it may incorrect for Emacs to map single character function > key sequences. But perhaps these just never occur in practice. Given that we don't have a positive proof that it causes a problem, there doesn't seem to be a good reason to change code that has been around for such a long time. From monnier@iro.umontreal.ca Thu Apr 16 11:46:10 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Apr 2009 18:46:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GIk3qd005456 for ; Thu, 16 Apr 2009 11:46:04 -0700 Received: from mail.gnu.org ([199.232.76.166]:46403 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LuWb4-0005SK-Hr for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:46:02 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LuWaz-0002A5-Dd for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:46:02 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:15007 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuWay-00029K-Uu for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:45:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiAFAE0a50lLd+7D/2dsb2JhbACBU9Alg30GhSg X-IronPort-AV: E=Sophos;i="4.40,199,1238990400"; d="scan'208";a="37184254" Received: from 75-119-238-195.dsl.teksavvy.com (HELO pastel.home) ([75.119.238.195]) by ironport2-out.teksavvy.com with ESMTP; 16 Apr 2009 14:45:55 -0400 Received: by pastel.home (Postfix, from userid 20848) id CB2127EFB; Thu, 16 Apr 2009 14:45:54 -0400 (EDT) From: Stefan Monnier To: Robert Brown Cc: 2057@debbugs.gnu.org, emacs-pretest-bug@gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar Message-ID: References: Date: Thu, 16 Apr 2009 14:45:54 -0400 In-Reply-To: (Robert Brown's message of "Thu, 16 Apr 2009 11:10:13 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > My termcap entry, xterm-color, contains "kD=\177", which means that the > delete *function* key generates code 177. Why does the termcap data have such an entry for kD? That looks like a bug. Does it also have a similar entry for the backspace key? Stefan From brown@google.com Thu Apr 16 11:54:56 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Apr 2009 18:54:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GIsnSl006801 for ; Thu, 16 Apr 2009 11:54:50 -0700 Received: from mx10.gnu.org ([199.232.76.166]:46782) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LuWjY-0005cy-3H for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:54:48 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LuWjV-0004F7-2z for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:54:47 -0400 Received: from smtp-out.google.com ([216.239.45.13]:10413) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LuWjU-0004En-N6 for emacs-pretest-bug@gnu.org; Thu, 16 Apr 2009 14:54:44 -0400 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id n3GIsdmW019825; Thu, 16 Apr 2009 11:54:39 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1239908079; bh=oHTqwLL+oZPdBPNiyM849tyYtw4=; h=DomainKey-Signature:From:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-ID:Date:To:Cc:Subject: In-Reply-To:References:X-Mailer:X-System-Of-Record; b=ipelAGOgxLIU Xy+owy8UHdB5vLVrvLHWZc9oCj+nC5eO6MZq4Rt+J1uB0TPvfd3AbKIinnQp350Vsb0 9OXOIWA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:mime-version:content-type: content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to:references:x-mailer:x-system-of-record; b=EKSBmr2ltSlgsUc5SZTPSiQq0xrLYdrv0UYBnM5zz76UNMsBN9/CVAymOxyFS3pxr Mg2R0ZKweaOSS+O0/hvKw== Received: from paradicsom.nyc.corp.google.com.google.com (paradicsom.nyc.corp.google.com [172.26.104.255]) by zps36.corp.google.com with ESMTP id n3GIsaWL006379; Thu, 16 Apr 2009 11:54:37 -0700 From: Robert Brown MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18919.32492.133030.955310@paradicsom.nyc.corp.google.com> Date: Thu, 16 Apr 2009 14:54:36 -0400 To: Stefan Monnier Cc: 2057@debbugs.gnu.org.emacs-pretest-bug@gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar In-Reply-To: References: X-Mailer: VM 7.19 under Emacs 23.0.92.4 X-System-Of-Record: true X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Stefan Monnier writes: > > My termcap entry, xterm-color, contains "kD=\177", which means that the > > delete *function* key generates code 177. > > Why does the termcap data have such an entry for kD? That looks like a bug. > Does it also have a similar entry for the backspace key? It's definitely a bug in the termcap entry. The odd thing is what happened afterward. Emacs created an input mapping that converts 177 into deletechar, messing up the action of the normal delete/backspace key. There's an assumption that function keys never generate a single character that's the same as some normal key. Or alternatively, function keys take precedence over normal keys if there's any overlap in generated codes. bob From monnier@IRO.UMontreal.CA Fri Apr 17 13:19:05 2009 Received: (at 2057-done) by emacsbugs.donarmstrong.com; 17 Apr 2009 20:19:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3HKJ1pU029796 for <2057-done@emacsbugs.donarmstrong.com>; Fri, 17 Apr 2009 13:19:02 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n3HKJ1eq028606; Fri, 17 Apr 2009 16:19:01 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 4F659813A4; Fri, 17 Apr 2009 16:19:00 -0400 (EDT) From: Stefan Monnier To: Robert Brown Cc: 2057-done@debbugs.gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar Message-ID: References: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> Date: Fri, 17 Apr 2009 16:19:00 -0400 In-Reply-To: <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> (Robert Brown's message of "Thu, 16 Apr 2009 13:54:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3256=0 > I still think it may incorrect for Emacs to map single character function > key sequences. But perhaps these just never occur in practice. I do agree that your patch seems reasonable. But there might be terminals where function keys send non-ASCII single byte codes in which case your patch would be incorrect. Now I don't know whether such terminals are more or less rare than those who send ASCII codes for function keys. So at least, for the purpose of the current pretest, I'd rather keep the old behavior (that's been around for many years) rather than risk breaking some oddball system out there. Especially since your particular problem really turned out to be a bug in the termcap. Stefan From brown@google.com Fri Apr 17 13:33:51 2009 Received: (at 2057-done) by emacsbugs.donarmstrong.com; 17 Apr 2009 20:33:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.13]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3HKXnDu001657 for <2057-done@emacsbugs.donarmstrong.com>; Fri, 17 Apr 2009 13:33:50 -0700 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id n3HKXltK006506; Fri, 17 Apr 2009 13:33:48 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1240000428; bh=/gsfPGLsrilU2myXq0foqE7AlKI=; h=DomainKey-Signature:From:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-ID:Date:To:Cc:Subject: In-Reply-To:References:X-Mailer:X-System-Of-Record; b=Q0ibrjcXwUZC np5kWIoD305qnpirAJdDiWcZcr713OnXTw9BmyfqfF2aCPD3QqQRYwWcl/krW6NpTs/ EWa63NQ== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:mime-version:content-type: content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to:references:x-mailer:x-system-of-record; b=JpOYHGxpnxXM1zxBrWFQGZ0pyIuCV0aiGuqg/uQHS0gVNjOuT5XEY9sTROF8NYH+a 8z/jpDpzCGA7RS1WbYBng== Received: from paradicsom.nyc.corp.google.com.google.com (paradicsom.nyc.corp.google.com [172.26.104.255]) by zps35.corp.google.com with ESMTP id n3HKXimE011666; Fri, 17 Apr 2009 13:33:45 -0700 From: Robert Brown MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18920.59304.844033.348497@paradicsom.nyc.corp.google.com> Date: Fri, 17 Apr 2009 16:33:44 -0400 To: Stefan Monnier Cc: 2057-done@debbugs.gnu.org Subject: Re: bug#2057: 23.0.60; delete key and deletechar In-Reply-To: References: <200904161619.n3GGJt3l014011@godzilla.ics.uci.edu> <18919.28884.261672.227349@paradicsom.nyc.corp.google.com> X-Mailer: VM 7.19 under Emacs 23.0.92.4 X-System-Of-Record: true Stefan Monnier writes: > > I still think it may incorrect for Emacs to map single character function > > key sequences. But perhaps these just never occur in practice. > > I do agree that your patch seems reasonable. But there might be > terminals where function keys send non-ASCII single byte codes in which > case your patch would be incorrect. Now I don't know whether such > terminals are more or less rare than those who send ASCII codes for > function keys. So at least, for the purpose of the current pretest, I'd > rather keep the old behavior (that's been around for many years) rather > than risk breaking some oddball system out there. Especially since your > particular problem really turned out to be a bug in the termcap. I agree. Better to leave everything as it is. Thanks very much for taking a look. bob From unknown Sat Jun 21 10:14:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 May 2009 14:24:07 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator