aboutsummaryrefslogtreecommitdiffstats
path: root/oni-org-roam.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2024-02-15 12:57:14 -0800
committerGravatar Tom Willemse2024-02-15 12:57:14 -0800
commit3d17ef6cb2cfe3c48e308d18e903001b94a236e7 (patch)
treeaa1fcff525963f61394380701121257dd77a5e2e /oni-org-roam.el
parent3d4924adbfe2eb03fdfc0d37663e363e5748429f (diff)
downloademacs-config-3d17ef6cb2cfe3c48e308d18e903001b94a236e7.tar.gz
emacs-config-3d17ef6cb2cfe3c48e308d18e903001b94a236e7.zip
[oni-org] Remove roam files from agenda, move roam database
Diffstat (limited to 'oni-org-roam.el')
-rw-r--r--oni-org-roam.el21
1 files changed, 1 insertions, 20 deletions
diff --git a/oni-org-roam.el b/oni-org-roam.el
index 9a21f65..e33b103 100644
--- a/oni-org-roam.el
+++ b/oni-org-roam.el
@@ -33,7 +33,7 @@
(require 'seq)
(setq org-roam-completion-everywhere t)
-(setq org-roam-directory (expand-file-name "~/documents/exocortex/"))
+(setq org-roam-directory (expand-file-name "~/documents/exocortex-novus/reference/"))
(add-hook 'org-roam-mode-hook 'visual-line-mode)
@@ -49,23 +49,6 @@
(not (window-minibuffer-p)))
(org-roam-buffer-toggle))))
-;;; Taken from/inspired by
-;;; https://magnus.therning.org/2021-07-23-keeping-todo-items-in-org-roam-v2.html
-(defun oni-org-roam-update-todo-files (&rest _)
- "Set ‘org-agenda-files’ to all roam files with a task in them."
- (setq org-agenda-files (seq-uniq (append org-agenda-files (oni-org-roam--todo-files)))))
-
-(defun oni-org-roam--todo-files ()
- "Get a list of all the files in the org-roam database with tasks in them."
- (let ((nodes (seq-filter #'oni-org-roam--todo-node-p (org-roam-node-list))))
- (seq-uniq (seq-map #'org-roam-node-file nodes))))
-
-(defun oni-org-roam--todo-node-p (node)
- "Predicate to check whether or not NODE is task."
- (let ((state (org-roam-node-todo node)))
- (and (not (null state))
- (not (string= state "FINISHED")))))
-
(defun oni-org-roam--books-to-read ()
(org-roam-db-query (concat "select properties, file, title, group_concat(tag) as node_tags "
"from nodes "
@@ -99,8 +82,6 @@
(slot . 0)
(window-width . 66)))
-(advice-add 'org-agenda :before #'oni-org-roam-update-todo-files)
-
;;; These two properties are used a lot when working in ‘org-roam'. ‘ROAM_REFS'
;;; is used to specify a URL that (if pointed to) should be considered a
;;; reference to a particular note. ‘ROAM_ALIASES' sets up additional names for