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

Questions tagged [emacs-daemon]

Starting Emacs in daemon mode

Filter by
Sorted by
Tagged with
2 votes
0 answers
10 views

Eventually, emacsclient -nw freezes?

I use emacs --daemon to launch GUI clients when using emacs. Recently I started to use emacsclient -nw to launch the TUI version of emacs within tmux. It works great. Eventually though, whether I am ...
Vinn's user avatar
  • 263
1 vote
0 answers
39 views

Can't start emacs.service, but manual start works fine

My emacs.service looks like this: denis@dgecko:~> cat /home/denis/.config/systemd/user/emacs.service [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/...
dgan's user avatar
  • 143
-1 votes
1 answer
33 views

Emacs application doesn't play well with emacs daemon

Using the zsh function emacs () { visible_frames () { emacsclient -a "" -e '(length (visible-frame-list))' } change_focus () { emacsclient -n -e "(select-frame-set-input-...
rogerl's user avatar
  • 205
0 votes
1 answer
51 views

How can I load properly full configuration with GUI elements and desktop parameters with `emacs --daemon` and `emacsclient -c`

Everything works fine when using regular Emacs. Now when I try to use the same init.el file with emacs --daemon and emacsclient -c I get an error. I have thought about using different configuration ...
Herman's user avatar
  • 5
0 votes
1 answer
89 views

Systemd starts emacs daemon without XAUTHORITY environment variable after upgrading to Fedora 37

Problem I am running Emacs daemon as a user service using Systemd, following the documentation in EmacsWiki. I configured it while using Fedora-36, and everything was working as expected. Once I ...
Thomas's user avatar
  • 105
0 votes
0 answers
22 views

org-agenda-switch-to places point incorrectly when viewing org source file

I often run org-agenda-list to view my org agenda. Then, when I press Enter (org-agenda-switch-to) on an item in the agenda, the org file (todo.org) with the item is opened, as expected. I also run ...
Rufus M's user avatar
2 votes
1 answer
42 views

How to NOT connect to daemon?

When invoking emacs, is there a way to specify that it should not connect to any emacs daemon, but instead should run as an isolated instance?
ivan's user avatar
  • 1,898
0 votes
1 answer
134 views

Fallback font for specific face

I'm trying to set a fallback font for variable-pitch face. More specifically, my current setup is: Default font set to JuliaMono with size 15 via (set-frame-font "JuliaMono 15" nil t). ...
Jay Lee's user avatar
  • 131
0 votes
2 answers
170 views

How to always work from a daemon and always reuse an existing frame? (bonus: do it with chemacs2)

I'm new to emacs. I'm a spacemacs implant, really love ORG mode and evil mode. Been using for the past year or so. I've read some of the emacs documentation, which is fantastically written. But I'm ...
Lockszmith's user avatar
1 vote
1 answer
62 views

Let emacsclient try to reconnect after running alternate_editor

If I set alternate_editor to an empty string, emacsclient runs "emacs --daemon" and then tries to reconnect. However, I want to run it a specific emacs executable that is not in my path. If ...
M0M0's user avatar
  • 143
0 votes
0 answers
58 views

Org Mode bullets indentation display differently between normal and server mode

Does anybody has any clue why the same configuration yield different appearances between normal vs server-mode ? Here's the normal mode (the correct one) And here's when run Emacs in server-mode (...
Sake's user avatar
  • 315
0 votes
2 answers
664 views

What is emacs : daemon, emacsclient, tcp-server?

I want to know about why they are used? , what are they? what is daemon in emacs, Why Should/shouldnot i use "emacs" instead of "emacsclient --create-frame" ? what is client and ...
Because i hate myself's user avatar
2 votes
1 answer
138 views

How to open sourcegraph files directly in Emacs on Linux

There's the open-in-editor extension on sourcegraph, which Adds a button at the top of files in both Sourcegraph app and code hosts like GitHub (when the Sourcegraph browser extension is installed) ...
Lucius Hu's user avatar
  • 131
0 votes
1 answer
169 views

emacs 27 (lucid toolkit) daemon crashes every couple of minutes

Some variant of this has been asked before - emacs daemon crashing when it has been built with Gtk3 etc - but I couldn't find any solution to this. I've built Emacs 27.1 from source on Xubuntu 20.04 ...
aNaravi's user avatar
  • 73
2 votes
0 answers
1k views

Emacs daemon does not load my init.el completely but plain emacs does

When I run emacs, everything is ok, my init.el is read. However, after starting a daemon (emacs --daemon), an emacsclient GUI frame (emacsclient -c) is not configured for the following setting: font ...
ali b's user avatar
  • 163
0 votes
0 answers
264 views

emacsclient crashes on start

I use doom emacs. Starting emacs normally works just fine. Having an emacs daemon and trying to use emacsclient -c causes the following error: *ERROR*: Symbol’s function definition is void: persp-mode-...
The Light Spark's user avatar
3 votes
1 answer
323 views

How are a daemon and a server different in Emacs?

After running (server-start) in Emacs, I evaluated (daemonp) and (server-running-p) The first one returns nil, whereas the second one returns t. So, how are a daemon and a server different in Emacs? ...
zell's user avatar
  • 163
1 vote
1 answer
949 views

Emacsclient not loading init file changes

Context: I just updated Emacs via homebrew; I don't remember the steps I followed to get Emacs to run via daemon originally, but since the update it doesn't seem to be using it anymore (i.e. quitting ...
Bu ZD's user avatar
  • 13
1 vote
0 answers
66 views

Accidentally started emacs --daemon, and couldn't kill it!

I was testing emacs --daemon functionality, and called two daemons alive. I wanted to kill them, with $ pgrep emacs 275760 275857 $ pkill emacs $ pgrep emacs 276788 276847 # It's alive again! # Lemme ...
Student's user avatar
  • 215
2 votes
1 answer
241 views

Using multiple tty emacsclient with "C-x 5" other frame commands

I'm using emacs in daemon mode on a server and connecting over ssh in a terminal console (tty) window (i.e. no GUI support). I'm invoking emacsclient using in the tty window (window here refers to OS ...
Phil's user avatar
  • 523
1 vote
1 answer
271 views

Make Emacs systemd service kill when logging out/shutting down

I am trying to use desktop-save-mode together with emacs daemon. ;; save desktop before quitting (add-hook 'kill-emacs-hook (lambda () (desktop-save "~/.emacs.d/"))) But when I log out of the ...
Daanturo's user avatar
  • 170
2 votes
2 answers
784 views

Preload problem: Emacs as daemon in X

Background: I want to use emacs like tmux which can run as persistent session as well as shorten the time for me to start bringing up emacs when I want to (as inspired by these: Emacs and a Tmux ...
menuhin's user avatar
  • 305
1 vote
4 answers
2k views

How to refresh emacs server after changes to init file or packages?

I recently managed to get Emacs server to work. But after I worked on my init file and changed some code in one elpa package, the changes were not visible. I did the load-file for ~/.emacs, and ...
tsatziq's user avatar
  • 11
0 votes
1 answer
598 views

set-frame-size does not work on emacsclient

I have set up Emacs daemon on Windows 10. My Emacs version is GNU Emacs 25.3.1 I have some code in my init.el which resizes the frame size automatically when Emacs starts up. The code is ;; Select a ...
aks's user avatar
  • 135
1 vote
0 answers
321 views

emacs.service will delay 2 mins before `reboot/shutdown` my computer

I use emacs a lot and restart it since I change my init.el from time to time, so I started to use emacs.service about one year ago using command like systemctl --user enable emacs.service systemctl -...
CodyChan's user avatar
  • 2,589
1 vote
0 answers
25 views

Switching Emacs server's socket without leaving existing emacs gui

I would like to switch between emacs socket without leaving the GUI. I am able to start two emacs daemon session by doing the following: In xterm1: emacs --daemon="one" In xterm2: emacs --daemon="...
user9870's user avatar
0 votes
0 answers
184 views

Segmentation fault when creating new frames

I am reproducibly experiencing segmentation faults on Emacs 26.3 under Debian Buster when creating a new frame, which seems to be related to setting fonts for new frames. In order to illustrate I ...
andreas-h's user avatar
  • 1,539
1 vote
1 answer
686 views

Running Emacs server from snap installation

I've installed Emacs 26.2 using snap on Lubuntu 18.04. I'm trying to figure out how to get the server/client/daemon going. I've done as instructed on EmacsWiki: "Emacs Client" by putting (server-...
granti128's user avatar
0 votes
0 answers
68 views

How to have list of program on `dired-do-shell-command` with Emacs server started by systemd

I'm using Emacs as a server started by the systemd user unit. And on any dired buffer when i try to do dired-do-shell-command or dired-do-async-shell-command I cannot autocomplete any program and ...
sribaroud's user avatar
2 votes
1 answer
2k views

Launch an emacsclient instance in a new terminal window

I am using Sway/wlroots and I decided to switch to using terminal emacs for the forseeable future as there is no transparency in the xwayland version of emacs. I previously bound emacs to run as a ...
tgunnoe's user avatar
  • 123
1 vote
2 answers
117 views

Emacs daemon preventing correct operation of saveplace

Writes to saveplace are not persisting after the emacs daemon stops. Saveplace is configured in my init file as: ;; saveplace remembers your location in a file when saving files (use-package ...
MattHusz's user avatar
  • 177
1 vote
1 answer
243 views

How do I specify a daemon to start with alternate emacs version with emacsclient

I have found this script from here #!/usr/bin/env zsh # Checks if there's a frame open emacsclient -n -e “(if (> (length (frame-list)) 1) ‘t)” 2> /dev/null | grep t &> /dev/null if [ “$?”...
Eric Hansen's user avatar
2 votes
1 answer
594 views

Unable to use emacsclient with emacs server when running mac port of emacs

I am running the mac port version of emacs that I installed via homebrew (see here). I'm also trying to run the Emacs server to avoid long startup times. To do this, I first run the server: /...
fraxture's user avatar
  • 338
2 votes
0 answers
377 views

Global display line numbers mode not working

I can run (display-line-numbers-mode) and get line numbers but it doesn't work if I run (global-display-line-numbers-mode) (nothing happens). I have traced this to this function: (defun display-line-...
Joseph Garvin's user avatar
3 votes
1 answer
1k views

emacs daemon and ssh agent forwarding

In order to use ssh agent forwarding with emacs in daemon mode, running on a remote server, I've come-up with the following. I have an alias for the client like so: alias emacsclient="update_agent;/...
Phil's user avatar
  • 523
2 votes
1 answer
200 views

extra frame in (visible-frame-list) when started in daemon mode, is causing problems

When I start emacs (emacs), and then eval (visible-frame-list), I get a list with one frame, the one that is visable. However if I start emacs as a daemon (emacs --daemon), and then eval (visible-...
ctrl-alt-delor's user avatar
0 votes
0 answers
307 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
John DeBord's user avatar
1 vote
1 answer
499 views

emacs --daemon crashes when parent ssh session dies

I'm using emacs 26.1 (although I don't think this is a new issue with this verison). Note - this is not the GTK bug which results in the daemon crashing if X Connectivity is lost. I am aware of that ...
Phil's user avatar
  • 523
0 votes
2 answers
165 views

Emacs, .historian and root user

I use the following alias: alias e='emacsclient -a '\'''\'' -t alias sudo='sudo ' That way I can execute both, commands and aliases, with sudo, including e, which launchs the emacs server if it is ...
ABu's user avatar
  • 270
1 vote
0 answers
235 views

Running Emacs as a client does not load my settings

I'm using the new systemd daemon option with Emacs 26. I have a problem, though. If I open a client instance (emacsclient -c) no config files (my .emacs) are loaded. So I don't see the usefulness in ...
NVaughan's user avatar
  • 1,461
7 votes
2 answers
1k views

Unable to connect using emacsclient

I am starting the emacs server using systemctl --now --user enable emacs That server is running, if I run systemctl --user status emacs I got $ systemctl --user status emacs ● emacs.service - ...
nanounanue's user avatar
3 votes
1 answer
526 views

tool-bar in emacsclient

I have the following for ridding of the toolbar on startup in graphical mode in my init configuration: (if window-system (tool-bar-mode -1) ) the issue: it works fine (albeit slow...see this ...
manandearth's user avatar
  • 2,058
0 votes
1 answer
324 views

Remote emacs daemon setup?

I've got a "shell account" on a distant server and I've done a successful local user setup of Emacs 25. Now I'd like to have a bash alias that will start an Emacs daemon and give me (a) client(s) to ...
147pm's user avatar
  • 2,887
2 votes
0 answers
86 views

Showing different project-trees in different instances of emacs daemon

At this point I usually hook up into my emacs-daemon using emacsclient -a "" -c "$@". When I also want to display my project using Neotree, this works well for only one instance but if I open a file ...
Boris's user avatar
  • 21
1 vote
1 answer
240 views

Running emacs client: how do you know if the init files had errors loading

I use emacs 25, in nw mode, with "alias emacs='emacsclient -nw'" When I add something to my personal.el, I do brew services restart emacs My issue is, if I make a big blunder inside my personal.el ...
american-ninja-warrior's user avatar
0 votes
2 answers
513 views

Preserving Layout Using emacsclient

If I spawn Emacs in --daemon mode, I can then use emacsclient to connect to the daemon from within a terminal window. If this then dies, I can reconnect my terminal and my Emacs session is still ...
Phil's user avatar
  • 523
3 votes
2 answers
680 views

If emacsclient already open, new emacsclient should "inherit" its buffer list

My workflow involves splitting frames a lot because I use i3wm. If I use the emacs native make-frame-command, the new frame will be visiting the buffer I invoked the command in. If I call emacsclient ...
yafov's user avatar
  • 304
0 votes
1 answer
50 views

Commandline identify 'classic' process without starting daemon?

summary Emacs processes currently (since version=23?) can be run from a "normal"/non-Emacs commandline in 1 of 3 modes: classic. (AFAICS this is my usage--please correct if there is a preferred term....
TomRoche's user avatar
  • 592
2 votes
1 answer
2k views

How to gracefully kill clientless daemon from commandline?

summary What to utter from commandline to cause a running clientless Emacs daemon/server process to gracefully shutdown--i.e., clean up after itself, then exit--without creating additional Emacs ...
TomRoche's user avatar
  • 592
3 votes
1 answer
2k views

Changing the location of the emacs server socket

When I run emacs --daemon it creates a socket at /tmp/emacs1000/server How can I tell it to use a different location?
izkon's user avatar
  • 1,768