spegoraro / org-alert

System notifications of org agenda items
GNU General Public License v3.0
277 stars 26 forks source link

`org-alert-time-match-string` is too permissive #43

Open jwiegley opened 1 week ago

jwiegley commented 1 week ago

Hello, I've found that org-alert-time-match-string is too lax in what it parses. I have lots of date stamps elsewhere in my properties that it thinks are associated with the scheduling time. What works better for me is to constrain it as follows:

"\\(?:SCHEDULED\\|DEADLINE\\):\\s-+<[^>]+\\([0-9]\\{2\\}:[0-9]\\{2\\}\\).*>"

This way it only checks the time that immediately follows SCHEDULED or DEADLINE, and only the time within that timestamp.

ntBre commented 6 days ago

Hi John, thanks for the report! (and for the great alert package that we depend on!)

We already expose org-alert-time-match-string as a customizable variable; are you suggesting that this would be a better default? I think this is similar to #29 and #42 (and possibly others), so it seems like a common issue that probably warrants an update to the default.

jwiegley commented 5 days ago

I have a feeling it may be! I'm still having one problem even with this string: I get alerts for the end of time-ranged appointments (09:00-10:00) rather than the beginning. Still tracking that one down...