commit a97141645b081fc55949dc231697b1269da79480 parent 94fdcfee37c7b2a11097c4f1b4e02b3deafe3ad4 Author: andsy10 <andsy1016@gmail.com> Date: Fri, 9 Oct 2026 16:49:09 +0800 Replace hardcoded agenda files with denote-agenda package Diffstat:
| M | lisp/init-org.el | | | 19 | ++++++++++++++----- |
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/lisp/init-org.el b/lisp/init-org.el @@ -77,11 +77,6 @@ (sequence "GAME(g)" "|" "PLAYED(p)")))) ;; agenda - (setq org-agenda-files - `(,(concat org-directory "/20260509T232442==agenda--all-my-todos.org") - ,(concat org-directory "/20260810T233455==agenda--all-about-game__game.org"))) - (setq recentf-exclude (cl-union org-agenda-files recentf-exclude :test 'equal)) - (setq org-agenda-span 'day) (setq org-agenda-skip-function-global '(org-agenda-skip-entry-if 'todo '("COMMENT")))) @@ -172,6 +167,20 @@ (fetcher (lambda () (xref-matches-in-files heading-id files)))) (consult-xref fetcher nil)))) +;; agenda integration +(my-use-package denote-agenda + :autoload denote-agenda-insinuate + :init + (setq denote-agenda-include-regexp "==agenda\\|==project") + (with-eval-after-load 'org-agenda + (denote-agenda-insinuate)) + :config + (defun my-denote-agenda-file-p (file) + "Non-nil if FILE is a denote-agenda managed file." + (and (string-prefix-p (denote-directory) (expand-file-name file)) + (string-match-p denote-agenda-include-regexp file))) + (add-to-list 'recentf-exclude #'my-denote-agenda-file-p)) + ;; detect broken links (my-use-package denote-lint :straight