I have a very odd problem when Emacs daemon is started by the system. Currently, I work on:
Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03
After login in, I have to manually execute:
emacs --daemon in the terminal. Then, Eamcs and packages work correctly. Starting daemon every time I log in is a little annoying, so I tried to automate it. I tried two methods:
- startup script (
Session and Startupon Manjaro) where I put
- enabling a
emacs.servicerun via systemd for a specific user.
For reasons I can't explain, packages do not work when the daemon is run by system. Two examples are AUCTeX and LSP. The first cannot see my custom LaTeX modules and does not even run
latexmk. The latter is supposed to ask about project settings, which does not happen.
*Messages* in all cases: running a standalone instance, starting a daemon from terminal, and finally when a daemon is started by the system, in all cases all init files get executed as expected.
When the daemon is running, I open a new frame with
emacsclient -c -a emacs.
I wonder what may cause this issue and how I could debug it.