From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4709: 23.1; keyboard-translate not working with emacs daemon Date: Thu, 15 Oct 2009 16:28:01 -0400 Message-ID: References: <20091014.213455.160674778.furue@hawaii.edu> <20091015.082654.165304271.furue@hawaii.edu> Reply-To: Stefan Monnier , 4709@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255639681 14827 80.91.229.12 (15 Oct 2009 20:48:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Oct 2009 20:48:01 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 4709@emacsbugs.donarmstrong.com To: Ryo Furue Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 15 22:47:50 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MyXEk-0008HV-95 for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Oct 2009 22:47:50 +0200 Original-Received: from localhost ([127.0.0.1]:34625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyXEj-0006Ik-QP for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Oct 2009 16:47:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyXEH-00064X-Sg for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:47:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyXED-00061D-FA for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:47:21 -0400 Original-Received: from [199.232.76.173] (port=44170 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyXEC-000611-Tn for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:47:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49702) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MyXEC-0000cA-BA for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:47:16 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9FKlBwO015051; Thu, 15 Oct 2009 13:47:11 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9FKe5j2013859; Thu, 15 Oct 2009 13:40:05 -0700 Resent-Date: Thu, 15 Oct 2009 13:40:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 15 Oct 2009 20:40:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4709 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125563880413097 (code B ref -1); Thu, 15 Oct 2009 20:40:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 15 Oct 2009 20:33:24 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 n9FKXNRo013093 for ; Thu, 15 Oct 2009 13:33:24 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyX0k-00038c-EU for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:33:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyX0e-00034P-Rk for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:33:20 -0400 Original-Received: from [199.232.76.173] (port=52215 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyX0e-000343-Fy for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:33:16 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:48215) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyWvd-0004HI-6T for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2009 16:28:05 -0400 Original-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 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 2EDC63A07F; Thu, 15 Oct 2009 16:28:01 -0400 (EDT) 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) 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) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 15 Oct 2009 16:47:21 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31971 Archived-At: > | [. . . 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