diff options
author | 2021-03-25 20:20:04 -0700 | |
---|---|---|
committer | 2021-03-25 20:20:04 -0700 | |
commit | dd9fedf8ff6b587586369ca634109a62e7270f8e (patch) | |
tree | 3205f3f16388e18be7ac154ee1faf9e08ad090f4 /oni-org | |
parent | 0e0f464a6573287831558a7a2372be314f21a81f (diff) | |
download | emacs-config-dd9fedf8ff6b587586369ca634109a62e7270f8e.tar.gz emacs-config-dd9fedf8ff6b587586369ca634109a62e7270f8e.zip |
Decouple ‘oni-org’ and ‘oni-org-roam’
‘org-roam’ doesn’t seem to work correctly on all the machines that I use
‘org-mode’ on.
Diffstat (limited to 'oni-org')
-rw-r--r-- | oni-org/oni-org.el | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index cfaaf67..c5b3b5d 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2021.0325.193551 -;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons org-journal org-roam) +;; Version: 2021.0325.201211 +;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons org-journal) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -141,8 +141,12 @@ _l_: Store link ^^ _j_: Journal entry ("t" (org-capture nil "t")) ("A" (org-capture nil "a")) ("j" (org-capture nil "j")) - ("f" org-roam-find-file) - ("i" org-roam-insert-immediate)) + ("f" (if (require 'oni-org-roam nil t) + (org-roam-find-file) + (error "Couldn’t load org-roam, you should install ‘oni-org-roam’"))) + ("i" (if (require 'oni-org-roam nil t) + (org-roam-insert-immediate) + (error "Couldn’t load org-roam, you should install ‘oni-org-roam’")))) (defun oni-org-in-dblock-p () "Non-nil when point belongs to a dynamic block." @@ -488,13 +492,5 @@ After running it once remove it from `org-capture-after-finalize-hook'." (setq org-journal-dir (expand-file-name "~/documents/org/journal/")) (setq org-journal-file-format "%Y%m%d.org") -;;; org-roam - -(require 'org-roam) - -(setq org-roam-directory (expand-file-name "~/documents/org/")) - -(org-roam-mode) - (provide 'oni-org) ;;; oni-org.el ends here |