[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 853ba9d 1/2: Allow gnorb-msg-id-request-head to accept a "
From: |
Eric Abrahamsen |
Subject: |
[elpa] master 853ba9d 1/2: Allow gnorb-msg-id-request-head to accept a "group" argument |
Date: |
Wed, 2 May 2018 13:31:53 -0400 (EDT) |
branch: master
commit 853ba9d74a9aaa9352d9f8cfdb7fbc30c6c6d266
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Allow gnorb-msg-id-request-head to accept a "group" argument
* packages/gnorb/gnorb-utils.el (gnorb-msg-id-request-head): Sometimes
we already know the group.
---
packages/gnorb/gnorb-utils.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index 3db394d..1a9d094 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -500,8 +500,10 @@ If SERVER-GROUP isn't given, try to figure it out."
(concat server-group "#"
(gnorb-unbracket-message-id msg-id))))))
-(defun gnorb-msg-id-request-head (msg-id)
+(defun gnorb-msg-id-request-head (msg-id &optional group)
"Given a message id, try to find its group and article number.
+If GROUP is given, assume that group and just try to find the
+article number.
So far we're checking the registry, then the groups in
`gnorb-gnus-sent-groups'. Use search engines? Other clever
@@ -510,8 +512,10 @@ methods?"
(setq msg-id (gnorb-bracket-message-id msg-id))
(catch 'found
(when gnorb-tracking-enabled
- (setq candidates (append (gnus-registry-get-id-key msg-id 'group)
- gnorb-gnus-sent-groups))
+ (setq candidates (if group
+ (list group)
+ (append (gnus-registry-get-id-key msg-id 'group)
+ gnorb-gnus-sent-groups)))
(while (setq server-group (pop candidates))
(when (and (stringp server-group)
(string-match-p "+" server-group)