Questions tagged [emacs-daemon]
Starting Emacs in daemon mode
71
questions
0
votes
1answer
11 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
0answers
19 views
emacs daemon Error reading from stdin
I messed up my emacs and having trouble run emacs --daemon properly. I am using GNU Emacs 26.3.
M-x returns Error reading from stdin.
I have following lines on .zshrc:
export ALTERNATE_EDITOR="&...
0
votes
0answers
32 views
Emacs as daemon will not use font config
When using emacs as daemon,
systemctl --user start emacs-27.service
emacsclient -c
and also the following directly:
emacs-27 --fg-daemon
emacsclient -c
the font config in :~/.emacs.d/init.el will ...
0
votes
1answer
51 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 ...
2
votes
0answers
127 views
emasc daemon does not load my init.el completely but emacs do
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
0answers
78 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-...
3
votes
1answer
66 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
1answer
213 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 ...
0
votes
0answers
41 views
emacs-daemon opened buffers get affected by other buffers
I am using emacs-daemon. Lets say many files have already opened using emacsclient.
=> When I open a minibuffer on one emacs frame, all the opened emacsclient buffers get frozen and I cannot type any ...
1
vote
0answers
47 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
1answer
121 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
1answer
127 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
2answers
293 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 ...
0
votes
4answers
415 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
1answer
206 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
0answers
178 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
0answers
19 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
0answers
139 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
1answer
303 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
0answers
47 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
1answer
674 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
2answers
64 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
1answer
101 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 [ “$?”...
1
vote
1answer
233 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:
/...
1
vote
0answers
259 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-...
2
votes
1answer
744 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
1answer
133 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
0answers
172 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
1answer
386 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
2answers
148 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
0answers
168 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
2answers
742 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
1answer
326 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
1answer
172 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
0answers
75 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
1answer
226 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
2answers
313 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
2answers
560 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 ...
0
votes
1answer
45 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....
2
votes
1answer
1k 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 ...
3
votes
1answer
1k 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?
12
votes
5answers
3k views
Emacs client can't find server in terminal
So, I'm trying to set up emacs as a server but I'm having trouble getting it to work from the terminal. If I run emacs --daemon on some terminal I can connect to it if I run the emacsclient from that ...
3
votes
0answers
594 views
Starting daemon without forking to background
I want to run an Emacs daemon under daemontools. So I need to create an Emacs process which
Basically does emacs --daemon
Does stay in the foreground
Displays the Messages buffer (or some other ...
3
votes
1answer
389 views
Restoring Emacs desktops with daemon + clients
How to use Emacs desktop functionality with emacs daemon + emacsclient instances?
I've enabled (desktop-save-mode 1) in my init file, and when I start the daemon I see messages like this:
Desktop: 1 ...
1
vote
1answer
167 views
Applying additional display settings on new client frames
I have the following function in my emacs config:
(defun *make-frame-pretty (frame)
"`*make-frame-pretty' will apply additional theme settings to make it prettier"
;; Add a fringe.
;; It's ...
2
votes
0answers
168 views
reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place [duplicate]
I added (desktop-save-mode 1) to my custom.el towards the end to save buffers and frames. But I primarily use emacs --daemon and start an emacsclient -t. For some reason, if I use just Emacs the ...
0
votes
1answer
2k views
How can I get `emacs --daemon` to load the Spacemacs configuration?
I have configured my ~/.emacs so: It either launches default emacs via the default init.el, or runs the Spacemacs init.el
I run Spacemacs via a spacemacs shell script, ~/bin/spacemacs
#!/bin/sh
...
3
votes
2answers
303 views
server-start with dynamic server-name
I'm using (server-start) in my init.el, but I'd like to be able to launch multiple server instances, every time I launch emacs.
Today, server-start complains if the server is already launched.
It ...
7
votes
1answer
1k views
how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?
I know that if I set:
(setq confirm-kill-emacs 'y-or-n-p)
Emacs prompts me before I kill it.
But I want emacs to prompt me before I close my last gui frame (prompting me before killing any frame ...
2
votes
1answer
400 views
emacs --daemon is not loading gui elements
I defined emacsclient as default editor in .bashrc so emacs -daemon will be called upon startup:
export ALTERNATE_EDITOR=""
export EDITOR=emacsclient
But compared to a normal load without ...