fix(emacs): ensure org-agenda uses the general leader keybindings

When in org agenda mode you can't use the <space><space> leader to access all
the key beginning that has been setup up by general. I use this quite a lot to
quickly navigating to other notes or the email inbox.

This adds a hook to run after org agenda so the evil mode is normal not emacs.
This will allow the general keybindings to be used in that buffer.
This commit is contained in:
Ade Attwood 2024-10-10 07:48:29 +01:00
parent 843767fdb8
commit f2ec3982d2

View file

@ -299,12 +299,21 @@ just in in the current buffer."
(use-package evil-org
:straight t
:after org
:after evil org
:hook (org-mode . (lambda () evil-org-mode))
:config
(require 'evil-org-agenda)
(evil-org-set-key-theme)
(evil-org-agenda-set-keys))
;; Ensure org-agenda starts in evil-normal-state
(defun aa/org-agenda-setup ()
"Start org-agenda in evil-normal-state."
(evil-org-mode)
(evil-set-initial-state 'org-agenda-mode 'normal))
(add-hook 'org-agenda-mode-hook 'aa/org-agenda-setup)
;;; Email
(use-package counsel-notmuch