Closed ukari closed 5 years ago
This isn't the right solution, sorry. If I start GUI Emacs via the window manager in Linux or MacOS, the system-type
reported will be the same as if I had started it in a terminal on the same platform. But the intention of the snippet is to enable exec-path-from-shell
only in the former case. When started as a daemon, you'll want some explicit handling anyway, otherwise the existing snippet will (reasonably) assume that you have set up the environment correctly for the daemon execution.
The original snippet use a
window-system
to determine whether to copy the outisde PATH, it might not work well when emacs start as a daemon.Until "Starting Emacs daemon." be messaged in daemon mode, the value of
window-system
would always beennil
.window-system:
system-type
could return a correct OS type in daemon mode.doc: system-type