Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping items using :deadline (before ..) is not working #187

Closed
cmower opened this issue Dec 30, 2020 · 2 comments
Closed

Grouping items using :deadline (before ..) is not working #187

cmower opened this issue Dec 30, 2020 · 2 comments

Comments

@cmower
Copy link

cmower commented Dec 30, 2020

This issue may be due to my lack of knowledge but any help would be greatly appreciated.

My config

    (let ((one-week-from-today (format-time-string "%Y-%m-%d" (org-read-date nil t "+1w"))))
      (setq org-super-agenda-groups
            '(
              (:name "Overdue"
                     :deadline past
                     :order 0)
              (:name "Due today"
                     :deadline today
                     :order 1)
              (:name "Start Today"
                     :scheduled today
                     :order 2)
              (:name "Within week"
                     :deadline (before one-week-from-today)
                     :order 3))))

This is the output when my agenda is built

Week-agenda (W53):
Monday     28 December 2020 W53
Tuesday    29 December 2020

And in the *Messages* buffer, the following error is thrown

Wrong type argument: stringp, one-week-from-today

I have also tried specifying ((one-week-from-today (org-read-date nil nil "+1w"))) as the varlist in let, but same error is thrown.

I'm at a bit of a loss since, as I understand, one-week-from-today should be a string in the format your documentation recommends.

@pkazmier
Copy link
Contributor

pkazmier commented Dec 30, 2020

You need to use the BACKQUOTE and COMMA to substitute the value of that variable into your org-super-agenda-groups. Try something like this:

(let ((one-week-from-today (format-time-string "%Y-%m-%d" (org-read-date nil t "+1w"))))
      (setq org-super-agenda-groups
            `(
              (:name "Overdue"
                     :deadline past
                     :order 0)
              (:name "Due today"
                     :deadline today
                     :order 1)
              (:name "Start Today"
                     :scheduled today
                     :order 2)
              (:name "Within week"
                     :deadline (before ,one-week-from-today)
                     :order 3))))

Also, if you have a long-running emacs session, then this won't do what you want either as the one-week-from-today will be static at the value when emacs started. PR #149 solves this for us once the maintainer incorporates.

@cmower
Copy link
Author

cmower commented Dec 30, 2020

Thanks @pkazmier, this worked great!

Also, if you have a long-running emacs session, then this won't do what you want either as the one-week-from-today will be static at the value when emacs started. PR #149 solves this for us once the maintainer incorporates.

Not actually a problem for me right now, but thanks for letting me know!

@cmower cmower closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants