Speed up +default/{find-in,browse}-notes

This removes the 2-3s wait when using these two commands when the user
has defined `org-directory` early.
This commit is contained in:
Henrik Lissner 2020-05-11 02:57:45 -04:00
parent 23b5a6c142
commit bae9f91636
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -28,13 +28,15 @@
(defun +default/browse-notes ()
"Browse files from `org-directory'."
(interactive)
(require 'org)
(unless (boundp 'org-directory)
(require 'org))
(doom-project-browse org-directory))
;;;###autoload
(defun +default/find-in-notes ()
"Find a file under `org-directory', recursively."
(interactive)
(require 'org)
(unless (boundp 'org-directory)
(require 'org))
(doom-project-find-file org-directory))
;;;###autoload