0

I would like to create a custom agenda view for future entries with a given tag (e.g. LABEL). I've tried something like:

(setq org-agenda-custom-commands
      '(("l" tags "+LABEL +TIMESTAMP >= \"<now>\"")))

but it still display tagged entries from the past. What would be the right query? Note It's really for tags, not todo-tags, scheduled or deadlines.

1 Answer 1

1

The problem is the spaces. Try "+LABEL+TIMESTAMP>=\"<now>\"". And of course make sure that the entries you are interested in contain LABEL as a tag and also contain a "bare" timestamp:

* New Year                                                        :resolution:
  <2022-01-01>
  I resolve to get organized

Assuming the entry is in one of your agenda files, it should be found with

(setq org-agenda-custom-commands
        '(("t" "future resolutions"
           tags "+resolution+TIMESTAMP>=\"<now>\"")))

The space is a boolean OR operator - see the section "Matching tags and properties" in the manual, which you can get to with C-h i g (org)matching tags and properties.

4
  • Thanks. Do you know where is the official documentation for the TIMESTAMP label? I had a hard time finding it (mostly browsing stack overflow) Commented Sep 9, 2021 at 5:40
  • 1
    If you go to the section of the manual I pointed to above, you can follow the link that says "Special properties". It describes all the special properties (including TIMESTAMP) that you can use in the matching string for org agenda custom commands. To go directly, use C-h i g(org)Special properties.
    – NickD
    Commented Sep 9, 2021 at 15:02
  • Sorry didn't see the link. Still in this part of documentaton, I did not find the TIMESTAMP. Commented Sep 10, 2021 at 17:51
  • 1
    Here's the Special properties section in the online Org manual. And for good measure, here's the Matching tags and properties section.
    – NickD
    Commented Sep 10, 2021 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.