[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb f0ba4d7 250/449: Improvements to message disassoc
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb f0ba4d7 250/449: Improvements to message disassociation |
Date: |
Fri, 27 Nov 2020 23:15:49 -0500 (EST) |
branch: externals/gnorb
commit f0ba4d7f379f9eaace8dab2fcbcaa19ee4218874
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Improvements to message disassociation
* nngnorb.el (gnorb-summary-disassociate-message): Let us know if the
message is already disassociated. Also, fix bug that totally prevented
this from working, ahem.
---
nngnorb.el | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/nngnorb.el b/nngnorb.el
index bdaf569..adc16f9 100644
--- a/nngnorb.el
+++ b/nngnorb.el
@@ -305,24 +305,26 @@ the message being included in this search."
(let* ((msg-id (gnus-fetch-original-field "message-id"))
(org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids))
chosen)
- (when org-ids
- (if (= (length org-ids) 1)
- ;; Only one associated Org TODO.
- (progn (gnus-registry-set-id-key msg-id 'gnorb-ids)
- (setq chosen (car org-ids)))
- ;; Multiple associated TODOs, prompt to choose one.
- (setq chosen
- (cdr
- (org-completing-read
- "Choose a TODO to disassociate from: "
- (mapcar
- (lambda (h)
- (cons (gnorb-pretty-outline h) h))
- org-ids))))
- (gnus-registry-set-id-key msg-id 'gnorb-ids
- (remove chosen org-ids)))
- (message "Message disassociated from %s"
- (gnorb-pretty-outline chosen)))))
+ (if org-ids
+ (progn
+ (if (= (length org-ids) 1)
+ ;; Only one associated Org TODO.
+ (progn (gnus-registry-set-id-key msg-id 'gnorb-ids nil)
+ (setq chosen (car org-ids)))
+ ;; Multiple associated TODOs, prompt to choose one.
+ (setq chosen
+ (cdr
+ (org-completing-read
+ "Choose a TODO to disassociate from: "
+ (mapcar
+ (lambda (h)
+ (cons (gnorb-pretty-outline h) h))
+ org-ids))))
+ (gnus-registry-set-id-key msg-id 'gnorb-ids
+ (remove chosen org-ids)))
+ (message "Message disassociated from %s"
+ (gnorb-pretty-outline chosen)))
+ (message "Message already disassociated"))))
(defvar nngnorb-status-string "")
- [elpa] externals/gnorb 357c9c6 220/449: Always append function to message-exit-actions, (continued)
- [elpa] externals/gnorb 357c9c6 220/449: Always append function to message-exit-actions, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb cffdd60 221/449: Warn people of impending changes in README, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 294e1eb 224/449: Fix calls to gnorb-trigger-todo-action, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 73b7f47 227/449: Use org-element-map's arguments properly, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 82d1e46 230/449: New gnorb.org file, and elpaignore, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e7b8a8b 233/449: First full draft of manual, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 004bdce 234/449: Create and install info manual, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb dd46ce4 246/449: Refactor finding trigger candidates, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 354705a 245/449: Provide completion for Org tags on BBDB records, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 2834602 247/449: Move roadmap/todo list from manual to README, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f0ba4d7 250/449: Improvements to message disassociation,
Stefan Monnier <=
- [elpa] externals/gnorb 0a138f9 251/449: Reuse existing frames/windows when following links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1e071a0 252/449: Further refinements to link following, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bfd8566 253/449: Be more careful about brackets on message-ids, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1b56250 254/449: Change wording of disassociation message, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d4a4ccf 256/449: Better handling of non-existent Org headings, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ad1538d 260/449: Autoload cookie for gnorb-tracking-initialize, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8db194a 259/449: Add TAGS to .gitignore, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 14471db 262/449: Silence compiler warnings for unbound vars, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6aef624 265/449: Restore the layout after the restore process, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c44a87b 266/449: Deletion of associations when composing messages, Stefan Monnier, 2020/11/27