Search code examples
emacsorg-mode

How to set a group with "due in 3 days" with org-super-agenda?


:deadline future shows todo items with deadlines. I want to make a group with todo items due in 3 days, i.e. somewhat like:

:deadline before (today+3d)

I checked user manual and found it suggests using some string that can be processed by "org-time-string-to-absolute". I am novice to elisp and got stuck there.


Solution

  • This is a bit hacky too but check if it works

    (-let* (((sec minute hour day month year dow dst utcoff)
         (decode-time (+ (* 3 86400) (float-time)))) ;; 3 days
            (target-date
             (format "%d-%02d-%02d" year month day))
            (org-super-agenda-groups
             `((:deadline (before ,target-date))
               (:discard (:anything t)))))
      (org-todo-list))