As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [server]

The Emacs server, which allows opening files and running commands in an existing Emacs instance

Filter by
Sorted by
Tagged with
7 votes
1 answer

Run elisp from command line in running emacs

How can I execute elisp in the currently running emacs from the command line? The following command echoes 'hi' but doesn't set 'abc in the emacs instance. emacsclient --no-wait --eval '(message "hi"...
Joe's user avatar
  • 1,302
8 votes
2 answers

Multiple Emacs instances each with their own server?

In my setup, I have several (GNU) Emacs instances running simultaneously on my local machine, one for each project or task that I'm currently working on. I would like to be able to open buffers in an ...
Felix Hoffmann's user avatar
4 votes
1 answer

server-edit vs kill-buffer to kill an emacsclient buffer

I use emacsclient to open files from my webrowser (pdfs, text files etc). When I'm done with the file, I know I need to close it with C-x # (server-edit); if I use C-x k (kill-buffer) I get a warning ...
Tyler's user avatar
  • 21.4k
4 votes
1 answer

From an external script, open file and run some simple expression whether emacs already running or not

Context / initial need (works fine) I wrote and use a script that generates a file and uses emacsclient to edit it in an existing or new instance of emacs, in a new window. Similar to Set up Emacs ...
Stéphane Gourichon's user avatar
3 votes
1 answer

How to debug emacsclient?

Sometimes emacsclient fails with an error like: $ emacsclient .gitlab-ci.yml Waiting for Emacs... *ERROR*: Args out of range: 63695, 1, 1173 How can I debug this? emacsclient has no debug option, no ...
charmoniumQ's user avatar
1 vote
0 answers

Can emacs on Mac using native window system connect to an emacs server on a Linux system

At this point I believe I am using the emacs version on my Mac that is built by Homebrew and the "stock" emacs on Ubuntu 18.04. I set up emacs server on the Ubuntu host as it is described in Starting ...
pedz's user avatar
  • 365
1 vote
0 answers

How to RPC from External Process to Emacs

How can I RPC from an external application into Emacs then have a function in Emacs handle the RPC? For example, I would like to make a D3.js webpage with a dependency graph of a codebase, view and ...
tboyce12's user avatar
  • 312