[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb c280ea4 160/449: Only add relevant sent messages
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb c280ea4 160/449: Only add relevant sent messages in the registry |
Date: |
Fri, 27 Nov 2020 23:15:30 -0500 (EST) |
branch: externals/gnorb
commit c280ea4835af2cc2d8ecc47fea58b6838628cfd1
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Only add relevant sent messages in the registry
* lisp/gnorb-gnus.el (gnorb-gnus-check-outgoing-headers): We were insert
all the outgoing messages into the registry, which isn't right. We
only need relevant ones -- with gnorb-id headers. Also, insert all
such messages, even if we don't have a Gcc group. Better an incomplete
entry than none at all.
---
lisp/gnorb-gnus.el | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 23c5e9c..b174332 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -265,14 +265,6 @@ information about the outgoing message into
(link (or (and gcc
(org-store-link nil))
nil)))
- ;; We want this message in the registry, if possible.
- (when (and gnus-registry-enabled gcc)
- (gnus-registry-insert gnus-registry-db msg-id
- (list (list 'creation-time (current-time))
- (list 'group gcc)
- (list 'sender from)
- (list 'subject subject)))
- (gnus-registry-set-id-key msg-id 'gnorb-ids org-ids))
;; If we can't make a real link, then save some information so
;; we can fake it.
(when refs
@@ -289,7 +281,18 @@ information about the outgoing message into
;; 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))
+ 'gnorb-org-restore-after-send)
+ ;; Relevant sent messages should be saved in the registry.
+ ;; If we have a full Gcc link, then we're good to go. If
+ ;; not, then just insert a registry entry with no group
+ ;; key, and figure it out later.
+ (when gnus-registry-enabled
+ (gnus-registry-insert gnus-registry-db msg-id
+ (list (list 'creation-time (current-time))
+ (list 'group gcc)
+ (list 'sender from)
+ (list 'subject subject)))
+ (gnus-registry-set-id-key msg-id 'gnorb-ids org-ids)))
(setq gnorb-message-org-ids nil)))))
(add-hook 'message-header-hook 'gnorb-gnus-check-outgoing-headers)
- [elpa] externals/gnorb d0d196f 222/449: Check prefix arg correctly, (continued)
- [elpa] externals/gnorb d0d196f 222/449: Check prefix arg correctly, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9a76fad 226/449: Use org-element-interpret-data to get paragraph text, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 09346e0 141/449: BBDB message link list needs closing newline, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 69980d3 143/449: Improvements to nnir-run-gnorb, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ebce811 144/449: Also check for nnir when storing BBDB message links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5101731 150/449: Improvements to TODOs made from outgoing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b841d17 146/449: Wishlist changes, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8958546 155/449: Backquote escape fail, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 38df7d0 166/449: Ignore a notes.org file, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 44f8d23 165/449: Begin shift to using the registry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c280ea4 160/449: Only add relevant sent messages in the registry,
Stefan Monnier <=
- [elpa] externals/gnorb 4fc1075 172/449: Rename gnorb-org-window-conf to gnorb-window-conf, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bb44a8c 174/449: Don't force id creation!, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b596ee7 157/449: Check for success when following gnus links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 43fbd55 176/449: New function for restoring window layout, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb fe7d814 179/449: Provide initialization of gnorb email tracking, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b95f371 186/449: That's not how you use condition-case, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6653b6c 187/449: Fix gnorb-tracking-initialize, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f0cfa7b 191/449: Improvements to gnorb-registry-make-entry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bdbc96f 195/449: Rename gnorb-gnus-sending-message-info, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ca85930 197/449: First draft of trigger action reworking, Stefan Monnier, 2020/11/27