You are not logged in.

#1 2014-11-18 20:36:57

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

[SOLVED] Emacs no longer takes the --daemon flag

Hey all, I know Emacs updated to 24.4 a while ago, but I've only just really started using it again, so this might be old news by now. 

I usually use this systemd user unit to start emacs as a daemon: https://wiki.archlinux.org/index.php/Em … stemd_unit but since the 24.4 update it's not been working(systemctl --user status tells me helpfully that it failed). I did some testing, and it seems that emacs no longer accepts the --daemon command line, so this unit file is obviously failing there. 

Has anyone else been using emacs like this, and discovered a good solution since the 24.4 update? I tried just replacing the Start command with 'emacsclient -nw -a ""' but that seems to fail.

Thanks all!

Last edited by Reded (2014-11-19 16:56:59)


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#2 2014-11-19 13:30:40

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: [SOLVED] Emacs no longer takes the --daemon flag

For me the --daemon flag works just fine with 24.4.1.

However I don't start the server via a systemd unit, I rather invoke the server automaticalle when running emacs for the first time issuing

emacsclient -a "" -c

Last edited by ball (2014-11-19 13:31:02)

Offline

#3 2014-11-19 14:03:40

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Emacs no longer takes the --daemon flag

That's the method I'm using for now, have a custom .desktop file with that command. the --daemon  flag returns this: 

> $ emacs --daemon                                                             
emacsclient: unrecognized option '--daemon'
Try `emacsclient --help' for more information

Not sure why 'emacs' seems to be symlinked to 'emacsclient'... could that be my problem? tongue


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#4 2014-11-19 16:56:41

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Emacs no longer takes the --daemon flag

Alrighty folks, after a bit of playing around, I've noticed there's a third 'emacs' in my /usr/bin, which is named 'emacs-24.4'. This one seems to be the actual emacs binary (with 'emacs' for some reason being symlinked to 'emacsclient', which is causing my issues). I've replaced the line in my systemd unit with 'emacs-24.4' and all is well. I also had to get rid of the 'Type=forking' section, as that caused issues too, not sure why, I'll check that out too. 

For anyone interested, here's my systemd unit now - goes in ~/.config/systemd/user/emacs.service and is called with the systemctl --user (start|enable) command. 

[Unit]
Description=Emacs: the extensible, self-documenting text editor

[Service]
ExecStart=/usr/bin/emacs-24.4 --daemon
Restart=always

[Install]
WantedBy=multi-user.target

As always, the simplest option is the most effective big_smile


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

Board footer

Powered by FluxBB