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

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

[elpa] externals/gnorb d394ed3 099/449: Let nnir-run-gnorb handle gnus v


From: Stefan Monnier
Subject: [elpa] externals/gnorb d394ed3 099/449: Let nnir-run-gnorb handle gnus version 5.13
Date: Fri, 27 Nov 2020 23:15:16 -0500 (EST)

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

    Let nnir-run-gnorb handle gnus version 5.13
    
    lisp/gnorb-gnus.el: `gnorb-gnus-search-messages' needed a fair amount of
                    reworking to operate correctly under both gnus 5.13
                    and git head. This is why you don't use internal
                    functions!
    
    lisp/nngnorb.el: `nnir-run-gnorb' will get a slightly different format
                 of query string under 5.13.
---
 lisp/gnorb-gnus.el | 30 +++++++++++++++++++++---------
 lisp/nngnorb.el    |  2 ++
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 6f89634..41a1d9a 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -400,20 +400,32 @@ will all be displayed in an ephemeral group on the 
\"nngnorb\"
 server. There must be an active \"nngnorb\" server for this to
 work."
   (interactive)
-  (let ((server
+  (let ((nnir-address
         (or (gnus-method-to-server '(nngnorb))
             (user-error
-             "Please add a \"nngnorb\" backend to your gnus installation."))))
+             "Please add a \"nngnorb\" backend to your gnus installation.")))
+       (nnir-current-query nil)
+       (nnir-current-server nil)
+       (nnir-current-group-marked nil)
+       (nnir-artlist nil))
     (gnus-group-read-ephemeral-group
-     (concat "gnorb-" str)
-     (list 'nnir "nnir") nil
-     ret ;; it's possible you can't just put an arbitrary form in here.
+     ;; in 24.4, the group name is mostly decorative. in 24.3, the
+     ;; actual query itself is embedded there. It should look like
+     ;; (concat "nnir:" (prin1-to-string '((query str))))
+     (if (equal "5.13" gnus-version-number)
+        (concat "nnir:" (prin1-to-string `((query ,str))))
+       (concat "gnorb-" str))
+     (if (equal "5.13" gnus-version-number)
+        (list 'nnir nnir-address)
+       (list 'nnir "nnir"))
+     nil
+     ret ;; it's possible you can't just put an arbitrary form in
+        ;; here, which sucks.
      nil nil
+     ;; the following seems to simply be ignored under gnus 5.13
      (list (cons 'nnir-specs (list (cons 'nnir-query-spec `((query . ,str)))
-                                  (cons 'nnir-group-spec `((,server)))))
-          (cons 'nnir-artlist nil)))))
-
-
+                                  (cons 'nnir-group-spec `((,nnir-address)))))
+          (cons 'nnir-artlist nil)))))))))
 
 (provide 'gnorb-gnus)
 ;;; gnorb-gnus.el ends here
diff --git a/lisp/nngnorb.el b/lisp/nngnorb.el
index eddd248..5b3126c 100644
--- a/lisp/nngnorb.el
+++ b/lisp/nngnorb.el
@@ -70,6 +70,8 @@ be scanned for gnus messages, and those messages displayed."
   (save-excursion
     (let ((q (cdr (assq 'query query)))
          subtrees links subtree-text vectors)
+      (when (equal "5.13" gnus-version-number)
+       (setq q (car q)))
       (cond ((string-match "id\\+\\([[:alnum:]-]+\\)$" q)
             (with-demoted-errors "Error: %S"
               (org-id-goto (match-string 1 q))



reply via email to

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