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
    Feb 15 at 9:27
  • 1
    Thank you for saving my life! Feb 18 at 21:27
  • +1 I had this exact problem. And this solution worked for me! Apr 7 at 22:14

Your Answer

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

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