emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb 534b2bf 024/449: gnorb-org.el: new option gnorb-o


From: Stefan Monnier
Subject: [elpa] externals/gnorb 534b2bf 024/449: gnorb-org.el: new option gnorb-org-mail-todos
Date: Fri, 27 Nov 2020 23:15:01 -0500 (EST)

branch: externals/gnorb
commit 534b2bf968e06d6827ca10d2e6bb71c04de1385e
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    gnorb-org.el: new option gnorb-org-mail-todos
    
    gnorb-org-restore-after-send checks for an appropriate TODO keyword
    before calling org-agenda-todo.
---
 lisp/gnorb-org.el | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index 2e6e319..ff8297c 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -31,6 +31,12 @@
   :tag "Gnorb Org"
   :group 'gnorb)
 
+(defcustom gnorb-org-mail-todos '("MAIL" "REPLY")
+  "TODO keywords that are considered mail related -- functions in
+this library may, after completion, call org-agenda-todo on
+relevant headings with these keywords."
+  :group 'gnorb-org)
+
 (defun gnorb-org-contact-link (rec)
   "Prompt for a BBDB record and insert a link to that record at
 point."
@@ -51,10 +57,9 @@ point."
   (gnus-summary-exit nil t)
   (when (window-configuration-p gnorb-org-window-conf)
     (set-window-configuration gnorb-org-window-conf))
-  ; Should check here that we actually made it back to the right org
-  ; heading. Could save an ID prop on the heading and check for that.
-  (when (eql major-mode org-agenda-mode)
-   (call-interactively 'org-agenda-todo)))
+  (let ((todo (org-entry-get (point) "TODO")))
+    (when (member todo gnorb-org-mail-todos)
+     (call-interactively 'org-agenda-todo))))
 
 (defun gnorb-org-handle-mail (&optional from-agenda)
   "Handle mail-related links for current headline."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]