[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/12] Pass bug-numbers to debbugs-get-status as a list; make spa
From: |
Felix Lechner |
Subject: |
[PATCH 08/12] Pass bug-numbers to debbugs-get-status as a list; make space for WSDL. |
Date: |
Sun, 10 Mar 2024 12:00:45 -0700 |
---
debbugs-gnu.el | 34 +++++++++++++++++-----------------
debbugs-org.el | 6 +++---
debbugs.el | 9 +++++----
debbugs.texi | 6 +++---
4 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 22c476bc6c..8f23964711 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -750,9 +750,9 @@ depend on PHRASE being a string, or nil. See Info node
'blockedby
(car
(debbugs-get-status
- (alist-get
- debbugs-gnu-emacs-current-release
- debbugs-gnu-emacs-blocking-reports nil nil #'equal))))))
+ (list (alist-get
+ debbugs-gnu-emacs-current-release
+ debbugs-gnu-emacs-blocking-reports nil nil
#'equal)))))))
(setq tabulated-list-entries
(delq nil
(mapcar
@@ -937,14 +937,14 @@ are taken from the cache instead."
(sort
(let ((debbugs-cache-expiry (if offline nil debbugs-cache-expiry))
ids)
- (apply #'debbugs-get-status
- (if offline
- (progn
- (maphash (lambda (key _elem)
- (push key ids))
- debbugs-cache-data)
- ids)
- (debbugs-gnu-get-bugs debbugs-gnu-local-query))))
+ (debbugs-get-status
+ (if offline
+ (progn
+ (maphash (lambda (key _elem)
+ (push key ids))
+ debbugs-cache-data)
+ ids)
+ (debbugs-gnu-get-bugs debbugs-gnu-local-query))))
;; Sort so that if a new report gets merged with an old
;; report, it shows up under the new report.
(lambda (s1 s2)
@@ -1409,8 +1409,8 @@ modified on the debbugs server, consider typing \\`C-u g'.
'blockedby
(car
(debbugs-get-status
- (alist-get
- release debbugs-gnu-emacs-blocking-reports nil nil #'equal)))))
+ (list (alist-get
+ release debbugs-gnu-emacs-blocking-reports nil nil
#'equal))))))
(id (debbugs-gnu-current-id t))
(inhibit-read-only t)
status)
@@ -1438,7 +1438,7 @@ modified on the debbugs server, consider typing \\`C-u g'.
(if-let* ((id (alist-get
release debbugs-gnu-emacs-blocking-reports nil nil #'equal))
- (blockers (alist-get 'blockedby (car (debbugs-get-status id)))))
+ (blockers (alist-get 'blockedby (car (debbugs-get-status (list
id))))))
(apply #'debbugs-gnu-bugs blockers)
(message "There are no release blocking bugs for Emacs %s" release)))
@@ -1979,7 +1979,7 @@ removed instead."
(when (derived-mode-p #'message-mode)
(current-buffer)))))
(let* ((status (or (debbugs-gnu-current-status)
- (car (debbugs-get-status bugid))))
+ (car (debbugs-get-status (list bugid)))))
(version
(if (and
(not noversion)
@@ -2222,7 +2222,7 @@ REMOTE-INFO is return value of
`debbugs-gnu--git-remote-info'."
(defun debbugs-gnu-announce-commit (commit-range bugnum &optional _args)
"Insert info about COMMIT-RANGE into message.
Optionally call `debbugs-gnu-make-control-message' to close BUGNUM."
- (let* ((status (car (debbugs-get-status bugnum)))
+ (let* ((status (car (debbugs-get-status (list bugnum))))
(packages (alist-get 'package status))
(remote-info (debbugs-gnu--git-remote-info)))
(insert "\nPushed to "
@@ -2271,7 +2271,7 @@ with `patch'."
(mml-attach-file patch type "patch" disposition))
(when (and (not (member
"patch"
- (alist-get 'tags (car (debbugs-get-status bugnum)))))
+ (alist-get 'tags (car (debbugs-get-status (list
bugnum))))))
(y-or-n-p "Tag + patch? "))
(debbugs-gnu-make-control-message
"patch" bugnum nil (current-buffer)))))
diff --git a/debbugs-org.el b/debbugs-org.el
index 897173f276..4051f09ebe 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -199,9 +199,9 @@ marked as \"client-side filter\"."
(dolist (status
;; `debbugs-get-status' returns in random order, so we must sort.
(sort
- (apply #'debbugs-get-status
- (debbugs-gnu-get-bugs debbugs-gnu-local-query))
- (lambda (a b) (> (alist-get 'id a) (alist-get 'id b)))))
+ (debbugs-get-status
+ (debbugs-gnu-get-bugs debbugs-gnu-local-query))
+ (lambda (a b) (> (alist-get 'id a) (alist-get 'id b)))))
(let* ((beg (point))
(id (alist-get 'id status))
(done (string-equal (alist-get 'pending status) "done"))
diff --git a/debbugs.el b/debbugs.el
index 6adeb4cf63..cbba87aa27 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -366,8 +366,9 @@ bytes represent a UTF-8 string and decode them accordingly."
string-value)
(error "Invalid string value")))
-(defun debbugs-get-status (&rest bug-numbers)
- "Return a list of status entries for the bugs identified by BUG-NUMBERS.
+(defun debbugs-get-status (bug-numbers)
+ "Return a list of status entries for the bugs identified by BUG-NUMBERS,
+which is a list.
Every returned entry is an association list with the following attributes:
@@ -432,7 +433,7 @@ Every returned entry is an association list with the
following attributes:
Example:
- \(debbugs-get-status 10)
+ \(debbugs-get-status '(10))
=> ;; Attributes with empty values are not shown
\(\(\(cache_time . 1469716026.4981334)
@@ -970,7 +971,7 @@ BUG-OR-MESSAGE must be list element returned by either
Example: Return the originator of last submitted bug.
\(debbugs-get-attribute
- \(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1)))
\\='originator)"
+ \(car \(debbugs-get-status \(debbugs-newest-bugs 1))) \\='originator)"
(alist-get attribute bug-or-message))
(defun debbugs-get-message-numbers (messages)
diff --git a/debbugs.texi b/debbugs.texi
index 2c772aaa93..e6db73b084 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -318,7 +318,7 @@ Bug status is a collection of fields that holds the
information about
the state and importance of the bug report, about originator, owner and
various aspects of relationship with other bug reports.
-@defun debbugs-get-status &rest bug-numbers
+@defun debbugs-get-status bug-numbers
Return a list of status entries for the bug reports identified by
@var{bug-numbers}. Every returned entry is an association list with the
following attributes:
@@ -415,7 +415,7 @@ Example. Get the status of bug number #10 from GNU BTS:
@example
(let ((debbugs-port "gnu.org"))
- (debbugs-get-status 10))
+ (debbugs-get-status '(10)))
@result{} (((cache_time . 1469716026.4981334)
(source . "unknown") (found_versions) (done) (blocks)
@@ -444,7 +444,7 @@ Example. Return the originator of the last submitted bug
report:
@example
(let ((debbags-port "gnu.org"))
(debbugs-get-attribute
- (car (apply 'debbugs-get-status (debbugs-newest-bugs 1)))
+ (car (debbugs-get-status (debbugs-newest-bugs 1)))
'originator))
@result{} "Jack Daniels <jack@@daniels.com>"
--
2.41.0
- Re: Adding a SOAP server to Debbugs.el, (continued)
- Re: Adding a SOAP server to Debbugs.el, Felix Lechner, 2024/03/08
- Re: Adding a SOAP server to Debbugs.el, Michael Albinus, 2024/03/09
- [PATCH 00/12] Download WSDL for SOAP services from server, Felix Lechner, 2024/03/10
- [PATCH 02/12] Fix docstring for :affects., Felix Lechner, 2024/03/10
- [PATCH 03/12] Fix description in docstring for debbugs-ports., Felix Lechner, 2024/03/10
- [PATCH 05/12] Pass query to debbugs-get-bugs as a list; make space for WSDL., Felix Lechner, 2024/03/10
- [PATCH 07/12] Pass query to debbugs-search-est as a list; make space for WSDL., Felix Lechner, 2024/03/10
- [PATCH 06/12] Pass query to debbugs-get-usertag as a list; make space for WSDL., Felix Lechner, 2024/03/10
- [PATCH 10/12] Pass offline to debbugs-gnu-show-reports as keyword; make space for WSDL, Felix Lechner, 2024/03/10
- [PATCH 01/12] Don't hardcode gnu.org as debbugs-port for Gnus interface., Felix Lechner, 2024/03/10
- [PATCH 08/12] Pass bug-numbers to debbugs-get-status as a list; make space for WSDL.,
Felix Lechner <=
- [PATCH 04/12] Download WSDL specification dynamically from selected server., Felix Lechner, 2024/03/10
- [PATCH 09/12] Pass parameters to debbugs-soap-invoke-async as a list; make space for WSDL., Felix Lechner, 2024/03/10
- [PATCH 12/12] Download WSDL early and propagate it via keyword arguments., Felix Lechner, 2024/03/10
- [PATCH 11/12] Offer keyword arguments for WSDL to avoid repeated downloads., Felix Lechner, 2024/03/10
- Re: [PATCH 00/12] Download WSDL for SOAP services from server, Michael Albinus, 2024/03/12