all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7261: emacsclient ignores keyboard-translate in .emacs
@ 2010-10-21 13:58 phillip.wood
  2010-10-21 15:18 ` bug#7261: Further information phillip.wood
  2012-07-18 13:27 ` bug#7261: emacsclient ignores keyboard-translate in .emacs Chong Yidong
  0 siblings, 2 replies; 4+ messages in thread
From: phillip.wood @ 2010-10-21 13:58 UTC (permalink / raw)
  To: 7261

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]


 

 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.




[-- Attachment #2: Type: text/html, Size: 1022 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7261: Further information
  2010-10-21 13:58 bug#7261: emacsclient ignores keyboard-translate in .emacs phillip.wood
@ 2010-10-21 15:18 ` phillip.wood
  2012-07-18 13:27 ` bug#7261: emacsclient ignores keyboard-translate in .emacs Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: phillip.wood @ 2010-10-21 15:18 UTC (permalink / raw)
  To: 7261

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]


 

 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



[-- Attachment #2: Type: text/html, Size: 424 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7261: emacsclient ignores keyboard-translate in .emacs
  2010-10-21 13:58 bug#7261: emacsclient ignores keyboard-translate in .emacs phillip.wood
  2010-10-21 15:18 ` bug#7261: Further information phillip.wood
@ 2012-07-18 13:27 ` Chong Yidong
  2012-07-19  8:00   ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2012-07-18 13:27 UTC (permalink / raw)
  To: phillip.wood; +Cc: 7261

phillip.wood@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))))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug#7261: emacsclient ignores keyboard-translate in .emacs
  2012-07-18 13:27 ` bug#7261: emacsclient ignores keyboard-translate in .emacs Chong Yidong
@ 2012-07-19  8:00   ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2012-07-19  8:00 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel, phillip.wood

> 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))))

Reminds me: could someone add a terminal-init-hook?


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-19  8:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 13:58 bug#7261: emacsclient ignores keyboard-translate in .emacs phillip.wood
2010-10-21 15:18 ` bug#7261: Further information phillip.wood
2012-07-18 13:27 ` bug#7261: emacsclient ignores keyboard-translate in .emacs Chong Yidong
2012-07-19  8:00   ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.