Skip to content

Support for timestamps with internal time ranges (events) #371

@hpfr

Description

@hpfr

Org QL does not currently match timestamps with internal time ranges, commonly used for events. These are different from time/date ranges where two timestamps are connected by --.

The example from the manual:

* Discussion on climate change
  <2006-11-02 Thu 20:00-22:00>

Interestingly, the latest Org Syntax document just defines times as:

TIME (optional)
An instance of the pattern H:MMREST where H represents a one to two digit number (and can start with 0), and M represents a single digit. REST can contain anything but \n or closing bracket.

I was wondering if the Org QL behavior was by design or simply because you don’t personally use these. I think this could be fixed by changing the timestamp regexp, but the predicate code is pretty complex, so I don’t know the full implications of that.

Somewhat related to #159


Matching these timestamps would be another step towards fully replacing the Org agenda with Org QL (and its caching!). There is currently no mechanism for generating an Org agenda-like time grid, but I think it makes sense for Org QL to limit its scope to simply returning (and in the case of org-ql-view, displaying) lists of headings. Matching timestamps with internal time ranges would mean a package like calfw could leverage a calfw-org-ql backend rather than the org-agenda-based calfw-org.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions