I run Emacs at X startup with exwm, and manage my Emacs configuration/installation with home-manager.
emacsWithPackages to install additional Emacs modules, and generally this works well with one exception:
When I want to add a new module to Emacs, I add it to the
emacsWithPackages list, and run
home-manager switch. This sets up new emacs invocations with a load-path to find the new module, but my currently running Emacs is unaware of the new path. I’d rather not restart my whole desktop environment just to load one module.
What I currently do is identify the new
...emacs-packages-deps/ path in the nix store, find the path to the new module, and explicitly
(require 'module $path). This works but is a bit tedious.
I’ve tried adding the new emacs-packages-deps path to the load-path variable in Emacs, but it seems the startup process recurses each load-path and adds subdirectories for all entries to the load-path variable. And I’m struggling to find a way to reproduce this component of the startup process.
Ideally I would be able to run
home-manager switch, followed by some emacsclient command to update the load-path with all subdirs from the newly generated emacs-package-deps derivation.
Has anyone here had a similar desire and solution? If not I’ll try and hack something together that works for me.