Questions tagged [server]

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

Emacs can run a server which allows opening files and running commands in an existing Emacs instance.

To start a server in an Emacs instance, run the command server-start. This is automatic if Emacs runs as a .

To open a file or run a command in an existing Emacs instance, use the utility.

Do not use this tag for questions about other kinds of servers! Use a tag that is related to what the server is for.

83 questions
8
votes
1 answer

How to test (programmatically) whether the current Emacs session (among several) is running the Emacs server?

The server-running-p predicate will evaluate to t if the Emacs server is running, irrespective of which Emacs session currently "owns" the server process. Therefore, when there are two or more independent Emacs sessions running simultaneously,…
kjo
  • 3,247
  • 17
  • 48
3
votes
2 answers

How to get the server-name?

When starting a server it's possible to set a name for the server (http://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html). These names are to be useful for connecting emacsclients to those servers, however it would be nice to…
Aaron Lee
  • 377
  • 2
  • 8
3
votes
2 answers

How to make Emacs run from a single Gnome desktop icon?

I often use Emacs with Linux Manjaro and Gnome. I need straightforward access to Emacs from desktop. Therefore, I have pinned the Emacs icon to dash so I can launch Emacs by clicking the Emacs icon. However, the Emacs icon does not activate (has…
2
votes
1 answer

Cannot start Emacs daemon server after forced reboot

I was running Emacs in daemon server mode when my computer was force rebooted. After reboot was complete, I could not start the Emacs server again, receiving the error message: Starting Emacs daemon. Unable to start the daemon. Another instance of…
holocronweaver
  • 1,359
  • 10
  • 22
2
votes
2 answers

bashrc script to automatically create emacs server session on startup?

I want to have .bashrc check to see if an emacs server is currently running, and if not, start one. I know how to start the server but I am not sure how to check whether it is already running - should I just grep the processes for Emacs? Curious if…
Andrew
  • 551
  • 6
  • 18
1
vote
0 answers

Why does server-eval-at seem to change the behavior of read-string?

I am trying to create a script that, when run with emacs, will read commands from stdin a line at a time, execute them in another emacs process (with server-eval-at) and print the result. The process should exit when no more input is available. I…
Chris Hunt
  • 113
  • 4
1
vote
0 answers

is it possible for two people, using different emacs and keybindings to edit the same file synchronously?

I want to pair program with a couple of people but my keybindings in emacs are not the same as theirs. Is there a way to edit the same file but keep the keybindings different?
zcaudate
  • 647
  • 4
  • 14
1
vote
2 answers

Cannot start emacs server

I'm running Debian Jessie. I have installed emacs24-lucid package. I tried running emacs --daemon and got this: Loading 00debian-vars... Loading 00debian-vars...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading…
stranger
  • 111
  • 2
1
vote
0 answers

Emacs reads the server file, before executing the command

I use Emacs as server instance. When I start EMacs Client, he will check if the file .emacs.d/server/server exists. If not so, then he will initiating a Emacs server instance, and my Emacs configuration files will be loaded. Then I start a new…
ReneFroger
  • 3,850
  • 23
  • 66
0
votes
0 answers

Start emacs as tcp server

I'm using GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.5) of 2016-12-20, with arch linux (antergos), I want to start with the option tcp server, so I added and assigment to the variable server-use-tcp, (setq server-use-tcp…
anquegi
  • 749
  • 5
  • 22
0
votes
2 answers

Emacs server exit when losing connection to Xserver

I run Emacs on development host under X Window as: $ emacs24 with ~/.emacs: (require 'server) (server-start) Next when I connect to Emacs as: $ ssh -Y localhost ssh$ emacsclient -c C-x C-c ssh$ exit or as: $ startx xterm -- `command -v Xnest` :1…
gavenkoa
  • 3,452
  • 20
  • 37