Browse Source

added function to dynamically include todos from org-roam by filetag Project

master
Marc Pohling 1 year ago
parent
commit
ba12df447c
1 changed files with 21 additions and 0 deletions
  1. 21
      config.org

21
config.org

@ -778,6 +778,23 @@ When moving BAR to archive, it will go to FILENAME.org_archive below the heading
[[http://doc.endlessparentheses.com/Var/org-archive-location.html][Other examples]]
** org
#+BEGIN_SRC emacs-lisp
(defun me/org-roam-filter-by-tag (tag-name)
(lambda (node)
(member tag-name (org-roam-node-tags node))))
(defun me/org-roam-list-notes-by-tag (tag-name)
(mapcar #'org-roam-node-file
(seq-filter
(me/org-roam-filter-by-tag tag-name)
(org-roam-node-list))))
(defun me/org-roam-refresh-agenda-list ()
"Add all org roam files with #+filetags: Project"
(interactive)
;; (setq org-agenda-files (me/org-roam-list-notes-by-tag "Project")))
(nconc org-agenda-files
(me/org-roam-list-notes-by-tag "Project")))
(use-package org
:ensure org-contrib
:pin gnu
@ -808,12 +825,16 @@ When moving BAR to archive, it will go to FILENAME.org_archive below the heading
org-agenda-files (list (concat MY--PATH_ORG_FILES "notes.org")
(concat MY--PATH_ORG_FILES "projects.org")
(concat MY--PATH_ORG_FILES "tasks.org")))
(when *sys/linux*
(nconc org-agenda-files
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))
(setq org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations")
org-log-into-drawer "LOGBOOK")
;; build the agenda list the first ime for the session
(me/org-roam-refresh-agenda-list)
;; some display customizations
(setq org-pretty-entities t
org-startup-truncated t

Loading…
Cancel
Save