spegoraro / org-alert

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

org-alert-interval issue #11

Closed ovc closed 7 years ago

ovc commented 7 years ago

(require 'org-alert) (org-alert-enable) (setq org-alert-interval 14400) (setq alert-default-style 'libnotify)

Why (setq org-alert-interval 14400) didn't work, interval still 300s. And how to set org-alert-headline-regexp to "Deadline" only? Thank you!

spegoraro commented 7 years ago

For the interval problem you're having, you need to set the interval before enabling org-alert:

(setq org-alert-interval 14400)
(org-alert-enable)

This is because the function org-alert-enable calls run-at-time with the current value of org-alert-interval.

The deadline-only regex you're after:

(setq org-alert-headline-regexp "Deadline:.+")

If you ever need to play with elisp-style regexps use M-x regexp-builder.