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

Add support to ignore notifications for pre-defined todo states #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sauron-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ element is an org-mode heading priority.")
(defvar sauron-org-exclude-tags (list org-archive-tag)
"Headings with any of these tags will be excluded from tracking.")

(defvar sauron-org-exclude-todo-states '()
"Headings with any of these todo state keywords will be excluded from tracking.")

(defvar sauron-org-heading-formatting-function #'sauron-org-default-heading-formatter
"Function to apply to a heading before it's sent to a sauron event.")

Expand Down Expand Up @@ -99,6 +102,7 @@ element is an org-mode heading priority.")
(defun sauron-org-maybe-add-heading ()
"Add heading at point if it is scheduled, has a deadline, and isn't done."
(unless (or (org-entry-is-done-p)
(member (org-get-todo-state) sauron-org-exclude-todo-states)
(cl-some (lambda (tag) (member tag sauron-org-exclude-tags))
(org-get-tags nil t)))
(let* ((heading (org-get-heading
Expand Down