GNU bug report logs - #7261
emacsclient ignores keyboard-translate in .emacs

Previous Next

Package: emacs;

Reported by: phillip.wood <at> talktalk.net

Date: Thu, 21 Oct 2010 14:30:04 UTC

Severity: normal

Tags: notabug

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7261 in the body.
You can then email your comments to 7261 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7261; Package emacs. (Thu, 21 Oct 2010 14:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to phillip.wood <at> talktalk.net:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 Oct 2010 14:30:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: phillip.wood <at> talktalk.net
To: bug-gnu-emacs <at> gnu.org
Subject: emacsclient ignores keyboard-translate in .emacs
Date: Thu, 21 Oct 2010 09:58:18 -0400
[Message part 1 (text/plain, inline)]
 

 I am using emacs 23.2.1 in X under Arch Linux with the following .emacs

;; ; Make “C-t” act like “C-x”,
;; ; so it's easier to type on Dvorak layout
 (keyboard-translate ?\C-t ?\C-x)
 (keyboard-translate ?\C-x ?\C-t)

If I start emacs normally then the keys are translated. If I start emacsclient with 

GDK_NATIVE_WINDOWS=1 emacsclient --alternate-editor="" -c 

Then the keys are not translated on startup, but I can translate them by opening my .emacs file and running eval-region

If I add other commands to .emacs they are executed correctly but I still don't get any key translation. This bug is present in builds with both lucid and gtk. It seems really weird that key translation breaks when other commands in .emacs are ok.



[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7261; Package emacs. (Thu, 21 Oct 2010 15:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 7261 <at> debbugs.gnu.org (full text, mbox):

From: phillip.wood <at> talktalk.net
To: 7261 <at> debbugs.gnu.org
Subject: Further information
Date: Thu, 21 Oct 2010 11:18:12 -0400
[Message part 1 (text/plain, inline)]
 

 If I start emacs normally and then start the server with

M-x server-start

then start emacsclient the key translation works in the client frame. The problem only occurs when emacsclient starts the server


[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7261; Package emacs. (Wed, 18 Jul 2012 13:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 7261 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: phillip.wood <at> talktalk.net
Cc: 7261 <at> debbugs.gnu.org
Subject: Re: bug#7261: emacsclient ignores keyboard-translate in .emacs
Date: Wed, 18 Jul 2012 21:27:25 +0800
phillip.wood <at> talktalk.net writes:

> ;; ; Make “C-t” act like “C-x”,
> ;; ; so it's easier to type on Dvorak layout
> (keyboard-translate ?\C-t ?\C-x)
> (keyboard-translate ?\C-x ?\C-t)
>
> If I start emacs normally then the keys are translated. If I start
> emacsclient with 
>
> GDK_NATIVE_WINDOWS=1 emacsclient --alternate-editor="" -c 
>
> Then the keys are not translated on startup, but I can translate them
> by opening my .emacs file and running eval-region

keyboard-translate only acts on the current terminal, since
keyboard-translate-table is a terminal-local variable.  I will update
the docstring to make this clearer.

What you probably want is to do something like

(add-hook 'after-make-frame-functions
	  (lambda (f) (with-selected-frame f
			  (keyboard-translate ?\C-t ?\C-x))))




Added tag(s) notabug. Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 Jul 2012 13:34:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7261 <at> debbugs.gnu.org and phillip.wood <at> talktalk.net Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 18 Jul 2012 13:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Aug 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.