Fork me on GitHub
#spacemacs
<
2023-05-08
>
Drew Verlee04:05:57

Where should i set variables? I have the expression (setq blah "blah") inside my dotspacemacs/user-config expression, which i thought would be permanently set. However, i keep having to eval it after emacs loads.

practicalli-johnny06:05:50

If a variable is for a Spacemacs layer, the it can be defined via dotspacemacs-configuration-layers or in dotspacemacs/user-config using a setq Otherwise define the variable in dotspacemacs/user-config which should over-ride package and init settings.

practicalli-johnny06:05:48

I believe values are saved in dotspacemacs/emacs-custom-settings so in theory there could be a conflicting value, but this is unlikely. This section (or emacs-custom-settings.el file in the Practicalli Spacemacs config) can be removed and Spacemacs will recreate it from the other values in the Spacemacs config file NOTE: any changes made by via Emacs customize command will be lost when removing dotspacemacs/macs-custom-setting or emacs-custom-settings.el (create a copy of not sure)

👍 2
👀 2
Drew Verlee15:05:25

@U05254DQM thanks. Any idea why calling functions inside user-config wouldn't be active after it loads? for example

(require 'gptel)

  (setq gptel-model "gpt-4")

practicalli-johnny18:05:52

My initial guess would be the package is not available, but that should show an error in the *messages* buffer. Is the package that provides gtel added via dotspacemacs/additional-packages

Drew Verlee18:05:08

It's available, if i run those expressions they work. Maybe i have an error further up and it prevents them from executing.