-
Notifications
You must be signed in to change notification settings - Fork 26
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
Too greedy regex in org-alert-time-match-string #29
Comments
Thanks for the suggestion! org-alert-time-match-string is exposed as a variable though, so you should be able to set it to whatever you want in your config. I think I'll leave the default alone for now, but I'll include this as an example in the readme when I get back to my computer since it might be a common case. I might even add it to the doc string itself. |
Sorry for the typo. I mean the fix should be "\\(?:SCHEDULED\\|DEADLINE\\):.*?<.*?\\([0-9]\\{2\\}:[0-9]\\{2\\}\\).*>" |
This is also effective for recurring tasks that require clocking in.
Since The regex |
This is also good for time ranges in scheduled items: |
Given an agenda tree such as
SCHEDULED: <2022-12-08 Thu 07:00>
Do something
** task 1a
SCHEDULED: <2022-12-08 Thu 15:30>
org-alert-check will detect "15:30" for the task's time instead of "07:00". This is due to the regex in org-alert-time-match-string being too greedy.
This could be fix by using non-greedy match regex like "\(?:SCHEDULED\|DEADLINE\):.?<.?\([0-9]\{2\}:[0-9]\{2\}\).*>" instead.
The text was updated successfully, but these errors were encountered: