Hi. First, thanks for this lovely Emacs configuration - I'm having a lot of fun learning from it.
I'm curious - how do you use Magit? I see there is SPC g S to get a Magit status window up. From here, I would typically stage files/hunks, and then hit 'C' to commit. When I do this, Emacs focuses the Magit diff window, it seems to get to the commit message window I have to q the diff, which then prompts me if I want to kill the running git process. I reply with no, type my commit message and then C-c C-c. This seems like rather a lot of work - typically one would just hit c in Magit, and focus would shift directly to the commit message.
What is the experience for you?
@ocharles This is mostly related to the interference of doom-core-popup :)
Unfortunately, magit+doom integration simply is that buggy. I'm not well acquainted with magit yet, and uptake has been slow (I'm far more familiar with command-line git). amosbird is correct, the culprit here is poor integration with shackle in core/core-popup.el.
Doom's popup management is overdue for a redesign, but in the meantime, could you try something for me?
Comment out lines 342-373 in https://github.com/hlissner/doom-emacs/blob/develop/core/core-popups.el#L342-L373, then make the following tiny change on line 117 of core/core-popups.el:
(profiler-report-mode :size 0.3 :regexp t :autokill t :modeline minimal)
(tabulated-list-mode :noesc t)
- ("^ ?\\*" :regexp t :size 15 :noselect t :autokill t :autoclose t)))
+ ("^ \\*" :regexp t :size 15 :noselect t :autokill t :autoclose t)))
:config
Then give magit a go. This effectively disables popups as far as magit is concerned.
Oh, you really should invest the time in magit - it's incredibly productive!
I made those changes and magit is much more usable now. I'll carry on like that for the rest of the day and see how I get on.
Thanks.
Oh, you really should invest the time in magit - it's incredibly productive!
I certainly will. It'll take me a while though!
I've made a couple modifications to popup rules for magit in develop, which should fix the commit/diff buffer issue you mentioned. This also helps magit co-exist with shackle, at least until I rewrite shackle integration.
If you can, please give it a try.
Hi! I have been using Doom for a couple of months and this issue with Magit has always been annoying to me.
I have just tried develop and it's working much better, thank you!
I was not expecting the commit message window + diff window to occupy the whole emacs frame - I expected that these two windows would replace the Magit status window -, however this behaviour seems fine to me (probably even better than what I expected).
I have also another quirk with Magit using Doom, which probably deserves another _issue_ (let me know if I should create an issue for this), which is that the commit message buffer does not use evil (at least apparently).
Practically speaking, when writing a commit message I would like to be able to press ESC to go to normal mode to navigate/make changes/etc. with evil keybindings. In other words, I expected the commit message buffer to behave like a regular buffer with the exception of it starting in insert mode (and the C-c C-c, C-c C-k bindings).
I am not sure if this is intended behaviour and what's causing it, since evil-mode seems enabled in the buffer. I am also not sure how would I go about implementing this behaviour in a (private) module if this behaviour is intentional.
Anyway, thanks for the fix and for Doom!
Actually today I wondered about the same thing, and adding (add-hook! 'git-commit-mode-hook 'evil-insert-state) into config.el in my private module solved it. Now commit buffer in Magit starts in evil insert mode, I can press <escape> and I have normal mode.
I took it from this emacs.stackexchange post.
@AloisJanicek Perfect, that's exactly what I wanted! Thanks.
The fix addressing magit popups has now been merged into master, so I will consider this resolved.
Essentially, I've left magit to manage itself, at least until I rewrite core-popup. You can restore semi popup integration by simply removing "^\\*magit" from doom-popup-blacklist.
As for getting evil-insert-mode in the git-commit buffer, this has been added to develop for the next release. Cheers!
Most helpful comment
The fix addressing magit popups has now been merged into
master, so I will consider this resolved.Essentially, I've left magit to manage itself, at least until I rewrite core-popup. You can restore semi popup integration by simply removing
"^\\*magit"fromdoom-popup-blacklist.As for getting evil-insert-mode in the git-commit buffer, this has been added to
developfor the next release. Cheers!