Speed up org agenda loading somewhat
This commit is contained in:
parent
9fa4a2f3bb
commit
5faf589f41
@ -654,6 +654,13 @@ First, a function to get my notes directory:
|
|||||||
(leader-def-key "oa" 'org-agenda)
|
(leader-def-key "oa" 'org-agenda)
|
||||||
(leader-def-key "oc" 'org-capture)
|
(leader-def-key "oc" 'org-capture)
|
||||||
:config
|
: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)
|
(defun agenda-files (&optional file)
|
||||||
(let ((agenda-dir (org-directory)))
|
(let ((agenda-dir (org-directory)))
|
||||||
(if file
|
(if file
|
||||||
@ -730,7 +737,8 @@ Set up evil keybindings for Org mode:
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package evil-org
|
(use-package evil-org
|
||||||
:after (evil org)
|
:after (evil org)
|
||||||
:hook (org-mode . evil-org-mode)
|
:hook ((org-mode . evil-org-mode)
|
||||||
|
(org-agenda-mode . evil-org-mode))
|
||||||
:config
|
:config
|
||||||
(add-hook 'evil-org-mode-hook
|
(add-hook 'evil-org-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
@ -2143,9 +2151,9 @@ Smartparens enables structured editing of s-expressions and other pairs:
|
|||||||
(use-package smartparens
|
(use-package smartparens
|
||||||
:hook ((prog-mode . smartparens-strict-mode)
|
:hook ((prog-mode . smartparens-strict-mode)
|
||||||
(eshell-mode . smartparens-strict-mode)
|
(eshell-mode . smartparens-strict-mode)
|
||||||
|
(vterm-mode . smartparens-mode)
|
||||||
(geiser-repl-mode . smartparens-strict-mode)
|
(geiser-repl-mode . smartparens-strict-mode)
|
||||||
(inferior-python-mode . smartparens-strict-mode)
|
(inferior-python-mode . smartparens-strict-mode))
|
||||||
(after-init . smartparens-global-mode))
|
|
||||||
:init
|
:init
|
||||||
(defhydra hydra-smartparens (:hint nil)
|
(defhydra hydra-smartparens (:hint nil)
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user