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

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

[elpa] externals/gnorb 0db3991 051/449: Move mail search backend stuff t


From: Stefan Monnier
Subject: [elpa] externals/gnorb 0db3991 051/449: Move mail search backend stuff to gnorb-gnus
Date: Fri, 27 Nov 2020 23:15:06 -0500 (EST)

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

    Move mail search backend stuff to gnorb-gnus
    
    Specifically, we've deleted these two options out of gnorb-bbdb:
    
    gnorb-bbdb-mail-search-backends
    gnorb-bbdb-mail-search-backend
    
    And added these two options to gnorb-gnus:
    
    gnorb-gnus-mail-search-backends
    gnorb-gnus-mail-search-backend
    
    And changed `gnorb-bbdb-mail-search' to use the new options.
---
 README.org         |  2 +-
 lisp/gnorb-bbdb.el | 35 +++--------------------------------
 lisp/gnorb-gnus.el | 31 +++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 33 deletions(-)

diff --git a/README.org b/README.org
index a3bbe9d..4ee9c26 100644
--- a/README.org
+++ b/README.org
@@ -33,7 +33,7 @@ using those tags.
 **** gnorb-bbdb-mail-search
 Search for all mail messages from the record(s) displayed. Currently
 supports the notmuch, mairix, and namazu search backends; set
-`gnorb-bbdb-mail-search-backend' to one of those symbol values.
+`gnorb-gnus-mail-search-backend' to one of those symbol values.
 **** gnorb-bbdb-cite-contact
 Prompt for a BBDB record and insert a string of the type "Bob Smith
 <bob@smith.com>".
diff --git a/lisp/gnorb-bbdb.el b/lisp/gnorb-bbdb.el
index ab728f4..38897a1 100644
--- a/lisp/gnorb-bbdb.el
+++ b/lisp/gnorb-bbdb.el
@@ -66,36 +66,6 @@ records. If you want both, use \"C-u\" before the \"*\"."
          (org-tags-view nil tag-string))
       (error "No org-tags field present"))))
 
-(defcustom gnorb-bbdb-mail-search-backends
-  '((notmuch (lambda (terms)
-              (mapconcat
-               (lambda (m)
-                 (replace-regexp-in-string "\\." "\\\\." m))
-               terms " OR "))
-            notmuch-search)
-    (mairix (lambda (terms)
-             (mapconcat 'identity
-                        terms ","))
-           mairix-search)
-    (namazu (lambda (terms)
-             (mapconcat 'identity
-                        terms " or "))
-           namazu-search))
-  "Various backends for mail search.
-
-An alist of backends, where each element consists of three parts:
-the symbol name of the backend, a lambda form which receives a
-list of email addresses and returns a properly-formatted search
-string, and the symbol name of the function used to initiate the
-search."
-  :group 'gnorb-bbdb
-  :type 'list)
-
-(defcustom gnorb-bbdb-mail-search-backend nil
-  "Mail search backend currently in use."
-  :group 'gnorb-bbdb
-  :type 'symbol)
-
 (defun gnorb-bbdb-mail-search (records)
   "Initiate a mail search from the BBDB buffer.
 
@@ -107,8 +77,9 @@ a prefix arg and \"*\", the prefix arg must come first."
               (equal (buffer-name) bbdb-buffer-name))
     (error "Only works in the BBDB buffer"))
   (setq records (bbdb-record-list records))
-  (let* ((backend (or (assoc gnorb-bbdb-mail-search-backend
-                            gnorb-bbdb-mail-search-backends)
+  (require 'gnorb-gnus)
+  (let* ((backend (or (assoc gnorb-gnus-mail-search-backend
+                            gnorb-gnus-mail-search-backends)
                      (error "No search backend specified")))
         (search-string
          (funcall (second backend)
diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 5f39f00..d6e0d0b 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -31,6 +31,37 @@
   :tag "Gnorb Gnus"
   :group 'gnorb)
 
+
+(defcustom gnorb-gnus-mail-search-backends
+  '((notmuch (lambda (terms)
+              (mapconcat
+               (lambda (m)
+                 (replace-regexp-in-string "\\." "\\\\." m))
+               terms " OR "))
+            notmuch-search)
+    (mairix (lambda (terms)
+             (mapconcat 'identity
+                        terms ","))
+           mairix-search)
+    (namazu (lambda (terms)
+             (mapconcat 'identity
+                        terms " or "))
+           namazu-search))
+  "Various backends for mail search.
+
+An alist of backends, where each element consists of three parts:
+the symbol name of the backend, a lambda form which receives a
+list of email addresses and returns a properly-formatted search
+string, and the symbol name of the function used to initiate the
+search."
+  :group 'gnorb-bbdb
+  :type 'list)
+
+(defcustom gnorb-gnus-mail-search-backend nil
+  "Mail search backend currently in use."
+  :group 'gnorb-bbdb
+  :type 'symbol)
+
 (defcustom gnorb-gnus-capture-always-attach nil
   "Always prompt about attaching attachments when capturing from
   a Gnus message, even if the template being used hasn't



reply via email to

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