From 748bbbc90f4ac3650134672718d688a33fbd88c4 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Oct 2012 13:56:24 +0100 Subject: [PATCH] * 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. --- packages/debbugs/Debbugs.wsdl | 3 +-- packages/debbugs/debbugs-gnu.el | 16 +++++++------ packages/debbugs/debbugs.el | 22 ++++++++--------- packages/debbugs/debbugs.texi | 52 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 20 deletions(-) diff --git a/packages/debbugs/Debbugs.wsdl b/packages/debbugs/Debbugs.wsdl index aefb4275043..7c266fc11dd 100644 --- a/packages/debbugs/Debbugs.wsdl +++ b/packages/debbugs/Debbugs.wsdl @@ -132,8 +132,7 @@ along with GNU Emacs. If not, see . --> - + diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el index 41492acbee3..a46d99ef400 100644 --- a/packages/debbugs/debbugs-gnu.el +++ b/packages/debbugs/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/packages/debbugs/debbugs.el b/packages/debbugs/debbugs.el index c070bb1ddac..03211a1fc6c 100644 --- a/packages/debbugs/debbugs.el +++ b/packages/debbugs/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/packages/debbugs/debbugs.texi b/packages/debbugs/debbugs.texi index ed0dd2ac748..9cbb3c2ba14 100644 --- a/packages/debbugs/debbugs.texi +++ b/packages/debbugs/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 -- 2.11.4.GIT