reddit / emacs

exwm, emacs --daemon vs standard emacs

Genex_04 · 2022-09-24 10:31
hello all. I've recently been using exwm and it's comfy, I like and dislike it's quirks. I have one question: is there any advantage on running exwm with a normal emacs client vs running `emacs --daemon -f exwm-enable`? I have `sx` configured that it launches `dbus-run-session emacs` and it works fine. but now I do this: `s6-rc -l /tmp/${USER}/s6-rc -u change emacs-exwm` `while ! [ -e /run/user/1000/emacs/server ]` `do` `continue` `done` `exec dbus-launch /usr/bin/emacsclient -c` where the first line it's just a supervised `emacs --fg-daemon f exwm-enable`. with this approach I can control emacs via kdeconnect (emacsclient --eval '(blabla)'), but is there any disadvantage? TL;DR when using exwm, is it better to use emacs with or without server-mode?
franburstall · 2022-09-24 11:40
> when using exwm, is it better to use emacs with or without server-mode? One advantage of running emacs as a daemon is that system preferences for the app to open text files or pdf can be set to emacsclient for a seamless experience: xdg-open just works. FWIW I fire emacs from `.xsession` like this: emacs --daemon -f exwm-enable exec dbus-launch --exit-with-session emacsclient -c
Genex_04 · 2022-09-24 14:28
cool!