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

Support for org-extend-today-until in time-based and planning predicates #130

Open
wedens opened this issue Jul 14, 2020 · 2 comments
Open

Comments

@wedens
Copy link

wedens commented Jul 14, 2020

Currently, today is time from 00:00 to 23:59, but I consider "today" to be finished when I go to sleep which happens at 1-2:00AM.

It'd be great to make today make use of org-extend-today-until or add it as another predicate.

Is there a workaround I can use until there is a solution in org-ql itself?

@alphapapa
Copy link
Owner

That's a useful feature to many users, but supporting special features like that makes the code complicated, which is one of the reasons I started this project, to avoid such complexity and special cases.

Probably the more "idiomatic" way to do such a thing in this package would be to use the from/to arguments to the ts predicate appropriately. That is, generate the timestamps for the range you want, including any extension past midnight, and make a query sexp using them. You could write a function that returns such a sexp and use its value as an argument to org-ql functions, or in another query sexp.

@alphapapa
Copy link
Owner

I've changed my mind about this. I still want to limit the number of such options added to org-ql, but this one in particular is very useful. If it were implemented, it would mean a query like (scheduled :to today) would work as intended with the value of org-extend-today-until, rather than the user having to change the query after midnight.

I'm not sure of the best way to support this feature yet, but I do want to (selfishly, because I find myself using the option now sometimes).

@alphapapa alphapapa self-assigned this Apr 12, 2024
@alphapapa alphapapa added this to the 0.9 milestone Apr 12, 2024
@alphapapa alphapapa changed the title extended "today" Support for org-extend-today-until in time-based predicates Apr 12, 2024
@alphapapa alphapapa changed the title Support for org-extend-today-until in time-based predicates Support for org-extend-today-until in time-based and planning predicates Apr 12, 2024
@alphapapa alphapapa modified the milestones: 0.9, 0.10 Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants