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

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

[elpa] externals/debbugs 2e4ea48 098/311: * debbugs-gnu.el (debbugs-gnu-


From: Stefan Monnier
Subject: [elpa] externals/debbugs 2e4ea48 098/311: * debbugs-gnu.el (debbugs-gnu-usertags): Rename argument to USERS
Date: Sun, 29 Nov 2020 18:41:49 -0500 (EST)

branch: externals/debbugs
commit 2e4ea4857c8384e2ca243d7e9a9a3f4bc2d1c22a
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    * debbugs-gnu.el (debbugs-gnu-usertags): Rename argument to USERS
    
    * debbugs-gnu.el (debbugs-gnu-get-bugs):
    * debbugs.el (debbugs-get-usertag): Use keyword :user instead of :package.
    
    * debbugs.texi (Requesting user tags): New node.
    
    * Debbugs.wsdl (search_estRequest): Remove superfluous arguments.
---
 Debbugs.wsdl   |  3 +--
 debbugs-gnu.el | 16 +++++++++-------
 debbugs.el     | 22 +++++++++++-----------
 debbugs.texi   | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 20 deletions(-)

diff --git a/Debbugs.wsdl b/Debbugs.wsdl
index aefb427..7c266fc 100644
--- a/Debbugs.wsdl
+++ b/Debbugs.wsdl
@@ -132,8 +132,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>. -->
   </wsdl:message>
 
   <wsdl:message name="search_estRequest">
-    <wsdl:part name="query" type="types:ArrayOfArrayOfAnyType"
-              minOccurs="1" maxOccurs="unbounded"/>
+    <wsdl:part name="query" type="types:ArrayOfArrayOfAnyType"/>
   </wsdl:message>
   <wsdl:message name="search_estResponse">
     <wsdl:part name="soapenc:Array" type="types:ArrayOfArrayOfArrayOfAnyType"/>
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 41492ac..a46d99e 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -545,7 +545,9 @@ marked as \"client-side filter\"."
        (lambda (x) (cdr (assoc "id" x)))
        (apply 'debbugs-search-est args)))
       ;; User tags.
-      (tags (apply 'debbugs-get-usertag args))
+      (tags
+       (setq args (mapcar (lambda (x) (if (eq x :package) :user x)) args))
+       (apply 'debbugs-get-usertag args))
       ;; Otherwise, we retrieve the bugs from the server.
       (t (apply 'debbugs-get-bugs args)))
      ;; Sort function.
@@ -1152,7 +1154,7 @@ The following commands are available:
   (setq buffer-read-only t))
 
 ;;;###autoload
-(defun debbugs-gnu-usertags (&optional packages)
+(defun debbugs-gnu-usertags (&optional users)
   "List all outstanding Emacs bugs."
   (interactive
    (list
@@ -1168,7 +1170,7 @@ The following commands are available:
            (debbugs-port "gnu.org")
            (buffer-name "*Emacs User Tags*")
            (user-tab-length
-            (1+ (apply 'max (length "User") (mapcar 'length packages)))))
+            (1+ (apply 'max (length "User") (mapcar 'length users)))))
 
        ;; Initialize variables.
        (when (and (file-exists-p debbugs-gnu-persistency-file)
@@ -1189,13 +1191,13 @@ The following commands are available:
        (erase-buffer)
 
        ;; Retrieve user tags.
-       (dolist (package packages)
-         (dolist (tag (sort (debbugs-get-usertag :package package) 'string<))
+       (dolist (user users)
+         (dolist (tag (sort (debbugs-get-usertag :user user) 'string<))
            (add-to-list
             'tabulated-list-entries
             ;; `tabulated-list-id' is the parameter list for `debbugs-gnu'.
-            `((("tagged") (,package) nil nil (,tag))
-              ,(vector (propertize package 'mouse-face widget-mouse-face)
+            `((("tagged") (,user) nil nil (,tag))
+              ,(vector (propertize user 'mouse-face widget-mouse-face)
                        (propertize tag 'mouse-face widget-mouse-face)))
             'append)))
 
diff --git a/debbugs.el b/debbugs.el
index c070bb1..03211a1 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -328,27 +328,27 @@ strings, i.e. :KEYWORD \"VALUE\" [:KEYWORD \"VALUE\"]*
 
 Valid keywords are:
 
-  :package -- The value is the name of the package a bug belongs
-  to, like \"emacs\", \"coreutils\", \"gnus\", or \"tramp\".  It
-  can also be an email address of a user who has applied a user
-  tag.  The special email address \"me\" is used as pattern,
-  replaced with `user-mail-address'.  There must be at least one
-  such entry; it is recommended to have exactly one.
+  :user -- The value is the name of the package a bug belongs to,
+  like \"emacs\", \"coreutils\", \"gnus\", or \"tramp\".  It can
+  also be an email address of a user who has applied a user tag.
+  The special email address \"me\" is used as pattern, replaced
+  with `user-mail-address'.  There must be at least one such
+  entry; it is recommended to have exactly one.
 
   :tag -- A string applied as user tag.  Often, it is a
   subproduct identification, like \"cedet\" or \"tramp\" for the
   package \"emacs\".
 
 If there is no :tag entry, no bug numbers will be returned but a list of
-existing user tags for :package.
+existing user tags for :user.
 
 Example:
 
-  \(debbugs-get-usertag :package \"emacs\")
+  \(debbugs-get-usertag :user \"emacs\")
 
   => (\"www\" \"solaris\" \"ls-lisp\" \"cygwin\")
 
-  \(debbugs-get-usertag :package \"emacs\" :tag \"www\" :tag \"cygwin\")
+  \(debbugs-get-usertag :user \"emacs\" :tag \"www\" :tag \"cygwin\")
 
   => (807 1223 5637)"
 
@@ -361,7 +361,7 @@ Example:
        (error "Wrong query: %s %s" kw val))
       (setq key (substring (symbol-name kw) 1))
       (case kw
-       ((:package)
+       ((:user)
         ;; Value shall be one word.  Extract email address, if existing.
         (if (string-match "\\`\\S-+\\'" val)
             (progn
@@ -381,7 +381,7 @@ Example:
     (unless (null query)
       (error "Unknown key: %s" (car query)))
     (unless (= (length user) 1)
-      (error "There must be exactly one :package entry"))
+      (error "There must be exactly one :user entry"))
 
     (setq
      object
diff --git a/debbugs.texi b/debbugs.texi
index ed0dd2a..9cbb3c2 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -71,6 +71,7 @@ without addressing Debbugs' web interface.
 * Requesting bug numbers::      How to request bug report numbers.
 * Requesting bugs statuses::    How to request the status of bug reports.
 * Requesting messages::         How to get messages from bug reports.
+* Requesting user tags::        How to request tags set by users.
 @end menu
 
 @node Installation
@@ -507,4 +508,55 @@ Note, that mbox downloading will work only if the
 specified (@pxref{Configuration}).
 @end defun
 
+@node Requesting user tags
+@chapter Requesting user tags
+
+A user tag is a string, a user has assigned to one or several bugs.
+The user is identified by an email address.  The port @code{"gnu.org"}
+uses also package names as user identification.
+
+@defun debbugs-get-usertag &rest query
+Return a list of bug numbers which match @var{query}.
+
+@var{query} is a sequence of keyword-value pairs where the values are
+strings, i.e. :KEYWORD ``VALUE'' [:KEYWORD ``VALUE'']*
+
+Valid keywords are:
+
+@table @code
+@item :user
+The value is the name of the package a bug belongs to, like
+@code{"emacs"}, @code{"coreutils"}, or @code{"tramp"}.  It can also be
+an email address of a user who has applied a user tag.  The special
+email address @code{"me"} is used as pattern, replaced with
+@code{user-mail-address}.  There must be at least one such entry; it
+is recommended to have exactly one.
+
+@item :tag
+A string applied as user tag.  Often, it is a subproduct
+identification, like @code{"cedet"} or @code{"tramp"} for the package
+@code{"emacs"}.
+@end table
+
+If there is no @code{:tag} entry, no bug numbers will be returned but
+a list of existing user tags for @code{:user}.
+
+Example.  Get all user tags for the package @code{"emacs"}:
+
+@example
+(let ((debbugs-port "gnu.org"))
+  (debbugs-get-usertag :user "emacs"))
+@result{} ("www" "solaris" "ls-lisp" "cygwin")
+@end example
+
+Get all bugs tagged by package @code{"emacs"} with @code{"www"} or
+@code{"cygwin"})):
+
+@example
+(let ((debbugs-port "gnu.org"))
+  (debbugs-get-usertag :user "emacs" :tag "www" :tag "cygwin"))
+@result{} (807 1223 5637)
+@end example
+@end defun
+
 @bye



reply via email to

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