Org roam: try to avoid errors without roam dir
This commit is contained in:
parent
e9ede2999e
commit
cc4cd5c47c
|
@ -4489,9 +4489,16 @@ no modeline.
|
|||
***** Basic settings
|
||||
I'll just set this to be within =Organisation= folder for now, in the future it
|
||||
could be worth seeing if I could hook this up to a [[https://nextcloud.com/][Nextcloud]] instance.
|
||||
#+begin_src emacs-lisp :tangle (if (file-exists-p "~/Desktop/TEC/Organisation/Roam/") "yes" "no")
|
||||
#+begin_src emacs-lisp :noweb-ref none :tangle yes
|
||||
(setq org-roam-directory "~/Desktop/TEC/Organisation/Roam/")
|
||||
#+end_src
|
||||
|
||||
That said, if the directory doesn't exist we likely don't want to be using roam.
|
||||
Since we don't want to trigger errors (which will happen as soon as roam tries
|
||||
to initialise), let's not load roam.
|
||||
#+begin_src emacs-lisp :noweb-ref none :tangle (if (file-exists-p "~/Desktop/TEC/Organisation/Roam/") "no" "packages.el")
|
||||
(package! org-roam :disable t)
|
||||
#+end_src
|
||||
***** Registering roam protocol
|
||||
The recommended method of registering a protocol is by registering a desktop
|
||||
application, which seems reasonable.
|
||||
|
|
|
@ -68,11 +68,6 @@
|
|||
(advice-add 'theme-magic-from-emacs :override #'ignore)
|
||||
(advice-add 'format-all-buffer :override #'ignore)
|
||||
|
||||
;; Avoid error: file-missing "Opening directory" "No such file or directory" "~/org/roam"
|
||||
(setq org-roam-directory "~")
|
||||
(advice-add 'org-roam-mode :override #'ignore)
|
||||
(advice-add 'org-roam-db-build-cache :override #'ignore)
|
||||
|
||||
(if full
|
||||
(load (expand-file-name "~/.emacs.d/init.el"))
|
||||
(setq gc-cons-threshold 16777216
|
||||
|
|
Loading…
Reference in New Issue