From 40a61d0212578bd1e737371424c1a5fa84422665 Mon Sep 17 00:00:00 2001 From: Sebastien Le Maguer Date: Sun, 6 Sep 2020 09:16:10 +0100 Subject: [PATCH] Add support to ignore notifications for pre-defined todo states --- sauron-org.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sauron-org.el b/sauron-org.el index 7179c10..d5eaedb 100644 --- a/sauron-org.el +++ b/sauron-org.el @@ -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.") @@ -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