feat(emacs): show only long term scheduled tasks not all of them

When viewing the org agenda I have a section to view all the scheduled
tasks. That is not that helpful as most of them are shown in the agenda
view on the calendar.

This now limits the scheduled tasks to be only tasks that are not on the
calendar view for this week, to remove duplicate task from being shown.
This commit is contained in:
Ade Attwood 2025-02-10 17:57:25 +00:00
parent 8679a006f9
commit 221d2427be

View file

@ -193,14 +193,25 @@ just in in the current buffer."
((agenda "" ((org-deadline-warning-days 7))) ((agenda "" ((org-deadline-warning-days 7)))
(todo "WAITING" (todo "WAITING"
((org-agenda-overriding-header "Waiting on External"))) ((org-agenda-overriding-header "Waiting on External")))
(todo "TODO"
((org-agenda-overriding-header "Scheduled")
(org-agenda-skip-function '(org-agenda-skip-entry-if 'nottimestamp))))
(todo "TODO" (todo "TODO"
((org-agenda-overriding-header "Backlog") ((org-agenda-overriding-header "Backlog")
(org-agenda-todo-list-sublevels nil) (org-agenda-todo-list-sublevels nil)
(org-agenda-skip-function '(org-agenda-skip-entry-if 'timestamp)))))))) (org-agenda-skip-function '(org-agenda-skip-entry-if 'timestamp))))
(todo "TODO"
((org-agenda-overriding-header "Scheduled After This Week")
(org-agenda-skip-function
(lambda ()
(let* ((scheduled (org-get-scheduled-time (point)))
(end-of-week
(time-add (current-time)
(days-to-time
(- 7 (string-to-number (format-time-string "%u")))))))
(if (and scheduled
(time-less-p end-of-week scheduled))
nil
(org-end-of-subtree t)))))))
))))
(setq org-capture-templates (setq org-capture-templates
'(("t" "Todo" entry (file+headline "Todo.org" "Inbox") '(("t" "Todo" entry (file+headline "Todo.org" "Inbox")
"* TODO %?\n\n %a"))) "* TODO %?\n\n %a")))