From 7d4248f310dfa005f4668f8cd3fbf411fc1b12ad Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Thu, 25 Apr 2024 17:11:07 +1000 Subject: [PATCH] Pass profile name as env var, not argument Fixes `emacs --batch`: Doom does not process the --profile argument when non-interactive, causing Emacs to complain about the unrecognized option. --- doom.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doom.nix b/doom.nix index 3e42b53..5b0422e 100644 --- a/doom.nix +++ b/doom.nix @@ -305,8 +305,9 @@ let '' makeWrapper ${emacsWithPackages}/bin/emacs $out/bin/${binaryName} \ --set DOOMPROFILELOADFILE ${doomProfile}/loader/init.el \ + --set DOOMPROFILE ${profileName} \ --set-default DOOMLOCALDIR "${doomLocalDir}" \ - --add-flags "--init-directory=${doomSource} --profile ${profileName}" + --add-flags "--init-directory=${doomSource}" ''; in