[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 856da2b 077/449: Improve `gnorb-gnus-outgoing-mak
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 856da2b 077/449: Improve `gnorb-gnus-outgoing-make-todo' |
Date: |
Fri, 27 Nov 2020 23:15:12 -0500 (EST) |
branch: externals/gnorb
commit 856da2bc869f5c0e17018fa88d44d2a8a8c49b48
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Improve `gnorb-gnus-outgoing-make-todo'
lisp/gnorb-gnus.el: Now it does something intelligent when used on a
message that already belongs to a TODO email
conversation, as a reply.
---
lisp/gnorb-gnus.el | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index ae5b574..30aa6f6 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -264,8 +264,8 @@ information about the outgoing message into
(require 'gnorb-org)
(setq gnorb-message-org-ids org-ids)
;; `gnorb-org-setup-message' may have put this here, but
- ;; if we're working from a draft or whatever, it might not
- ;; be there yet
+ ;; if we're working from a draft, or triggering this from
+ ;; a reply, it might not be there yet
(add-to-list 'message-exit-actions
'gnorb-org-restore-after-send))
(setq gnorb-message-org-ids nil)))))
@@ -299,18 +299,17 @@ work."
(interactive "P")
(if (not (eq major-mode 'message-mode))
(gnorb-gnus-outgoing-make-todo-1)
- (when (mail-fetch-field gnorb-mail-header)
- ;; If we're already composing a response to a message that is
- ;; "trackable" (ie, the In-Reply-To or References headers point
- ;; to message-ids that are attached to active TODOs), sending
- ;; the message should run `gnorb-gnus-message-trigger-todo'.
-
- ;; also, people should be able to add extra TODO ids to the
- ;; headers, to trigger multiple TODOs, if they're really nuts.
- (user-error "This message is already being composed in response to a
TODO."))
- (add-to-list 'message-exit-actions
- 'gnorb-gnus-outgoing-make-todo-1 t)
- (message "A TODO will be made from this message after it's sent")))
+ (let ((ids (mail-fetch-field gnorb-mail-header nil nil t)))
+ (add-to-list
+ 'message-exit-actions
+ (if ids
+ 'gnorb-org-restore-after-send
+ 'gnorb-gnus-outgoing-make-todo-1)
+ t)
+ (message
+ (if ids
+ "Message will trigger TODO state-changes after sending"
+ "A TODO will be made from this message after it's sent")))))
(defun gnorb-gnus-outgoing-make-todo-1 ()
(unless gnorb-gnus-new-todo-capture-key
- [elpa] externals/gnorb 9f13881 067/449: First whack at gnorb-gnus-message-trigger-todo, (continued)
- [elpa] externals/gnorb 9f13881 067/449: First whack at gnorb-gnus-message-trigger-todo, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e472348 073/449: New hook gnorb-org-after-message-setup-hook, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a165584 041/449: Handle return from mail sending better, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7ffc885 043/449: Commenting out my re-implementation of map-y-or-n-p, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6152e85 059/449: Comments on editing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d786b81 063/449: Random comment edits and indenting changes., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 77698aa 071/449: Split 'gnorb-org-email-subtree-parameters', Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3a2cd3b 072/449: Improve scanning of headings for mail actions, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bb21414 075/449: Provide more escapes for outgoing capture templates, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb cd1f289 076/449: Guess which Org TODO is related to this message, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 856da2b 077/449: Improve `gnorb-gnus-outgoing-make-todo',
Stefan Monnier <=
- [elpa] externals/gnorb 5812648 078/449: FUNCTION RENAMING, I'M VERY SORRY, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 582c111 080/449: Let gnorb-gnus-check-outgoing-headers handle news, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 92354d0 082/449: Allow use of some org-mime properties, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b81f3e2 083/449: Don't assume any ID references on incoming messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1cdec4b 086/449: New option gnorb-org-find-candidates-match, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c2a3793 087/449: Don't prompt for action if todo is not possible, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 78e1e2b 090/449: Use custom refile targets in re-attaching files, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7950d3a 091/449: Comment and indentation changes only, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f5d451e 092/449: New nngnorb mail backend, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e62587f 095/449: Yeesh, assigning to global variable by accident, Stefan Monnier, 2020/11/27