Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [emacs-daemon]

Starting Emacs in daemon mode

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Modes aren't enabled properly when visiting a buffer saved in a perspective (persp-mode.el)

I'm an emacs noob, forgive me for any incorrect terminology or missing some important details. I'm using persp-mode.el, but perspective.el was susceptible to the same problem. The problem is, after I ...
Pavel Gurkov's user avatar
1 vote
0 answers
214 views

How to run emacs as a systemd service with Wayland on Ubuntu 22.04+?

The stock systemd user service file for emacs 29.1 looks like this: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ [Service] Type=notify ...
donatello's user avatar
  • 111
1 vote
0 answers
67 views

How to keep buffers when closing only Emacs client?

I use Emacs 29.1. When I open Emacsclient, I do it with the following command: emacsclient -a -c --create-frame --no-wait This is bounded to a key combination to start the Emacsclient. To kill a ...
ReneFroger's user avatar
  • 3,880
0 votes
1 answer
98 views

Setting (desktop-save-mode t) in init file calls (desktop-read) immediately when starting Emacs in daemon mode. How to avoid?

Previously, I used GUI Emacs, everything worked perfectly - the desktop was saved and restored as it should be. I decided to try Emacs in daemon mode. First I made changes to the init.el file: (custom-...
Herman's user avatar
  • 57
0 votes
1 answer
62 views

frame hook load theme causes frame to crash after creation

I have attempted to change my emacs theme. I am using the emacs daemon and I have attempted to create a hook to change the theme on frame creation. However when this hook is active the frame crashes ...
Progamer's user avatar
1 vote
1 answer
86 views

Problem with packages when emacs is run as a daemon

I have a very odd problem when Emacs daemon is started by the system. Currently, I work on: Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03 After ...
Celdor's user avatar
  • 131
2 votes
0 answers
38 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
  • 293
2 votes
0 answers
201 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
  • 153
-1 votes
1 answer
40 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
176 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
  • 57
0 votes
1 answer
384 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
2 votes
1 answer
49 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,948
0 votes
1 answer
254 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
  • 143
0 votes
2 answers
402 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
104 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
70 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
  • 335
0 votes
2 answers
1k 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 ...
Rajanboy's user avatar
  • 123
2 votes
1 answer
169 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
208 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
  • 83
4 votes
0 answers
2k 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
  • 193
0 votes
0 answers
392 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
7 votes
1 answer
528 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
  • 203
1 vote
1 answer
1k 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
82 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
  • 225
2 votes
1 answer
314 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
  • 535
1 vote
1 answer
328 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
  • 180
2 votes
2 answers
984 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
  • 325
2 votes
4 answers
4k 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
  • 21
0 votes
1 answer
872 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
  • 145
1 vote
0 answers
354 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,649
1 vote
0 answers
26 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
199 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,559
1 vote
1 answer
927 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
75 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
139 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
310 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
744 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
420 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
  • 535
2 votes
1 answer
240 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
1 vote
0 answers
351 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
577 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
  • 535
0 votes
2 answers
195 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
  • 280
1 vote
0 answers
289 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,481
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
623 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,128
0 votes
1 answer
434 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,969
2 votes
0 answers
89 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
253 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