From 0b6365efe546ad73335efcaf5905f9adcdc0a9de Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 17 Dec 2019 00:36:34 +0000 Subject: fix(emacs): `withLocalEmacs` now loads packages via $EMACSLOADPATH For some reason setting the initial load-path via `--directory` does not work and leads to an Emacs without any packages. --- tools/emacs/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix index 54bd0d80ea..9573a888cb 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 -- cgit 1.4.1