emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb a51a99d 142/449: Speedier display of messages in


From: Stefan Monnier
Subject: [elpa] externals/gnorb a51a99d 142/449: Speedier display of messages in nnir search
Date: Fri, 27 Nov 2020 23:15:26 -0500 (EST)

branch: externals/gnorb
commit a51a99d314faf9b54b293ee0f13078c4c6aec7b1
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Speedier display of messages in nnir search
    
    lisp/nngnorb.el: (nnir-run-gnorb) Was using gnus-activate-group for each
                 link, to ensure it existed. Dog slow, and unnecessary:
                 if gnus-request-head errors, that's all we need to know
                 to drop the link
---
 lisp/nngnorb.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/nngnorb.el b/lisp/nngnorb.el
index 581d95f..01d19e7 100644
--- a/lisp/nngnorb.el
+++ b/lisp/nngnorb.el
@@ -117,17 +117,14 @@ be scanned for gnus messages, and those messages 
displayed."
        (gnus))
       (dolist (m links (when vectors
                         (nreverse vectors)))
-       (let (server-group msg-id artno)
+       (let (server-group msg-id result artno)
          (setq m (org-link-unescape m))
          (when (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" m)
            (setq server-group (match-string 1 m)
-                 msg-id (match-string 3 m))
-           ;; I swear just finding the `gnus-request-head' function
-           ;; was a trial in itself. But I've only tried it with
-           ;; nnimap -- does it work for other backends?
-           (when (gnus-activate-group server-group)
-            (setq artno
-                  (cdr (gnus-request-head msg-id server-group)))
+                 msg-id (match-string 3 m)
+                 result (ignore-errors (gnus-request-head msg-id 
server-group)))
+           (when result
+            (setq artno (cdr result))
             (when (and (integerp artno) (> artno 0))
               (push (vector server-group artno 100) vectors)))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]