Chris Marusich <[email protected]> writes: > How are you starting Emacs? From the command line? From the GNOME > Activities Overview [1]? Some other method? Are you doing anything > "strange" to modify your environment (e.g., running a custom > ~/.xsession)? It matters because the way in which you start a program > can influence the environment in which the program runs, which can in > turn influence the load path of programs like Emacs.
I don't use GNOME, I use EXWM[1] (the Emacs X window manager) which I
start from a custom ~/.xsession with:
emacs --daemon -f exwm-enable
exec emacsclient -c
Other than that, I add my local site-lisp to the beginning of my
~/.emacs.d/init.el:
--8<---------------cut here---------------start------------->8---
;;; Site Lisp folder for local packages and development.
;; We need to roll it out manually since we want it first in the `load-path',
;; while `normal-top-level-add-subdirs-to-load-path' appends it to the very end.
(defun ambrevar/package-refresh-load-path (path)
"Add every non-hidden sub-folder of PATH to `load-path'."
(when (file-directory-p path)
(dolist (dir (directory-files path t "^[^\\.]"))
(when (file-directory-p dir)
(setq load-path (add-to-list 'load-path dir))
(dolist (subdir (directory-files dir t "^[^\\.]"))
(when (file-directory-p subdir)
(setq load-path (add-to-list 'load-path subdir))))))))
(let ((site-lisp (expand-file-name "site-lisp/" "~/.local/share/emacs/")))
(add-to-list 'load-path site-lisp)
(ambrevar/package-refresh-load-path site-lisp))
--8<---------------cut here---------------end--------------->8---
See the rest of my dotfiles there:
https://github.com/Ambrevar/dotfiles
[1] https://github.com/ch11ng/exwm
--
Pierre Neidhardt
signature.asc
Description: PGP signature
