Questions tagged [emacs-daemon]
Starting Emacs in daemon mode
83
questions
0
votes
0
answers
31
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 ...
0
votes
1
answer
52
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-...
0
votes
1
answer
36
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 ...
1
vote
1
answer
69
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 ...
2
votes
0
answers
22
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 ...
1
vote
0
answers
140
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/...
-1
votes
1
answer
38
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-...
0
votes
1
answer
107
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 ...
0
votes
1
answer
254
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 ...
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?
0
votes
1
answer
198
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).
...
0
votes
2
answers
271
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 ...
1
vote
1
answer
90
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 ...
0
votes
0
answers
64
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
(...
0
votes
2
answers
953
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 ...
2
votes
1
answer
164
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) ...
0
votes
1
answer
187
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 ...
3
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 ...
0
votes
0
answers
325
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-...
4
votes
1
answer
422
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? ...
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 ...
1
vote
0
answers
75
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 ...
2
votes
1
answer
281
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 ...
1
vote
1
answer
295
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 ...
2
votes
2
answers
890
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 ...
2
votes
4
answers
3k
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 ...
0
votes
1
answer
739
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 ...
1
vote
0
answers
341
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 -...
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="...
0
votes
0
answers
192
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 ...
1
vote
1
answer
806
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-...
0
votes
0
answers
72
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 ...
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 ...
1
vote
2
answers
127
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 ...
1
vote
1
answer
282
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 [ “$?”...
2
votes
1
answer
676
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:
/...
2
votes
0
answers
410
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-...
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;/...
2
votes
1
answer
217
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-...
0
votes
0
answers
323
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 = ...
1
vote
1
answer
552
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 ...
0
votes
2
answers
188
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 ...
1
vote
0
answers
272
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 ...
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 - ...
3
votes
1
answer
578
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 ...
0
votes
1
answer
390
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 ...
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 ...
1
vote
1
answer
250
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 ...
0
votes
2
answers
561
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 ...
3
votes
2
answers
729
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 ...