Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [emacs-daemon]

Starting Emacs in daemon mode

7
votes
2answers
4k views

How can I run Emacs 24.x app on Mac OS X in daemon mode

I want to run the Emacs.app in daemon mode on Mac OS X. I can run emacs in daemon mode via the terminal, but instructions for running the app in a client-server pattern do not work (e.g.: http://...
2
votes
0answers
153 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 ...
2
votes
1answer
71 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-...
2
votes
1answer
36 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
40 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
35 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 [ “$?”...
6
votes
5answers
1k 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 ...
0
votes
2answers
88 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 ...
0
votes
1answer
81 views

Emacs daemon multiple buffers for same file

When running Emacs as a daemon, function find-file automatically selects and uses a preexisting buffer that is visiting the same file. My problem is, when using the same buffer in multiple frames ...
1
vote
0answers
38 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: /...
0
votes
1answer
109 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 ...
1
vote
0answers
111 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-...
7
votes
2answers
318 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 - ...
2
votes
1answer
141 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;/...
4
votes
3answers
3k views

Emacs 24.5.1 on Windows: How to use server mode?

I used to have Emacs 25.xx on my windows pc and was very happy with the daemon/server mode of emacs. Emacs started via batch-script on startup and everything worked fine -- on every subsequent call ...
0
votes
0answers
59 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 = ...
0
votes
0answers
91 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 ...
3
votes
1answer
616 views

server-edit vs kill-buffer to kill an emacsclient buffer

I use emacsclient to open files from my webrowser (pdfs, text files etc). When I'm done with the file, I know I need to close it with C-x # (server-edit); if I use C-x k (kill-buffer) I get a warning ...
1
vote
1answer
172 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 ...
2
votes
1answer
126 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
86 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 ...
3
votes
2answers
302 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 ...
3
votes
0answers
48 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 ...
0
votes
1answer
90 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 ...
2
votes
1answer
169 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 ...
0
votes
1answer
32 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....
3
votes
3answers
207 views

Edit file only once and close it

Is there a way to edit a file only once? So that for example: I open it and its closed (the buffer is killed) after the window closes. A clarification: I usually have an Emacs deamon running and open ...
2
votes
1answer
584 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 ...
2
votes
1answer
596 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?
2
votes
0answers
370 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
0answers
150 views

Faces not set immediately after load-theme

I'm trying to set the faces of highlight-indent-guides automatically whenever a new theme is loaded by making small adjustments to the background color of the default face. I have everything working ...
1
vote
1answer
85 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
700 views

Emacs daemon not working properly, Emacs server runs fine

Version GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 Xubuntu 16.04, Linux kernel 4.4 In my .emacs I have the following settings (require 'server) (unless (server-...
1
vote
1answer
227 views

How to check for emacs being initialized in daemon mode?

I use emacs gui in daemon mode and also in standalone terminal mode. There is a package that I just want to use when I'm using emacs in terminal mode. the problem is that I can't use (display-...
3
votes
2answers
168 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 ...
4
votes
1answer
424 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 ...
0
votes
1answer
277 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 client, if ...
3
votes
0answers
37 views

mangled terminal output after failing emacsclient / folding mode launch

I consistently get the following problem on Emacs 24.5.1 with folding package (version 20140401.3) for which I've found a workaround but would like to understand what was going on. As you can see in ...
3
votes
0answers
58 views

Hide emacs icon when client is off

I am running emacs as daemon, in MacOSX, it works flawlessly but when I kill the client the icon remains in the dock as running. I searched around for a way to hide it when no client is running but I ...
0
votes
1answer
237 views

problems connecting to an emacs daemon on RHEL

I am running into problems creating and connecting to an Emacs daemon on RHEL 6. I am using Emacs 23.1.1. The daemon starts correctly: emacs --daemon=foo ... Starting Emacs daemon. … but ...
3
votes
0answers
528 views

Starting emacs in daemon mode freezes, emacsclient is not able find a socket

I cannot launch the emacs daemon anymore. I do not know what triggered this. When entering emacs -Q --daemon -v I get only the following and nothing happen. Warning: due to a long standing Gtk+ ...
4
votes
2answers
693 views

how to start daemon with `--debug-init` or equivalent debugger?

summary problem I'm trying to debug a problem that involves an Emacs config and daemon startup. But when I run emacs --daemon --debug-init from a console, the spew ends with Loading desktop from /...
2
votes
1answer
205 views

`server-start` hook?

Is there a hook to execute stuff after I've run emacs --daemon? I'd like to keep load stuff only when running emacs --daemon and not when running emacs. I know it sounds like using square wheels, but ...
3
votes
1answer
2k views

Emacs (as daemon) doesn't load theme

Related: Emacs: GUI with emacs --daemon not loading fonts correctly My init.el contains the following lines: (require 'darktooth-theme) (load-theme 'darktooth t) If I start Emacs with $ emacs ... ...
1
vote
0answers
60 views

workgroups, server mode, and emacsclient

I'm trying to use emacsclient in conjuction with the workgroups package for emacs. However, I have one major annoyance; whenever I invoke emacsclient -c from the command line and open a file, the file ...
4
votes
1answer
176 views

emacsclient directly start eshell command command line

Both of the following work to call a graphical/terminal eshell: emacs -f eshell emacs -nw -f eshell Furthermore, this 2-step process also works: `emacsclient -t -a '' /some/real/file/name Metax ...
5
votes
1answer
112 views

How to start in daemon mode and suppress interactive dialogs?

I love to start emacs in daemon mode with my first login and then have the same emacs process for all subsequent logins, be it graphical, on physical console or from the network via ssh. But there is ...
4
votes
2answers
442 views

How to make emacs running in daemon mode read my bashrc before start?

I run Emacs in the daemon mode as a user's systemd unit. However it won't read my environment variables. How to make it import my .bashrc first? I have multiple paths added in there and want to be ...
5
votes
0answers
3k views

Restart emacs daemon from within emacs

Very much like Restart emacs from within emacs, except I'd like to do this for an emacs daemon and client. Specifically, I'm interested in the terminal client, but of course being able to restart ...