Stack Exchange Network

Stack Exchange network consists of 174 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

Starting Emacs in daemon mode

2
votes
1answer
56 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
55 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
40 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
60 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
56 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
0answers
47 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 ...
6
votes
1answer
222 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 - ...
0
votes
1answer
63 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
1answer
73 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
64 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 ...
0
votes
0answers
183 views

emacs daemon problems with themes

I use spacemacs-theme https://github.com/nashamri/spacemacs-theme When I start emacs daemon the theme doesn't provide the correct colors and behavior. The colors don't appear correctly (wrong ...
3
votes
0answers
34 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
135 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
1answer
61 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
189 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
27 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
434 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
405 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?
6
votes
5answers
671 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 ...
2
votes
0answers
205 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 ...
2
votes
1answer
121 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
60 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
108 views

reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place

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
779 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
135 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 ...
3
votes
1answer
332 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
220 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
130 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 ...
3
votes
0answers
35 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
57 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 ...
1
vote
1answer
175 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-...
0
votes
1answer
181 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 ...
0
votes
0answers
35 views

init.el file is loosing customizations (but still working) after starting daemon

I have the following problem: I used to start emacs (version 24.5.1) from the GUI button. I customized it writing in the ~/.emacs.d/init.el file and everything worked well. Then I set up the daemon to ...
4
votes
2answers
586 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 /...
4
votes
3answers
2k 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 ...
2
votes
1answer
180 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
1k 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
57 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 ...
3
votes
3answers
171 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 ...
4
votes
1answer
148 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 ...
0
votes
1answer
567 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-...
4
votes
1answer
95 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 ...
3
votes
1answer
534 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 ...
4
votes
2answers
327 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 ...
4
votes
0answers
2k 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 ...
3
votes
2answers
293 views

Emacs server init when called without file

Whenever I use emacsclient, I tend to use it without a file argument. This is because my emacs file finder is generally better than my shell file finder. Unfortunately, when emacsclient is not given ...
3
votes
0answers
472 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+ ...
2
votes
1answer
311 views

Crash when starting daemon but not when starting normal

OSX Yosemite 10.10.4, emacs installed via brew install emacs-mac GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, Carbon Version 157 AppKit 1348.17) of 2015-07-20 on Rainers-MacBook-Pro.local I want ...
6
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
1answer
331 views

Opening frames from emacs-daemon

How do I open a frame at start-up when using emacs --daemon? I don't run emacs --daemon directly. Instead, I use emacsclient -c -a '' which starts an emacs-server if there isn't one running already. ...