about summary refs log tree commit diff
path: root/tools/emacs/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-17T00·36+0000
committerVincent Ambo <tazjin@google.com>2019-12-17T00·37+0000
commit0b6365efe546ad73335efcaf5905f9adcdc0a9de (patch)
treef32a008779fd235e81fba332b846f4aef13c1bf5 /tools/emacs/default.nix
parent7e0d4d097b1ecf6d506d1397abf21a9a2ddfe9c8 (diff)
fix(emacs): `withLocalEmacs` now loads packages via $EMACSLOADPATH r/170
For some reason setting the initial load-path via `--directory` does
not work and leads to an Emacs without any packages.
Diffstat (limited to 'tools/emacs/default.nix')
-rw-r--r--tools/emacs/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix
index 54bd0d80eafe..9573a888cb2a 100644
--- a/tools/emacs/default.nix
+++ b/tools/emacs/default.nix
@@ -105,12 +105,14 @@ in lib.fix(self: l: f: third_party.writeShellScriptBin "tazjins-emacs" ''
     # Build a derivation that uses the specified local Emacs (i.e.
     # built outside of Nix) instead
     withLocalEmacs = emacsBin: third_party.writeShellScriptBin "tazjins-emacs" ''
+      export EMACSLOADPATH="${(tazjinsEmacs f).deps}/share/emacs/site-lisp:"
       exec ${emacsBin} \
         --debug-init \
         --no-site-file \
+        --no-site-lisp \
         --no-init-file \
-        --directory ${(tazjinsEmacs f).deps}/share/emacs/site-lisp \
-        --directory ${./config} ${if l != null then "--directory ${l}" else ""} \
+        --directory ${./config} \
+        ${if l != null then "--directory ${l}" else ""} \
         --eval "(require 'init)" $@
     '';
   }) null identity