Fork me on GitHub
#spacemacs
<
2021-11-01
>
paulspencerwilliams13:11:46

So, I’ve been bouncing between Spacemacs and my own Emacs setup. I’m back in the Spacemacs camp and am looking for a way to configure it to trust variables in my various .dir-locals.el files such as

((nil . ((eval . (progn (setenv "CODE_PROFILE" "dev")
                        (setenv "JAVA_HOME" "/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home"))))))
Vanilla Spacemacs prompts to apply these, but choosing the persistent ! causes these trusted values to be written in ~/.spacemacs in dotspacemacs/emacs-custom-settings which is undesirable as I commit this to git. Is there a recommended approach to handling this situation, or is my .dir-locals.el to blame - requiring trusting?

practicalli-johnny17:11:47

I have the trusted variables in the .spacemacs file as usual, I just do not check in any of the custom-settings section of that file.

paulspencerwilliams18:11:10

Oh, that’s a pretty pragmatic and simple solution…