Full error (on the bottom line): Error (doom-first-file-hook): Error running hook "global-git-commit-mode" because: (void-variable transient-base-map)

Hello! I'm running this on an M1 chip macOS Ventura.

I've installed emacs both using brew install --cask emacs and brew install emacs-plus --with-native-comp but neither has solved the issue. Basically whenever I try to open a file or make a new file, I get this error which stops me from doing anything. I have default settings on all my config files.

How could I fix this? Thank you in advance!

1 Answer 1


It seems that some magit dependencies break with Emacs 28, as the function defvar-keymap is only added in Emacs 29. The solution is to pin an older version of the packages, as Doom currently does not support Emacs 29. You can do this with the following code:

(package! transient
      :pin "c2bdf7e12c530eb85476d3aef317eb2941ab9440"
      :recipe (:host github :repo "magit/transient"))

(package! with-editor
          :pin "bbc60f68ac190f02da8a100b6fb67cf1c27c53ab"
          :recipe (:host github :repo "magit/with-editor"))

  • 7
    Thank you! Just for clarity, this code should go to the ~/.config/doom/packages.el file (accessible in Doom with SPC f p) and then you need to run doom sync -u in a terminal. It wasn't obvious to me 🐒
    – Tad Lispy
    Commented Feb 15, 2023 at 9:27
  • 1
    Thank you for saving my life! Commented Feb 18, 2023 at 21:27
  • +1 I had this exact problem. And this solution worked for me! Commented Apr 7, 2023 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.