emacsclient

emacsclient window focus

若如初见. 提交于 2019-12-01 15:18:50
How do I consistently control window focus after running emacsclient? Currently, focus depends on if I already have an emacs server running. When emacsclient invokes an alternative editor, focus is shifted to the new emacs window. When emacsclient connects to an existing emacs server, focus is not shifted (ie. it stays on my putty client). I would like to consistently focus on the emacs window, since I usually go to emacs after opening a file. Any help would be greatly appreciated! Notes Version Info emacs: 21.4.1 emacsclient: 21.4 client os: Windows XP Service Pack 3 x server: Exceed 11.0.0.0

How to set emacsclient background as Emacs background?

匆匆过客 提交于 2019-12-01 08:37:40
I've got (in my .emacs) (set-background-color "#101416") (set-foreground-color "#f6f3e8") And I've got 2 bindings: alias ex='emacsclient -nw' alias ec='emacsclient -c -a ""' ex works fine to open client in terminal but when I want to open it as a frame I've got white background :( Why and how can I use my dark background there? set-background-color and set-foreground-color only affect the current frame, and your .emacs file is not executed when running emacsclient . Try setting the variable default-frame-alist ("Alist of default values for frame creation") instead: (setq default-frame-alist '(

How to set emacsclient background as Emacs background?

百般思念 提交于 2019-12-01 07:15:45
问题 I've got (in my .emacs) (set-background-color "#101416") (set-foreground-color "#f6f3e8") And I've got 2 bindings: alias ex='emacsclient -nw' alias ec='emacsclient -c -a ""' ex works fine to open client in terminal but when I want to open it as a frame I've got white background :( Why and how can I use my dark background there? 回答1: set-background-color and set-foreground-color only affect the current frame, and your .emacs file is not executed when running emacsclient . Try setting the

Run command on new frame with daemon/client in Emacs

杀马特。学长 韩版系。学妹 提交于 2019-11-29 11:07:46
This is perhaps quite simple, but I haven't found anything useful when googling. So here it goes :) I use Emacs in daemon mode ( emacs --daemon ) and it's really handy. I also use dvorak and have found that remapping C-j to C-c (and vice versa) is really handy in the long run, and use the following for making that translation: (keyboard-translate ?\C-j ?\C-c) (keyboard-translate ?\C-c ?\C-j) This works great when not using Emacs as a daemon. When I start a new client (cli/gui) C-j is no longer bound to C-c . Whaaat? So I guess I'll need to run the keyboard-translate after creating a new client

How to automatically evaluate certain lisp code after starting an emacsclient?

白昼怎懂夜的黑 提交于 2019-11-28 23:27:03
When starting Emacs, init.el (or .emacs.el) is evaluated. However, when starting emacsclient, no similar lisp code is evaluated. How can I get a lisp file to be evaluated every time I open a new emacsclient? (This would be handy for frame specific customizations.) I assume the answer is to use some hook, but I can't seem to find the correct hook to use. I look forward to your answers. You can add a function to the hook 'server-visit-hook , which is run every time the server is called (every time you call emacsclient ). I use the following code to automatically change the behavior of server

Using Emacs server and emacsclient on other machines as other users

天大地大妈咪最大 提交于 2019-11-28 15:39:17
I know that after I call (start-server) inside an existing Emacs session I can then use emacsclient -c (on the same computer) to create new frames that connect into that server, so that each new frame created by emacsclient has access to the same set of shared state (e.g. buffers). Most of the documentation I've found focuses on the "give me fast access to my local Emacs" use case, and so there are two things that I haven't seen any details of yet: Can emacsclient -c access Emacs servers started by other users, or is it hard-wired to detect only sessions started by my own user? Does Emacs

Run command on new frame with daemon/client in Emacs

不问归期 提交于 2019-11-28 04:56:00
问题 This is perhaps quite simple, but I haven't found anything useful when googling. So here it goes :) I use Emacs in daemon mode ( emacs --daemon ) and it's really handy. I also use dvorak and have found that remapping C-j to C-c (and vice versa) is really handy in the long run, and use the following for making that translation: (keyboard-translate ?\C-j ?\C-c) (keyboard-translate ?\C-c ?\C-j) This works great when not using Emacs as a daemon. When I start a new client (cli/gui) C-j is no

How to automatically evaluate certain lisp code after starting an emacsclient?

时间秒杀一切 提交于 2019-11-27 14:45:59
问题 When starting Emacs, init.el (or .emacs.el) is evaluated. However, when starting emacsclient, no similar lisp code is evaluated. How can I get a lisp file to be evaluated every time I open a new emacsclient? (This would be handy for frame specific customizations.) I assume the answer is to use some hook, but I can't seem to find the correct hook to use. I look forward to your answers. 回答1: You can add a function to the hook 'server-visit-hook , which is run every time the server is called