emacsclient

How to remove the prompt for killing emacsclient buffers?

After I open something with emacsclient, when I kill that buffer (C-x k) I get a confirmation dialog: Buffer `blah' still has clients; kill it? (yes or no) But when I kill buffers opened directly from Emacs I don't. Is there a way not to get them when emacsclient opened them? ...

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

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 c...

emacs - emacsclient or new frame?

Hi, this is a rather rudimentary question, but what is the practical difference between opening a new file in a separate frame (make-new-frame) from emacs or opening the file in an instance of emacsclient? I can see that if you are working through a terminal, the difference is clear... but can emacsclient additionally restrict the list o...

How can I set the port that the Emacs Server uses?

I use Emacs to do most of my development work, I'd like to be able to connect to the Emacs server running on my office workstation from home. I connect to my office network over a VPN, I think this is mostly safe. Anyway, I have a script that copies the server authentication file out, but it looks like the port changes every time. Our V...

How do I get my cocoa emacs on Mac OS X to load my .emacs visual customizations for new windows (any document opened after the first)?

So I just downloaded emacs 23.1 for my new snow leopard macbook pro from http://emacsformacosx.com/ and it works like a charm, except... I have visual customizations in my .emacs, a few lines are extracted here: (set-background-color "black") (set-cursor-color "green") (set-default-font "--Lucida Console-normal-r-normal-normal-1...

how to run certain elisp code after starting a new emacsclient frame?

For how to automatically evaluate certain lisp code every time starting an emacsclient, click here. My problem is different. I want to write a script that opens a new emacs frame (with focus on it) (one way to do this is to run emacsclient -c) and then run the following elisp code in that frame. (org-remember) I tried emacsclient -c...

How can I make emacsclient just open a window for an existing emacs daemon without opening a new file

I use an emacs daemon to preserve my emacs session even if I have to reboot the machine that I run my X server on or if I want to access the same session from a different machine. This works very well but when restoring a session I'd quite like to just run "emacsclient --create-frame --no-wait" to connect to the daemon without opening a ...

emacsclient window focus

Hi, 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 putt...

Emacsclient hook on kill

Hi I am trying to find a hook in Emacs, which should fire right before emacs server graceful shutdown. I tried kill-emacs-query-functions, kill-emacs-hook, server-done-hook with elisp like : (add-hook 'server-done-hook '(lambda () (savehist-save) ) ) ... but none of them is called when OS...

Desktop.el under emacsclient

Hi I am trying to use desktop functionality (http://www.emacswiki.org/emacs/DeskTop) in emacs. I added following code to my .emacs: (require 'desktop) (setq desktop-save t) (setq desktop-load-locked-desktop t) (setq *desktop-dir* (list (expand-file-name "~/.emacs.d/desktop"))) (setq desktop-base-file-name ".emacs.desktop") (setq deskt...

The emacsclient documentation has an example with %d and %s arguments - what are they

In the emacsclient documentation, an example EDITOR setting is: EDITOR="emacsclient --alternate-editor emacs +%d %s" How can the %d and %s be used? I understand that + starts at the specified line and the %s is the file name to edit, but what program replaces %d and %s the values? For example, if subversion tried to kick of $EDITOR,...