From d517e2b4b6f036f1d38142c4adc80d229404fc4c Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 24 Jan 2025 09:46:29 +1100 Subject: [emacs] Expand env vars in exec-path --- emacs/.emacs.d/init/ycp-basic.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emacs/.emacs.d/init/ycp-basic.el b/emacs/.emacs.d/init/ycp-basic.el index 6baf1b8..cb097e7 100644 --- a/emacs/.emacs.d/init/ycp-basic.el +++ b/emacs/.emacs.d/init/ycp-basic.el @@ -27,6 +27,12 @@ ;;; Code: +;;; If started from systemd, emacs treats env variables inside env +;;; variables as literal. e.g. if we have +;;; Environment=PATH=$HOME/.local/bin:$HOME/bin +;;; emacs will set exec-path to be literally +;;; $HOME/.local/bin:$HOME/bin, without expanding $HOME. +(setq exec-path (seq-map 'substitute-in-file-name exec-path)) (my-configure (my-keybind global-map -- cgit v1.2.3