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:
parent
23b5a6c142
commit
bae9f91636
1 changed files with 4 additions and 2 deletions
|
@ -28,13 +28,15 @@
|
||||||
(defun +default/browse-notes ()
|
(defun +default/browse-notes ()
|
||||||
"Browse files from `org-directory'."
|
"Browse files from `org-directory'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'org)
|
(unless (boundp 'org-directory)
|
||||||
|
(require 'org))
|
||||||
(doom-project-browse org-directory))
|
(doom-project-browse org-directory))
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +default/find-in-notes ()
|
(defun +default/find-in-notes ()
|
||||||
"Find a file under `org-directory', recursively."
|
"Find a file under `org-directory', recursively."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'org)
|
(unless (boundp 'org-directory)
|
||||||
|
(require 'org))
|
||||||
(doom-project-find-file org-directory))
|
(doom-project-find-file org-directory))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue