diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 4887cab..ea5ffaa 100755 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -654,6 +654,13 @@ First, a function to get my notes directory: (leader-def-key "oa" 'org-agenda) (leader-def-key "oc" 'org-capture) :config + ;; Disable expensive hooks when building agenda buffer + (advice-add 'org-get-agenda-file-buffer :around + (lambda (oldfn &rest args) + (let ((find-file-hook '()) + (org-mode-hook '()) + (after-change-major-mode-hook '())) + (apply oldfn args)))) (defun agenda-files (&optional file) (let ((agenda-dir (org-directory))) (if file @@ -730,7 +737,8 @@ Set up evil keybindings for Org mode: #+BEGIN_SRC emacs-lisp (use-package evil-org :after (evil org) - :hook (org-mode . evil-org-mode) + :hook ((org-mode . evil-org-mode) + (org-agenda-mode . evil-org-mode)) :config (add-hook 'evil-org-mode-hook (lambda () @@ -2143,9 +2151,9 @@ Smartparens enables structured editing of s-expressions and other pairs: (use-package smartparens :hook ((prog-mode . smartparens-strict-mode) (eshell-mode . smartparens-strict-mode) + (vterm-mode . smartparens-mode) (geiser-repl-mode . smartparens-strict-mode) - (inferior-python-mode . smartparens-strict-mode) - (after-init . smartparens-global-mode)) + (inferior-python-mode . smartparens-strict-mode)) :init (defhydra hydra-smartparens (:hint nil) "