aboutsummaryrefslogtreecommitdiff
path: root/piem.el
diff options
context:
space:
mode:
Diffstat (limited to 'piem.el')
-rw-r--r--piem.el35
1 files changed, 19 insertions, 16 deletions
diff --git a/piem.el b/piem.el
index ca10b77..d202e15 100644
--- a/piem.el
+++ b/piem.el
@@ -513,22 +513,25 @@ used by libraries implementing a function for
This should be called from a buffer containing a message and is
intended to be used by libraries implementing a function for
`piem-get-inbox-functions'."
- (pcase-let ((`(,listid ,to ,cc)
- (piem--message-fetch-decoded-fields '("list-id" "to" "cc"))))
- (catch 'hit
- (dolist (inbox (piem-merged-inboxes))
- (let* ((info (cdr inbox))
- (p-listid (plist-get info :listid)))
- (when (and listid
- p-listid
- (string-match-p (concat "<" (regexp-quote p-listid) ">")
- listid))
- (throw 'hit (car inbox)))
- (when-let ((addr (plist-get info :address))
- (to (mapconcat #'identity (list to cc)
- " ")))
- (when (string-match-p (regexp-quote addr) to)
- (throw 'hit (car inbox)))))))))
+ (pcase-let ((`(,listid ,to ,cc ,gnu-package)
+ (piem--message-fetch-decoded-fields
+ '("list-id" "to" "cc" "x-gnu-pr-package"))))
+ (or (catch 'hit
+ (dolist (inbox (piem-merged-inboxes))
+ (let* ((info (cdr inbox))
+ (p-listid (plist-get info :listid)))
+ (when (and listid
+ p-listid
+ (string-match-p
+ (concat "<" (regexp-quote p-listid) ">")
+ listid))
+ (throw 'hit (car inbox)))
+ (when-let ((addr (plist-get info :address))
+ (to (mapconcat #'identity (list to cc)
+ " ")))
+ (when (string-match-p (regexp-quote addr) to)
+ (throw 'hit (car inbox)))))))
+ (piem-inbox-by-gnu-package-match gnu-package))))
(defun piem-inbox ()
"Return the current buffer's inbox."