From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Ryo Furue , 4709@debbugs.gnu.org Resent-From: Ryo Furue Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 12 Oct 2009 20:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12553798749990 (code B ref -1); Mon, 12 Oct 2009 20:45:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Oct 2009 20:37:54 +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.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9CKbqBl009987 for ; Mon, 12 Oct 2009 13:37:54 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxReS-0002mf-FM for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2009 16:37:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxReO-0002kx-Rw for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2009 16:37:52 -0400 Received: from [199.232.76.173] (port=59658 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxReO-0002kr-GM for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2009 16:37:48 -0400 Received: from mta12.its.hawaii.edu ([128.171.224.148]:36860) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxReN-0000ou-J0 for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2009 16:37:47 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: Text/Plain; charset=us-ascii Received: from pmxchannel-daemon.mta12.its.hawaii.edu by mta12.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) id <0KRF00F005AW9R00@mta12.its.hawaii.edu>; Mon, 12 Oct 2009 10:37:44 -1000 (HST) Received: from localhost (amakihi.soest.hawaii.edu [128.171.156.62]) by mta12.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) with ESMTPS id <0KRF00AX85AUC700@mta12.its.hawaii.edu>; Mon, 12 Oct 2009 10:37:42 -1000 (HST) Date: Mon, 12 Oct 2009 10:37:42 -1000 (HST) From: Ryo Furue To: bug-gnu-emacs@gnu.org Message-id: <20091012.103742.231009806.furue@hawaii.edu> X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.10.12.202418 X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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 bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: My ~/.emacs has "(keyboard-translate ?\C-h ?\C-?)". I start an emacs daemon with $ /usr/bin/env XMODIFIERS=@im=none /usr/bin/emacs23 --daemon Then I start a client $ /usr/bin/emacsclient.emacs23 -c But, "C-h" still invokes the emacs help system. Next, I evaluate "(keyboard-translate ?\C-h ?\C-?)" on the client. Then "C-h" starts to work as delete. Finally, I invoke another client with "/usr/bin/emacsclient.emacs23 -c", on which "C-h" works as delete from the beginning. I'm not sure if this is a bug. I just wish there were a "proper" mechanism to set a keyboard-translate-table globally. (I tried many things, including reading etc/PROBLEMS, searching your bug tracking newsgroup, asking this question at gnu.emacs.help, reading the emacs info pages about reporting bugs, etc., but couldn't find this issue reported.) Best regards, Ryo 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 /usr/share/emacs/23.1/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-13 on raven, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10603901 configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: @im=none locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-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: C-f C-f C-f C-f C-f C-f C-n C-n C-n C-n C-n C-n u C-p C-p C-p C-p C-p C-p C-p u C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-f C-p C-f C-f C-f C-f C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-v C-p C-p C-p u C-n C-f C-f C-f C-f u C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-n C-n C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-n C-n C-n C-n C-n C-n C-p C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-n C-n C-n C-n C-n C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n x e m a c s - v e r s i o n C-x C-b C-n C-n C-n C-n C-p C-p C-p C-SPC C-e x r e p o r TAB TAB b u TAB Recent messages: Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help uncompressing emacs.gz...done uncompressing emacs-6.gz...done uncompressing emacs-1.gz...done uncompressing emacs-6.gz...done GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-13 on raven, modified by Debian Updating buffer list...done Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help Mark set Making completion list... From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Stefan Monnier , 4709@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 14 Oct 2009 13:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.1255526719676 (code B ref -1); Wed, 14 Oct 2009 13:35:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Oct 2009 13:25: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.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9EDPHhO000648 for ; Wed, 14 Oct 2009 06:25:18 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My3qv-0005pR-2S for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:25:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My3qp-0005my-W1 for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:25:16 -0400 Received: from [199.232.76.173] (port=53741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My3qp-0005mp-Q1 for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:25:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:18091 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1My3qp-0008Jb-IL for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 09:25:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAINu1UpMCqsb/2dsb2JhbACBUddbhC4EgVuGGoJ4 X-IronPort-AV: E=Sophos;i="4.44,557,1249272000"; d="scan'208";a="47537273" Received: from 76-10-171-27.dsl.teksavvy.com (HELO pastel.home) ([76.10.171.27]) by ironport2-out.pppoe.ca with ESMTP; 14 Oct 2009 09:25:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id E5C9D7F5B; Wed, 14 Oct 2009 09:25:09 -0400 (EDT) From: Stefan Monnier To: Ryo Furue Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <20091012.103742.231009806.furue@hawaii.edu> Date: Wed, 14 Oct 2009 09:25:09 -0400 In-Reply-To: <20091012.103742.231009806.furue@hawaii.edu> (Ryo Furue's message of "Mon, 12 Oct 2009 10:37:42 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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. X-CrossAssassin-Score: 2 > My ~/.emacs has "(keyboard-translate ?\C-h ?\C-?)". I start an emacs > daemon with > $ /usr/bin/env XMODIFIERS=@im=none /usr/bin/emacs23 --daemon > Then I start a client > $ /usr/bin/emacsclient.emacs23 -c > But, "C-h" still invokes the emacs help system. > Next, I evaluate "(keyboard-translate ?\C-h ?\C-?)" on the client. > Then "C-h" starts to work as delete. > Finally, I invoke another client with > "/usr/bin/emacsclient.emacs23 -c", on which "C-h" works as delete > from the beginning. > I'm not sure if this is a bug. I just wish there were a > "proper" mechanism to set a keyboard-translate-table globally. AFAIK, you cannot set it globally. You can arrange to set it in every terminal (by putting (keyboard-translate ?\C-h ?\C-?) on some hook whose name escapes me), tho. Still, I wonder: why would you want to set such a mapping everywhere? Stefan From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Ryo Furue , 4709@debbugs.gnu.org Resent-From: Ryo Furue Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 14 Oct 2009 21:15:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12555544523697 (code B ref -1); Wed, 14 Oct 2009 21:15:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Oct 2009 21:07:32 +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.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9EL7UiT003693 for ; Wed, 14 Oct 2009 14:07:31 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyB4D-0008Ta-Lo for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 17:07:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyB49-0008Rh-Ll for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 17:07:29 -0400 Received: from [199.232.76.173] (port=37929 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyB49-0008RV-Ds for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 17:07:25 -0400 Received: from mta12.its.hawaii.edu ([128.171.224.148]:57867) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyB48-00026g-Nq for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 17:07:25 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: Text/Plain; charset=us-ascii Received: from pmxchannel-daemon.mta12.its.hawaii.edu by mta12.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) id <0KRI00102W09N900@mta12.its.hawaii.edu>; Wed, 14 Oct 2009 11:07:21 -1000 (HST) Received: from localhost (amakihi.soest.hawaii.edu [128.171.156.62]) by mta12.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) with ESMTPS id <0KRI00GLTW07TB10@mta12.its.hawaii.edu>; Wed, 14 Oct 2009 11:07:19 -1000 (HST) Date: Wed, 14 Oct 2009 11:07:19 -1000 (HST) From: Ryo Furue In-reply-to: To: monnier@iro.umontreal.ca Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-id: <20091014.110719.209373463.furue@hawaii.edu> X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.10.14.205117 References: <20091012.103742.231009806.furue@hawaii.edu> X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) Hi Stefan, Thank you very much for your response. | AFAIK, you cannot set it globally. | Then, could we make it a request for a new feature? We could even say that the keyboard-translate functionality is partially broken because it sometimes works and sometimes doesn't (Please recall my example). | You can arrange to set it in every | terminal (by putting (keyboard-translate ?\C-h ?\C-?) on some | hook whose name escapes me), tho. That sounds promising. | Still, I wonder: why would you want to set such a mapping | everywhere? | I'm not sure if I understand your question. . . . If you want a keyboard translation, you'd want it everywhere consistently, wouldn't you? In this particular case, I want C-h to delete the character before the cursor anywhere and everywhere (when deleting characters makes sense, that is. You don't want to delete characters on a webpage displayed by a webbrowser, for example). That's natural for a person like me who instinctively types C-h to delete. I used to use (global-set-key "\C-h" 'delete-backward-char) instead of keyboard-translate. But, as of emacs23, C-h invokes a help-like feature in the incremental search even with the setting above. So, I think keyboard-translate is the cleanest, once-and-for-all solution, if it works globally. Best regards, Ryo From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Stefan Monnier , 4709@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 03:40:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.1255577680553 (code B ref -1); Thu, 15 Oct 2009 03:40:06 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Oct 2009 03:34:40 +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.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9F3YcRL000547 for ; Wed, 14 Oct 2009 20:34:39 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyH6s-00027E-7F for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 23:34:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyH6n-00024T-Qi for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 23:34:37 -0400 Received: from [199.232.76.173] (port=40367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyH6n-00024Q-LA for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 23:34:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:48602 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyH6n-0003G1-Bn for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2009 23:34:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAL011kpMCqsb/2dsb2JhbACBUtd2hC4Eh3WCeA X-IronPort-AV: E=Sophos;i="4.44,563,1249272000"; d="scan'208";a="47597815" Received: from 76-10-171-27.dsl.teksavvy.com (HELO ceviche.home) ([76.10.171.27]) by ironport2-out.pppoe.ca with ESMTP; 14 Oct 2009 23:34:15 -0400 Received: by ceviche.home (Postfix, from userid 20848) id BF8A7B4100; Wed, 14 Oct 2009 23:34:15 -0400 (EDT) From: Stefan Monnier To: Ryo Furue Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <20091012.103742.231009806.furue@hawaii.edu> <20091014.110719.209373463.furue@hawaii.edu> Date: Wed, 14 Oct 2009 23:34:15 -0400 In-Reply-To: <20091014.110719.209373463.furue@hawaii.edu> (Ryo Furue's message of "Wed, 14 Oct 2009 11:07:19 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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. > | AFAIK, you cannot set it globally. > Then, could we make it a request for a new feature? Sure. > We could even say that the keyboard-translate functionality > is partially broken because it sometimes works and sometimes > doesn't (Please recall my example). To tell you the truth, it's the first time I hear of this feature being actually used. So that should give you the kind of priority this feature request will "enjoy". And of course it gets worse because of the discussion below. > | Still, I wonder: why would you want to set such a mapping > | everywhere? > I'm not sure if I understand your question. . . . If you want > a keyboard translation, you'd want it everywhere consistently, > wouldn't you? > In this particular case, I want C-h to delete the character > before the cursor anywhere and everywhere (when deleting > characters makes sense, that is. But do you really also want C-x C-h to invoke the command bound to C-x C-? > You don't want to delete characters on a webpage displayed by > a webbrowser, for example). That's natural for a person like me who > instinctively types C-h to delete. > I used to use > (global-set-key "\C-h" 'delete-backward-char) That seems closer to what you want, yes. But admittedly, C-h is hardwired at many places, so you'd have to "fix" them one by one as you bump into them. > So, I think keyboard-translate is the cleanest, > once-and-for-all solution, if it works globally. Have you tried key-translation-map (which is global)? I have never understand the existence of both key-translation-map and keyboard-translate-table. Stefan From rgm@gnu.org Wed Oct 14 23:23:55 2009 Received: (at control) by emacsbugs.donarmstrong.com; 15 Oct 2009 06:23:55 +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.9 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL 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.14.3/8.14.3/Debian-5) with ESMTP id n9F6NsTH028527 for ; Wed, 14 Oct 2009 23:23:55 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MyJkf-0000D3-3j; Thu, 15 Oct 2009 02:23:53 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19158.49144.980212.26977@fencepost.gnu.org> Date: Thu, 15 Oct 2009 02:23:52 -0400 From: Glenn Morris To: control Subject: control reassign 4722 emacs,ns severity 4719 wishlist severity 4709 wishlist severity 4698 minor From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Ryo Furue , 4709@debbugs.gnu.org Resent-From: Ryo Furue Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 07:45:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12555921068461 (code B ref -1); Thu, 15 Oct 2009 07:45:07 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Oct 2009 07:35:06 +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.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9F7Z4AZ008380 for ; Thu, 15 Oct 2009 00:35:06 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyKrY-0004xY-AV for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 03:35:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyKrT-0004uq-87 for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 03:35:03 -0400 Received: from [199.232.76.173] (port=60663 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyKrT-0004ul-1q for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 03:34:59 -0400 Received: from mta10.its.hawaii.edu ([128.171.224.146]:40629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyKrS-00027t-Ig for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 03:34:58 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: Text/Plain; charset=us-ascii Received: from pmxchannel-daemon.mta10.its.hawaii.edu by mta10.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) id <0KRJ00A00P28AA00@mta10.its.hawaii.edu>; Wed, 14 Oct 2009 21:34:56 -1000 (HST) Received: from localhost (amakihi.soest.hawaii.edu [128.171.156.62]) by mta10.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) with ESMTPS id <0KRJ008WWP27JY10@mta10.its.hawaii.edu>; Wed, 14 Oct 2009 21:34:55 -1000 (HST) Date: Wed, 14 Oct 2009 21:34:55 -1000 (HST) From: Ryo Furue In-reply-to: To: monnier@iro.umontreal.ca Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-id: <20091014.213455.160674778.furue@hawaii.edu> X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.10.15.72422 References: <20091014.110719.209373463.furue@hawaii.edu> X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) Stefan, | > We could even say that the keyboard-translate functionality | > is partially broken because it sometimes works and sometimes | > doesn't (Please recall my example). | | To tell you the truth, it's the first time I hear of this feature | being actually used. So that should give you the kind of priority | this feature request will "enjoy". I understand. It's you developers who decide on priority. All I can do is just to ask. But, please google and you'll find that keyboard translation is often suggested as a solution to the "C-h" problem. When I raised this issue in gnu.emacs.help, there was another person who was suffering from the lack of a truly global keyboard translation. I also found a posting on the net asking the same question as mine (why doesn't keyboard translation work with emacs daemon?). For a user using a "strange" keyboard (see below), keyboard translation is the cleanest solution. Finally, it's not good for emacs to leave a feature broken. Once you offer a feature, SOMEBODY (like me) will use it even though YOU personally don't think it's useful. | And of course it gets worse because of | the discussion below. | | > | Still, I wonder: why would you want to set such a mapping | > | everywhere? | > I'm not sure if I understand your question. . . . If you want | > a keyboard translation, you'd want it everywhere consistently, | > wouldn't you? | > In this particular case, I want C-h to delete the character | > before the cursor anywhere and everywhere (when deleting | > characters makes sense, that is. | | But do you really also want C-x C-h to invoke the command bound | to C-x C-? I've never been faced with such a situation. But, if there is ever such a situation, my answer must be "Yes, I would want C-x C-h to invoke the command bound to C-x C-?". Because the delete key does "not exist" to me! 1) My delete key doesn't work in the first place. I don't know what's wrong but it doesn't do anything on the bash prompt, for example, and it doesn't delete the character before the cursor on emacs (A message "End of Buffer" appears in the message line). 2) My delete key isn't easily accessible. On my regular keyboards, it's only accessible by pressing a "fn" key and "~`" key at the same time; it's really awkward to type. 3) I can't press it on my other keyboard without looking for it. It's too far from the home position. These things have been fine with me because I've never needed the delete key. The delete key exists as a physical entity but, considering the situation above, you'll agree that it's as good as non-existent to me. So, if faced with a need for such a combination as "C-x C-?", I would choose to use "C-x C-h". | > I used to use | > (global-set-key "\C-h" 'delete-backward-char) | | That seems closer to what you want, yes. But admittedly, C-h is | hardwired at many places, so you'd have to "fix" them one by one as | you bump into them. I agree that that's doable. But, as I said (and as you seem to admit), it's not the cleanest solution, especially for a user like me who doesn't have a delete key in the first place :-) | > So, I think keyboard-translate is the cleanest, | > once-and-for-all solution, if it works globally. | | Have you tried key-translation-map (which is global)? | I have never understand the existence of both key-translation-map | and keyboard-translate-table. I've never heard of it. I'll investigate. Thank you for the suggestion. Regards, Ryo From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Stefan Monnier , 4709@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 15:30:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125562018928974 (code B ref -1); Thu, 15 Oct 2009 15:30:07 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Oct 2009 15:23:09 +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.9 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9FFN7CJ028970 for ; Thu, 15 Oct 2009 08:23:08 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MySAV-0008Dg-4t for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 11:23:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MySAQ-0008Ak-Bd for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 11:23:06 -0400 Received: from [199.232.76.173] (port=48025 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MySAQ-0008AZ-4c for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 11:23:02 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56817) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MySAP-000739-JC for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 11:23:01 -0400 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 n9FFMsgM028259; Thu, 15 Oct 2009 11:22:54 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 8CC113A07F; Thu, 15 Oct 2009 11:22:54 -0400 (EDT) From: Stefan Monnier To: Ryo Furue Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <20091014.110719.209373463.furue@hawaii.edu> <20091014.213455.160674778.furue@hawaii.edu> Date: Thu, 15 Oct 2009 11:22:54 -0400 In-Reply-To: <20091014.213455.160674778.furue@hawaii.edu> (Ryo Furue's message of "Wed, 14 Oct 2009 21:34:55 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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 RV3385=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) > All I can do is just to ask. But, please google and > you'll find that keyboard translation is often suggested > as a solution to the "C-h" problem. I know about that. But this is usually not a problem of keyboard, but a problem of configuration of the xterm (or whatever other terminal emulator is used). So the answer (to use keyboard-translation) is actually a bad answer, simply carried over from the years long past where people used real text terminals where it was the only answer. Nowadays, the right answer is to fix the xterm's config so that DEL (aka "backspace") is not confused with C-h. IOW, these are not uses but misuses of keyboard-translate. > When I raised this > issue in gnu.emacs.help, there was another person who > was suffering from the lack of a truly global keyboard > translation. I also found a posting on the net asking > the same question as mine (why doesn't keyboard translation > work with emacs daemon?). For a user using a "strange" > keyboard (see below), keyboard translation is the cleanest > solution. Usually the way key presses get presented to Emacs depends a lot on whether they come straight from X11/w32/ns for GUI frames, or from some terminal emulator. This is especially true for delete and backspace keys. So global settings are usually not the right answer. > | But do you really also want C-x C-h to invoke the command bound > | to C-x C-? > I've never been faced with such a situation. But, if there is > ever such a situation, my answer must be "Yes, I would want C-x > C-h to invoke the command bound to C-x C-?". Because the delete > key does "not exist" to me! Good, then global-set-key is not the right answer. > 1) My delete key doesn't work in the first place. I don't know > what's wrong but it doesn't do anything on the bash prompt, > for example, and it doesn't delete the character before the cursor > on emacs (A message "End of Buffer" appears in the message line). That looks like a problem in itself which you may want to fix. What does C-h k say? > 2) My delete key isn't easily accessible. On my regular keyboards, > it's only accessible by pressing a "fn" key and "~`" key at the > same time; it's really awkward to type. Hmm... you're mapping C-h to C-? which is called DEL but which is really the "backspace" key, not the "delete" key (tho there's been a lot of confusion around this over the years since the terms were not used consistently between keyboard manufacturers). I.e. it's the key that normally sits at the extreme right of the row which has the numbers (the "top" row, if you ignore F1, F2, ... and such things). The "delete" key (which deletes forward rather than backward), is often placed together with things like "home", "end", "insert", "page up" and "page down". On Macs, IIRC, the delete key is only accessible via some Fn combination. So which physical key do you mean here? > 3) I can't press it on my other keyboard without looking for it. > It's too far from the home position. Clearly, not a key you want to use, yes. > These things have been fine with me because I've never needed > the delete key. I never use the delete key either, basically (C-d is a lot more convenient to delete forward). I do you use the backspace key heavily, tho. > The delete key exists as a physical entity but, considering the > situation above, you'll agree that it's as good as non-existent > to me. So, if faced with a need for such a combination > as "C-x C-?", I would choose to use "C-x C-h". That's good, yes. It means that some form of keyboard-translation is the right answer. > | > So, I think keyboard-translate is the cleanest, > | > once-and-for-all solution, if it works globally. > | Have you tried key-translation-map (which is global)? > | I have never understand the existence of both key-translation-map > | and keyboard-translate-table. > I've never heard of it. I'll investigate. Thank you for the > suggestion. The invocation below: (define-key key-translation-map [?\C-h] [?\C-?]) should do the trick. Stefan From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Ryo Furue , 4709@debbugs.gnu.org Resent-From: Ryo Furue Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 18:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125563123627559 (code B ref -1); Thu, 15 Oct 2009 18:35:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Oct 2009 18:27:16 +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.7 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9FIREED027556 for ; Thu, 15 Oct 2009 11:27:15 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyV2g-00007N-4P for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 14:27:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyV2b-0008Qv-Qs for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 14:27:13 -0400 Received: from [199.232.76.173] (port=55756 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyV2b-0008Qi-EC for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 14:27:09 -0400 Received: from mta10.its.hawaii.edu ([128.171.224.146]:60366) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyV2b-0007A5-2p for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 14:27:09 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: Text/Plain; charset=us-ascii Received: from pmxchannel-daemon.mta10.its.hawaii.edu by mta10.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) id <0KRK00B0KJ954R00@mta10.its.hawaii.edu>; Thu, 15 Oct 2009 08:27:05 -1000 (HST) Received: from localhost (amakihi.soest.hawaii.edu [128.171.156.62]) by mta10.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) with ESMTPS id <0KRK008NPJ8VJY30@mta10.its.hawaii.edu>; Thu, 15 Oct 2009 08:26:55 -1000 (HST) Date: Thu, 15 Oct 2009 08:26:54 -1000 (HST) From: Ryo Furue In-reply-to: To: monnier@IRO.UMontreal.CA Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-id: <20091015.082654.165304271.furue@hawaii.edu> X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.10.15.181225 References: <20091014.213455.160674778.furue@hawaii.edu> X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-CrossAssassin-Score: 2 Hi Stefan, Thank you. You are so kind and patient. | [. . . keyboard-translate is an obsolete feature . . .] | OK. Now, I'm totally confused about the so-called "delete" key. My original problem was that I want to delete the character before the cursor with C-h . I thought emacs originally assigns it to the "delete" key. But, it seems there's a confusion in terminology. You see, I'm so ignorant about those "special" keys :-) because I don't usually use them except for ESC (which sits next to "1/!"), TAB, CTRL (which sits next to "A"), and SHIFT. I can't type arrow keys, BACKSPACE, ALT, or DELETE, without searching for them, looking at the keyboard. | > 1) My delete key doesn't work in the first place. I don't know | > what's wrong but it doesn't do anything on the bash prompt, | > for example, and it doesn't delete the character before the cursor | > on emacs (A message "End of Buffer" appears in the message line). | | That looks like a problem in itself which you may want to fix. | What does C-h k say? The answer was surprising to me: C-d (translated from ) runs the command delete-char, which is an interactive built-in function in `C source code'. It is bound to , C-d. I don't know who translates my "delete" to C-d. But, I've just found that it does what C-d does. I've also found that my BACKSPACE key seems to be what emacs calls DEL: DEL (translated from ) runs the command backward-delete-char-untabify, which is an interactive compiled Lisp function. It is bound to DEL. (By the way, I obtained these results on "/usr/bin/emacs23 -q", so they are not affected by my ~/.emacs .) So . . . for so many years, I've had the wrong notion that emacs used the DELETE key (the one below "Insert" and to the left of "End" on a Dell keyboard which I don't use but happen to find here) to delete the character before the cursor. Because of this misunderstanding, I was confusing you, I suppose. Sorry. In any case, my problem stands the same because I don't use BACKSPACE either (and I'd like to avoid it, if at all possible). | The invocation below: | | (define-key key-translation-map [?\C-h] [?\C-?]) | | should do the trick. Thank you very much for finding that out! That's much better than keyboard-translate: $ emacs --daemon $ emacsclient -c # key-translation is NOT effective. # Evaluate (define-key key-translation-map [?\C-h] [?\C-?]). # Exit. $ emacsclient -c # key-translation IS effective. $ emacsclient -c -nw # key-translation IS effective. As you can see, the emacs daemon seems to ignore it in your ~/.emacs and you still have to manually evaluate it on an emacsclient. But, once you've evaluated it, it seems to stick. That's a huge improvement. Since my emacs daemon is sitting on my desktop for many days, I can live with the current situation. Maybe in the future, I hope the emacs daemon recognizes key-translation-map in ~/.emacs. Thank you again for your help. Regards, Ryo From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Stefan Monnier , 4709@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 20:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4709-submit@emacsbugs.donarmstrong.com id=B4709.125563848412438 (code B ref 4709); Thu, 15 Oct 2009 20:35:05 +0000 Received: (at 4709) by emacsbugs.donarmstrong.com; 15 Oct 2009 20:28:04 +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=-4.0 required=4.0 tests=AWL,HAS_BUG_NUMBER 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.14.3/8.14.3/Debian-5) with ESMTP id n9FKS2xk012435 for <4709@emacsbugs.donarmstrong.com>; Thu, 15 Oct 2009 13:28:03 -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 n9FKS1H8009837; Thu, 15 Oct 2009 16:28:01 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 2EDC63A07F; Thu, 15 Oct 2009 16:28:01 -0400 (EDT) From: Stefan Monnier To: Ryo Furue Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <20091014.213455.160674778.furue@hawaii.edu> <20091015.082654.165304271.furue@hawaii.edu> Date: Thu, 15 Oct 2009 16:28:01 -0400 In-Reply-To: <20091015.082654.165304271.furue@hawaii.edu> (Ryo Furue's message of "Thu, 15 Oct 2009 08:26:54 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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 RV3385=0 > | [. . . keyboard-translate is an obsolete feature . . .] > OK. Actually, it hasn't been declared obsolete. But the typical uses for it (to work around `backspace' sending a C-h) are. I've already several times been tempted to declare it obsolete, but haven't resolved myself to it yet. > The answer was surprising to me: > C-d (translated from ) runs the command delete-char, which is > an interactive built-in function in `C source code'. > It is bound to , C-d. > I don't know who translates my "delete" to C-d. But, I've just > found that it does what C-d does. It's done via function-key-map by normal-erase-is-backspace-mode. > I've also found that my BACKSPACE key seems to be what Emacs > calls DEL: > DEL (translated from ) runs the command > backward-delete-char-untabify, which is an interactive compiled Lisp > function. > It is bound to DEL. > (By the way, I obtained these results on "/usr/bin/emacs23 -q", so > they are not affected by my ~/.emacs .) Yes, these results look just fine to me. > | The invocation below: > | (define-key key-translation-map [?\C-h] [?\C-?]) > | should do the trick. > Thank you very much for finding that out! That's much > better than keyboard-translate: Other than the fact that it works globally, I'm not sure that it is better, but it should hopefully work about as well. > As you can see, the emacs daemon seems to ignore it > in your ~/.emacs and you still have to manually > evaluate it on an emacsclient. That doesn't sound right. Can you check that the relevant code from your .emacs is indeed executed? E.g. add a (message "I'm here") and/or a (setq my-test 'passed) right after the define-key. Stefan From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Ryo Furue , 4709@debbugs.gnu.org Resent-From: Ryo Furue Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 17 Oct 2009 01:05:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125574098314785 (code B ref -1); Sat, 17 Oct 2009 01:05:06 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 17 Oct 2009 00:56:23 +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.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9H0uDgX014781 for ; Fri, 16 Oct 2009 17:56:15 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myxad-0000Jv-G9 for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2009 20:56:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyxaX-0000JQ-QI for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2009 20:56:09 -0400 Received: from [199.232.76.173] (port=58879 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyxaX-0000JL-LZ for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2009 20:56:05 -0400 Received: from mta11.its.hawaii.edu ([128.171.224.147]:47091) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyxaW-0002gl-Lv for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2009 20:56:05 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: Text/Plain; charset=us-ascii Received: from pmxchannel-daemon.mta11.its.hawaii.edu by mta11.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) id <0KRM00400VX3ZM00@mta11.its.hawaii.edu>; Fri, 16 Oct 2009 14:55:51 -1000 (HST) Received: from localhost (amakihi.soest.hawaii.edu [128.171.156.62]) by mta11.its.hawaii.edu (Sun Java(tm) System Messaging Server 6.3-7.02 (built Jun 27 2008; 32bit)) with ESMTPS id <0KRM00HTBVX10M10@mta11.its.hawaii.edu>; Fri, 16 Oct 2009 14:55:49 -1000 (HST) Date: Fri, 16 Oct 2009 14:55:49 -1000 (HST) From: Ryo Furue In-reply-to: To: monnier@IRO.UMontreal.CA Cc: 4709@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-id: <20091016.145549.159790690.furue@hawaii.edu> X-Mailer: Mew version 6.2 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.10.17.4530 References: <20091015.082654.165304271.furue@hawaii.edu> X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) Hi Stefan, | > As you can see, the emacs daemon seems to ignore it | > in your ~/.emacs and you still have to manually | > evaluate it on an emacsclient. | | That doesn't sound right. Can you check that the relevant code from | your .emacs is indeed executed? E.g. add a (message "I'm here") and/or | a (setq my-test 'passed) right after the define-key. Thank you for debugging my problem and I'm sorry that that was purely my mistake. I was forgetting that I had a byte-compiled version of .emacs ! So, by (define-key key-translation-map . . .), my original problem has been solved. I'll report this back to gnu.emacs.help . The following is a digression. I normally don't byte-compile my stuff and when I did it, I didn't pay much attention to it because I had the misconception that the newer is used if both .el and .elc are found. I just byte-compiled it "from time to time". I hadn't been interested in byte compilation before emacs23 because the startup of emacs22 (and emacs21 if I remember correctly) was lightening quick. emacs23's startup, on the other hand, is crawlingly slow. That's why I tried byte-compilation (but that didn't help much) and then the emacs daemon (which is a nice solution). Regarding byte compilation, I found these conversations: http://curiousprogrammer.wordpress.com/2009/03/04/compiling-at-emacs-startup/ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2577 I understand there are two schools of thoughts: 1) The byte compiled version is a stable version and the source is a work in progress. Therefore, the byte compiled version should be used. 2) The byte compiled version is just a faster version of the source. Therefore, whichever is the newer should be used. My guess is that view 1 is generally taken by elisp developers and so that's the default behavior of emacs. I guess most "ordinary" users would take View 2; they don't have much elisp code in progress. I'm wondering if there is a simple way to switch between the two behaviors easily and quickly. Anyway, thank you again for your great help. Best regards, Ryo From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Stefan Monnier , 4709@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 17 Oct 2009 02:30:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4709-submit@emacsbugs.donarmstrong.com id=B4709.125574617327344 (code B ref 4709); Sat, 17 Oct 2009 02:30:05 +0000 Received: (at 4709) by emacsbugs.donarmstrong.com; 17 Oct 2009 02:22:53 +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.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9H2MpuF027341 for <4709@emacsbugs.donarmstrong.com>; Fri, 16 Oct 2009 19:22:53 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtAEACfH2EpFpY7q/2dsb2JhbACBUdcEhDEEgVuGIoJ4 X-IronPort-AV: E=Sophos;i="4.44,577,1249272000"; d="scan'208";a="47725809" Received: from 69-165-142-234.dsl.teksavvy.com (HELO ceviche.home) ([69.165.142.234]) by ironport2-out.pppoe.ca with ESMTP; 16 Oct 2009 22:22:46 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 400FBB40DB; Fri, 16 Oct 2009 22:22:46 -0400 (EDT) From: Stefan Monnier To: Ryo Furue Cc: 4709@debbugs.gnu.org Message-ID: References: <20091015.082654.165304271.furue@hawaii.edu> <20091016.145549.159790690.furue@hawaii.edu> Date: Fri, 16 Oct 2009 22:22:46 -0400 In-Reply-To: <20091016.145549.159790690.furue@hawaii.edu> (Ryo Furue's message of "Fri, 16 Oct 2009 14:55:49 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > | That doesn't sound right. Can you check that the relevant code from > | your .emacs is indeed executed? E.g. add a (message "I'm here") and/or > | a (setq my-test 'passed) right after the define-key. > Thank you for debugging my problem and I'm sorry that that was > purely my mistake. I was forgetting that I had a byte-compiled > version of .emacs ! Good, thanks. > I hadn't been interested in byte compilation before emacs23 > because the startup of emacs22 (and emacs21 if I remember > correctly) was lightening quick. emacs23's startup, > on the other hand, is crawlingly slow. That's why > I tried byte-compilation (but that didn't help much) > and then the emacs daemon (which is a nice solution). Emacs-23 is known to be generally slower because of the new font-engine which considers many more font options at startup, but it is not expected to be as much slower as you seem to indicate. So maybe a bug-report about it is in order. > I understand there are two schools of thoughts: > 1) The byte compiled version is a stable version > and the source is a work in progress. Therefore, > the byte compiled version should be used. > 2) The byte compiled version is just a faster version > of the source. Therefore, whichever is the newer > should be used. > My guess is that view 1 is generally taken by elisp > developers and so that's the default behavior of emacs. > I guess most "ordinary" users would take View 2; they > don't have much elisp code in progress. I'm wondering > if there is a simple way to switch between the two > behaviors easily and quickly. No there isn't. Please make it a separate M-x report-emacs-bug if you want such a feature. Stefan From unknown Fri Sep 05 15:36:54 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Reply-To: Glenn Morris , 4709@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 17 Oct 2009 03:25:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4709-submit@emacsbugs.donarmstrong.com id=B4709.12557495692986 (code B ref 4709); Sat, 17 Oct 2009 03:25:07 +0000 Received: (at 4709) by emacsbugs.donarmstrong.com; 17 Oct 2009 03:19:29 +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=-7.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK 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.14.3/8.14.3/Debian-5) with ESMTP id n9H3JRI2002983 for <4709@emacsbugs.donarmstrong.com>; Fri, 16 Oct 2009 20:19:28 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MyzpG-0004a2-EK; Fri, 16 Oct 2009 23:19:26 -0400 From: Glenn Morris To: Stefan Monnier Cc: 4709@debbugs.gnu.org, Ryo Furue References: <20091015.082654.165304271.furue@hawaii.edu> <20091016.145549.159790690.furue@hawaii.edu> X-Spook: Etacs freedom constitution IMF ASO militia security AMEMB X-Ran: w'YaQk$oJlGwZ_6\SeEnKZS?bm?4GO7knuy,@t3rB}H[&M7'k;b-/w86L;Gc"iK?m}#T/Q X-Hue: magenta X-Attribution: GM Date: Fri, 16 Oct 2009 23:19:26 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 16 Oct 2009 22:22:46 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier wrote: > No there isn't. Please make it a separate M-x report-emacs-bug if you > want such a feature. Please don't, since we already have such a wishlist item: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2061 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 17:44:25 2010 Received: (at control) by debbugs.gnu.org; 27 Jan 2010 22:44:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaGcb-0001J9-M3 for submit@debbugs.gnu.org; Wed, 27 Jan 2010 17:44:25 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaGcZ-0001J2-Sx for control@debbugs.gnu.org; Wed, 27 Jan 2010 17:44:24 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NaGcW-00084u-1K; Wed, 27 Jan 2010 17:44:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19296.49603.967710.330328@fencepost.gnu.org> Date: Wed, 27 Jan 2010 17:44:19 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: blue X-Ran: XWw3_DxQ9GeT-'h)Eh"RllV_b`{t:&]Em?+Pg][/Dg%JYA]:t List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) tags 4706 wontfix close 4709 close 4712 tags 4736 = severity 4747 wishlist unarchive 4777 unmerge 4777 reassign 4792 emacs,w32