help-debbugs
[Top][All Lists]
Advanced

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

[PATCH 07/12] Pass query to debbugs-search-est as a list; make space for


From: Felix Lechner
Subject: [PATCH 07/12] Pass query to debbugs-search-est as a list; make space for WSDL.
Date: Sun, 10 Mar 2024 12:00:44 -0700

---
 debbugs-gnu.el |  2 +-
 debbugs.el     | 21 ++++++++++-----------
 debbugs.texi   | 22 +++++++++++-----------
 3 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3d174d7ed1..22c476bc6c 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -894,7 +894,7 @@ This function assumes the variable `user-mail-address' is 
defined."
      (phrase
       (mapcar
        (lambda (x) (cdr (assoc "id" x)))
-       (apply #'debbugs-search-est args)))
+       (debbugs-search-est args)))
      ;; User tags.
      (tags
       (setq args (mapcar (lambda (x) (if (eq x :package) :user x)) args))
diff --git a/debbugs.el b/debbugs.el
index 49bf99152b..6adeb4cf63 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -665,10 +665,10 @@ Every message is an association list with the following 
attributes:
   implemented yet server side."
   (car (soap-invoke (debbugs-download-wsdl) debbugs-port "get_bug_log" 
bug-number)))
 
-(defun debbugs-search-est (&rest query)
+(defun debbugs-search-est (query)
   "Return the result of a full text search according to QUERY.
 
-QUERY is a sequence of lists of keyword-value pairs where the
+QUERY is a list of lists of keyword-value pairs where the
 values are strings or numbers, i.e. :KEYWORD VALUE [:KEYWORD
 VALUE]*
 
@@ -767,9 +767,9 @@ same attributes as in the conditions.  Additional 
attributes are
 Examples:
 
   \(debbugs-search-est
-    \\='\(:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
-    \\='\(:severity \"normal\" :operator \"STRINC\")
-    \\='\(:date :order \"NUMA\"))
+    \\='\((:phrase \"armstrong AND debbugs\" :skip 10 :max 2)
+      \(:severity \"normal\" :operator \"STRINC\")
+      \(:date :order \"NUMA\")))
 
   => \(\(\(msg_num . 21)
        \(date . 1229208302)
@@ -785,12 +785,12 @@ Examples:
 
   ;; Show all messages from me between 2011-08-01 and 2011-08-31.
   \(debbugs-search-est
-    \\='\(:max 20)
-    \\='\(:@author \"me\" :operator \"ISTRINC\")
-    \\=`\(:date
+    \\=`\((:max 20)
+      \(:@author \"me\" :operator \"ISTRINC\")
+      \(:date
       ,\(floor \(float-time \(encode-time 0 0 0  1 8 2011)))
       ,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
-      :operator \"NUMBT\"))"
+      :operator \"NUMBT\")))"
 
   (let ((phrase (assq :phrase query))
        (debbugs-create-progress-reporter
@@ -811,8 +811,7 @@ Examples:
              result1)
          (while skip
            (setq result1
-                 (apply
-                  #'debbugs-search-est
+                 (debbugs-search-est
                   (append
                    (list
                     (append
diff --git a/debbugs.texi b/debbugs.texi
index 82bfae9e10..2c772aaa93 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -463,10 +463,10 @@ The search engine uses an index over the bug database.  
This index is
 refreshed once a day only; search hits do not include recent changes
 of the same day.
 
-@defun debbugs-search-est &rest query
+@defun debbugs-search-est query
 Return the result of a full text search according to @var{query}.
 
-@var{query} is a sequence of lists of keyword-value pairs where the
+@var{query} is a list of lists of keyword-value pairs where the
 values are strings or numbers, i.e.@: @var{:keyword} @var{value}
 [@var{:keyword} @var{value}]*
 
@@ -583,9 +583,9 @@ from GNU BTS.  Skip the first 10 hits:
 @example
 (let ((debbugs-port "gnu.org"))
   (debbugs-search-est
-    '(:phrase "armstrong AND debbugs" :skip 10 :max 2)
-    '(:severity "normal" :operator "STRINC")
-    '(:date :order "NUMA")))
+    '((:phrase "armstrong AND debbugs" :skip 10 :max 2)
+      (:severity "normal" :operator "STRINC")
+      (:date :order "NUMA"))))
 
 @result{} ((("msg_num" . 21)
      ("date" . 1229208302)
@@ -606,12 +606,12 @@ Example.  Show all messages for package "emacs" on GNU 
BTS between
 @example
 (let ((debbugs-port "gnu.org"))
   (debbugs-search-est
-   '(:max 500)
-   '(:package "emacs" :operator "STREQ")
-   `(:@@cdate
-     ,(floor (float-time (encode-time 0 0 0 21 8 2011)))
-     ,(floor (float-time (encode-time 0 0 0 31 8 2011)))
-     :operator "NUMBT")))
+   `((:max 500)
+     (:package "emacs" :operator "STREQ")
+     (:@@cdate
+      ,(floor (float-time (encode-time 0 0 0 21 8 2011)))
+      ,(floor (float-time (encode-time 0 0 0 31 8 2011)))
+      :operator "NUMBT"))))
 @end example
 @end defun
 
-- 
2.41.0




reply via email to

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