spacemacs 2023-05-08

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.

@jr0cket 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")

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

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

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.

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)

👍 1
👀 1