[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb c2a3793 087/449: Don't prompt for action if todo
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb c2a3793 087/449: Don't prompt for action if todo is not possible |
Date: |
Fri, 27 Nov 2020 23:15:14 -0500 (EST) |
branch: externals/gnorb
commit c2a379348e810f0d19ca06aff284678f6723a41f
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Don't prompt for action if todo is not possible
lisp/gnorb-utils.el: gnorb-trigger-todo-action shouldn't prompt you for
an action if you've already screened out the
possibility of a todo change state.
---
lisp/gnorb-utils.el | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index 3200a6b..bb63698 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -105,23 +105,13 @@ agenda. Second: try to figure out the correct thing to do
once we
reach the todo. That depends on `gnorb-trigger-todo-default', and
the prefix arg."
(let* ((agenda-p (eq major-mode 'org-agenda-mode))
- (action (cond ((eq gnorb-trigger-todo-default 'prompt)
- (intern (completing-read
- "Take note, or trigger TODO state change? "
- '("note" "todo") nil t)))
- ((null arg)
- gnorb-trigger-todo-default)
- (t
- (if (eq gnorb-trigger-todo-default 'todo)
- 'note
- 'todo))))
(todo-func (if agenda-p
'org-agenda-todo
'org-todo))
(note-func (if agenda-p
'org-agenda-add-note
'org-add-note))
- root-marker ret-dest-todo)
+ root-marker ret-dest-todo action)
(when (and (not agenda-p) id)
(org-id-goto id))
(setq root-marker (if agenda-p
@@ -135,12 +125,24 @@ the prefix arg."
(when sent-id
(org-entry-add-to-multivalued-property
root-marker gnorb-org-msg-id-key sent-id))
+ (setq action (cond ((not
+ (or (and ret-dest-todo
+ (null gnorb-org-mail-todos))
+ (member ret-dest-todo gnorb-org-mail-todos)))
+ 'note)
+ ((eq gnorb-trigger-todo-default 'prompt)
+ (intern (completing-read
+ "Take note, or trigger TODO state change? "
+ '("note" "todo") nil t)))
+ ((null arg)
+ gnorb-trigger-todo-default)
+ (t
+ (if (eq gnorb-trigger-todo-default 'todo)
+ 'note
+ 'todo))))
(if (eq action 'note)
(call-interactively note-func)
- (when (or (and ret-dest-todo
- (null gnorb-org-mail-todos))
- (member ret-dest-todo gnorb-org-mail-todos))
- (call-interactively todo-func))))))
+ (call-interactively todo-func)))))
(provide 'gnorb-utils)
;;; gnorb-utils.el ends here
- [elpa] externals/gnorb 77698aa 071/449: Split 'gnorb-org-email-subtree-parameters', (continued)
- [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, 2020/11/27
- [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 <=
- [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
- [elpa] externals/gnorb 8fef972 097/449: Gnorb nnir engine doesn't take extra criteria, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7f67221 098/449: Allow for more "query" types in nnir-run-gnorb, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d394ed3 099/449: Let nnir-run-gnorb handle gnus version 5.13, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e3db6ae 111/449: Return visit candidates correctly., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 4a845bd 116/449: Who knew there's actually a version= function?, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 85797d0 120/449: Be more careful about what MIME parts we attach, Stefan Monnier, 2020/11/27