I am a elisp noob and need some help for a custom agenda in org-mode. I need an agenda view that filters the todo entries based on a scheduled or deadline timestamp. I want to see all the todos due in the next 60s. I have working code with hardcoded timestamp, but I need the timestamp to be dynamic (based on the current date/time).
This code is working (fixed date/times):
(setq org-agenda-custom-commands
'(("P" "Notify List"
((org-ql-block
'(and (not (done))
(planning
:from
"2021-02-02 11:00"
:to
"2021-02-02 14:00"
)
)
))
)
))
But this code seems to just ignore the from and to keywords and displays all tasks with a scheduled or deadline date:
(setq org-agenda-custom-commands
'(("P" "Notify List"
((org-ql-block
'(and (not (done))
(planning
:from
(format-time-string "%Y-%m-%d %H:%M")
:to
(format-time-string "%Y-%m-%d %H:%M" (time-add (current-time) (seconds-to-time 60)))
)
)
))
)
))
Can someone help me out why the functions are not working. I tried with many different functions, that create a timestamp, used the timestamp, converted it to string. Nothing worked. Thanks in advance. Cheers