(feature): add org-roam-mute-cache-build to mute cache build message (#159)

This commit is contained in:
Jethro Kuan
2020-02-22 11:29:34 +08:00
committed by GitHub
parent fe3f0e3b6c
commit 43ff60fec7
2 changed files with 9 additions and 2 deletions

View File

@ -65,6 +65,11 @@ If nil, default to the org-roam-directory (preferred)."
:type 'directory
:group 'org-roam)
(defcustom org-roam-mute-cache-build nil
"Whether to mute the cache build message."
:type 'boolean
:group 'org-roam)
(defcustom org-roam-buffer-position 'right
"Position of `org-roam' buffer.
@ -395,7 +400,8 @@ If PREFIX, downcase the title before insertion."
org-roam-titles-cache (plist-get cache :titles)
org-roam-cache-initialized t
org-roam--ongoing-async-build nil)) ;; Remove lock
(message "Org-roam cache built!")))))
(unless org-roam-mute-cache-build
(message "Org-roam cache built!"))))))
(defun org-roam--clear-cache ()
"Clears all entries in the caches."

View File

@ -46,7 +46,8 @@
(let ((original-dir org-roam--tests-directory)
(new-dir (expand-file-name (make-temp-name "org-roam") temporary-file-directory)))
(copy-directory original-dir new-dir)
(setq org-roam-directory new-dir))
(setq org-roam-directory new-dir)
(setq org-roam-mute-cache-build t))
(org-roam-mode +1))
(defun org-roam--test-build-cache ()