[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/debbugs 84c56ad 280/311: Debbugs code cleanup
From: |
Stefan Monnier |
Subject: |
[elpa] externals/debbugs 84c56ad 280/311: Debbugs code cleanup |
Date: |
Sun, 29 Nov 2020 18:42:29 -0500 (EST) |
branch: externals/debbugs
commit 84c56ad97d022305297c5a4555a5c3733c4a1452
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Debbugs code cleanup
* packages/debbugs/README: Mention `debbugs-gnu-tagged' and
`debbugs-org-tagged'.
* packages/debbugs/debbugs.el:
* packages/debbugs/debbugs-gnu.el:
* packages/debbugs/debbugs-org.el: Use #' read syntax. Use `alist-get'.
Use
`assq' rather than `assoc' where appropriate.
* packages/debbugs/debbugs-gnu.el (gnus-read-ephemeral-bug-group)
(gnus-bug-group-download-format-alist): Declare.
(debbugs-gnu-select-bugs-limit): Adapt docstring. Return widget
in :validate function.
(debbugs-gnu-select-current-bugs-with-gnus): Require
`gnus-group'. Pacify byte compiler. Use `delq'.
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-sort-submitter,
debbugs-gnu-sort-title):
Assume ´string-collate-lessp' exists.
(debbugs-gnu-read-emacs-bug-with-rmail): Rename from
`debbugs-read-emacs-bug-with-rmail'.
(debbugs-gnu-read-emacs-bug-with-gnus): Rename from
`debbugs-read-emacs-bug-with-gnus'.
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-show-reports-function): New
defvar.
(debbugs-gnu, debbugs-gnu-rescan):
* packages/debbugs/debbugs-org.el (debbugs-org-search, debbugs-org-patches)
(debbugs-org-tagged, debbugs-org, debbugs-org-bugs): Use it.
* packages/debbugs/debbugs-ug.texi (Retrieving Bugs, Tabulated Lists):
Speak about
tagging a bug.
---
README | 6 +-
debbugs-gnu.el | 272 ++++++++++++++++++++++++++++----------------------------
debbugs-org.el | 75 ++++++++--------
debbugs-ug.info | 176 +++++++++++++++++++-----------------
debbugs-ug.texi | 8 ++
debbugs.el | 35 ++++----
6 files changed, 295 insertions(+), 277 deletions(-)
diff --git a/README b/README
index d4b85cc..f233cc6 100644
--- a/README
+++ b/README
@@ -7,9 +7,13 @@ the command `M-x debbugs-gnu-patches' lists bugs containing a
patch.
In order to show bugs with known numbers, `M-x debbugs-gnu-bugs' could
be used.
+Bugs can be marked by a local tag. All bugs marked like this will be
+shown via `M-x debbugs-gnu-tagged'.
+
If you prefer the listing of bugs as TODO items of `org-mode', you
could use the commands `M-x debbugs-org', `M-x debbugs-org-search',
-`M-x debbugs-org-patches' and `M-x debbugs-org-bugs' instead.
+`M-x debbugs-org-patches', `M-x debbugs-org-bugs' and `M-x
+debbugs-org-tagged' instead.
A minor mode `debbugs-browse-mode' let you browse URLs to the GNU Bug
Tracker as well as bug identifiers prepared for `bug-reference-mode'.
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index c59b279..25558d1 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -36,6 +36,7 @@
;; (autoload 'debbugs-gnu-search "debbugs-gnu" "" 'interactive)
;; (autoload 'debbugs-gnu-usertags "debbugs-gnu" "" 'interactive)
;; (autoload 'debbugs-gnu-patches "debbugs-gnu" "" 'interactive)
+;; (autoload 'debbugs-gnu-tagged "debbugs-gnu" "" 'interactive)
;; (autoload 'debbugs-gnu-bugs "debbugs-gnu" "" 'interactive)
;; The bug tracker is called interactively by
@@ -177,6 +178,7 @@
(autoload 'diff-hunk-file-names "diff-mode")
(autoload 'gnus-article-mime-handles "gnus-art")
(autoload 'gnus-fetch-field "gnus-util")
+(autoload 'gnus-read-ephemeral-bug-group "gnus-group")
(autoload 'gnus-read-ephemeral-emacs-bug-group "gnus-group")
(autoload 'gnus-summary-article-header "gnus-sum")
(autoload 'gnus-summary-select-article "gnus-sum")
@@ -201,6 +203,7 @@
(defvar compilation-in-progress)
(defvar diff-file-header-re)
(defvar gnus-article-buffer)
+(defvar gnus-bug-group-download-format-alist)
(defvar gnus-posting-styles)
(defvar gnus-save-duplicate-list)
(defvar gnus-suppress-duplicates)
@@ -371,7 +374,7 @@ If this is `rmail', use Rmail instead."
";; -*- emacs-lisp -*-\n"
";; Debbugs tags connection history. Don't change this file.\n\n"
(format "(setq debbugs-gnu-local-tags '%S)"
- (sort (copy-sequence debbugs-gnu-local-tags) '>)))))
+ (sort (copy-sequence debbugs-gnu-local-tags) #'>)))))
(defvar debbugs-gnu-current-query nil
"The query object of the current search.
@@ -617,6 +620,10 @@ depend on PHRASE being a string, or nil. See Info node
(interactive)
(debbugs-gnu '("tagged")))
+(defvar debbugs-gnu-show-reports-function #'debbugs-gnu-show-reports
+ "Which function to apply showing bug reports.
+Shall be bound in `debbugs-org-*' functions.")
+
;;;###autoload
(defun debbugs-gnu (severities &optional packages archivedp suppress tags)
"List all outstanding bugs."
@@ -675,7 +682,7 @@ depend on PHRASE being a string, or nil. See Info node
(add-to-list 'debbugs-gnu-current-query (cons 'tag tag))))
;; Show result.
- (debbugs-gnu-show-reports))
+ (funcall debbugs-gnu-show-reports-function))
;; Reset query, filter and suppress.
(setq debbugs-gnu-current-query nil
@@ -687,10 +694,10 @@ depend on PHRASE being a string, or nil. See Info node
(defun debbugs-gnu-get-bugs (query)
"Retrieve bug numbers from debbugs.gnu.org according search criteria."
(let* ((debbugs-port "gnu.org")
- (bugs (assoc 'bugs query))
- (tags (and (member '(severity . "tagged") query) (assoc 'tag query)))
+ (bugs (assq 'bugs query))
+ (tags (and (member '(severity . "tagged") query) (assq 'tag query)))
(local-tags (and (member '(severity . "tagged") query) (not tags)))
- (phrase (assoc 'phrase query))
+ (phrase (assq 'phrase query))
args)
;; Compile query arguments.
(unless (or query tags)
@@ -751,9 +758,9 @@ are taken from the cache instead."
string
(buffer-name
(cond
- ((setq string (cdr (assq 'phrase debbugs-gnu-current-query)))
+ ((setq string (alist-get 'phrase debbugs-gnu-current-query))
(format "*%S Bugs*" string))
- ((setq string (cdr (assq 'package debbugs-gnu-current-query)))
+ ((setq string (alist-get 'package debbugs-gnu-current-query))
(format "*%s Bugs*" (capitalize string)))
(t "*Bugs*"))))
;; The tabulated mode sets several local variables. We must get
@@ -773,47 +780,47 @@ are taken from the cache instead."
(maphash (lambda (key _elem)
(push key ids))
debbugs-cache-data)
- (sort ids '<))
+ (sort ids #'<))
(debbugs-gnu-get-bugs debbugs-gnu-local-query)))))
- (let* ((id (cdr (assq 'id status)))
- (words (cons (cdr (assq 'severity status))
- (cdr (assq 'keywords status))))
- (address (if (cdr (assq 'originator status))
+ (let* ((id (alist-get 'id status))
+ (words (cons (alist-get 'severity status)
+ (alist-get 'keywords status)))
+ (address (if (alist-get 'originator status)
(debbugs-gnu--split-address
- (decode-coding-string (cdr (assq 'originator status))
- 'utf-8))))
- (owner (if (cdr (assq 'owner status))
+ (decode-coding-string
+ (alist-get 'originator status) 'utf-8))))
+ (owner (if (alist-get 'owner status)
(car (debbugs-gnu--split-address
- (decode-coding-string (cdr (assq 'owner status))
- 'utf-8)))))
- (subject (if (cdr (assq 'subject status))
- (decode-coding-string (cdr (assq 'subject status))
- 'utf-8)))
- (age (- (float-time) (cdr (assq 'log_modified status))))
+ (decode-coding-string
+ (alist-get 'owner status) 'utf-8)))))
+ (subject (if (alist-get 'subject status)
+ (decode-coding-string
+ (alist-get 'subject status) 'utf-8)))
+ (age (- (float-time) (alist-get 'log_modified status)))
(week (* 60 60 24 7))
merged)
- (unless (equal (cdr (assq 'pending status)) "pending")
- (setq words (append words (list (cdr (assq 'pending status))))))
- (when (cdr (assq 'fixed status))
+ (unless (equal (alist-get 'pending status) "pending")
+ (setq words (append words (list (alist-get 'pending status)))))
+ (when (alist-get 'fixed status)
(setq words (append words '("fixed"))))
- (let ((packages (cdr (assq 'package status))))
+ (let ((packages (alist-get 'package status)))
(dolist (elt packages)
(when (member elt debbugs-gnu-default-packages)
(setq packages (delete elt packages))))
(setq words (append words packages)))
- (when (setq merged (cdr (assq 'mergedwith status)))
+ (when (setq merged (alist-get 'mergedwith status))
(setq words (append (mapcar #'number-to-string merged) words)))
;; `words' could contain the same word twice, for example
;; "fixed" from `keywords' and `pending'.
(setq words (mapconcat
- #'identity (cl-delete-duplicates words :test 'equal) ","))
+ #'identity (cl-delete-duplicates words :test #'equal) ","))
(when (or (not merged)
(not (let ((found nil))
(dolist (id (if (listp merged)
merged
(list merged)))
(dolist (entry tabulated-list-entries)
- (when (equal id (cdr (assq 'id (car entry))))
+ (when (equal id (alist-get 'id (car entry)))
(setq found t))))
found)))
(add-to-list
@@ -833,18 +840,18 @@ are taken from the cache instead."
(or words "")
'face
(cond
- ((cdr (assq 'archived status))
+ ((alist-get 'archived status)
'debbugs-gnu-archived)
- ((equal (cdr (assq 'pending status)) "done")
+ ((equal (alist-get 'pending status) "done")
'debbugs-gnu-done)
- ((equal (cdr (assq 'pending status)) "forwarded")
+ ((equal (alist-get 'pending status) "forwarded")
'debbugs-gnu-forwarded)
- ((member "pending" (cdr (assq 'keywords status)))
+ ((member "pending" (alist-get 'keywords status))
'debbugs-gnu-pending)
;; For some new bugs `date' and `log_modified' may
;; differ in 1 second.
- ((< (abs (- (cdr (assq 'date status))
- (cdr (assq 'log_modified status))))
+ ((< (abs (- (alist-get 'date status)
+ (alist-get 'log_modified status)))
3)
'debbugs-gnu-new)
((< age (* week 2)) 'debbugs-gnu-handled)
@@ -899,20 +906,18 @@ Used instead of `tabulated-list-print-entry'."
(when (and
;; We may have a narrowing in effect.
(or (not debbugs-gnu-limit)
- (memq (cdr (assq 'id list-id)) debbugs-gnu-limit))
+ (memq (alist-get 'id list-id) debbugs-gnu-limit))
;; Filter suppressed bugs.
(or (not debbugs-gnu-local-suppress)
(not (catch :suppress
(dolist (check debbugs-gnu-default-suppress-bugs)
- (when
- (string-match
- (cdr check)
- (or (cdr (assq (car check) list-id)) ""))
+ (when (string-match
+ (cdr check) (alist-get (car check) list-id ""))
(throw :suppress t))))))
;; Filter search list.
(not (catch :suppress
(dolist (check debbugs-gnu-local-filter)
- (let ((val (cdr (assq (car check) list-id))))
+ (let ((val (alist-get (car check) list-id)))
(if (stringp (cdr check))
;; Regular expression.
(when (not (string-match (cdr check) (or val "")))
@@ -981,23 +986,23 @@ Used instead of `tabulated-list-print-entry'."
(let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
- (define-key map "\r" 'debbugs-gnu-select-report)
- (define-key map [mouse-2] 'debbugs-gnu-select-report)
- (define-key map "A" 'debbugs-gnu-select-current-bugs)
- (define-key map "g" 'debbugs-gnu-rescan)
- (define-key map "R" 'debbugs-gnu-show-all-blocking-reports)
- (define-key map "C" 'debbugs-gnu-send-control-message)
- (define-key map "E" 'debbugs-gnu-make-control-message)
-
- (define-key map "s" 'debbugs-gnu-toggle-sort)
- (define-key map "t" 'debbugs-gnu-toggle-tag)
- (define-key map "x" 'debbugs-gnu-toggle-suppress)
- (define-key map "/" 'debbugs-gnu-narrow-to-status)
- (define-key map "w" 'debbugs-gnu-widen)
-
- (define-key map "b" 'debbugs-gnu-show-blocked-by-reports)
- (define-key map "B" 'debbugs-gnu-show-blocking-reports)
- (define-key map "d" 'debbugs-gnu-display-status)
+ (define-key map [return] #'debbugs-gnu-select-report)
+ (define-key map [mouse-2] #'debbugs-gnu-select-report)
+ (define-key map "A" #'debbugs-gnu-select-current-bugs)
+ (define-key map "g" #'debbugs-gnu-rescan)
+ (define-key map "R" #'debbugs-gnu-show-all-blocking-reports)
+ (define-key map "C" #'debbugs-gnu-send-control-message)
+ (define-key map "E" #'debbugs-gnu-make-control-message)
+
+ (define-key map "s" #'debbugs-gnu-toggle-sort)
+ (define-key map "t" #'debbugs-gnu-toggle-tag)
+ (define-key map "x" #'debbugs-gnu-toggle-suppress)
+ (define-key map "/" #'debbugs-gnu-narrow-to-status)
+ (define-key map "w" #'debbugs-gnu-widen)
+
+ (define-key map "b" #'debbugs-gnu-show-blocked-by-reports)
+ (define-key map "B" #'debbugs-gnu-show-blocking-reports)
+ (define-key map "d" #'debbugs-gnu-display-status)
(define-key map [menu-bar debbugs] (cons "Debbugs" menu-map))
(define-key menu-map [debbugs-gnu-select-report]
@@ -1063,7 +1068,7 @@ Interactively, it is non-nil with the prefix argument."
(debbugs-gnu-current-filter debbugs-gnu-local-filter)
(debbugs-gnu-current-suppress debbugs-gnu-local-suppress)
(debbugs-cache-expiry (if nocache t debbugs-cache-expiry)))
- (debbugs-gnu-show-reports)
+ (funcall debbugs-gnu-show-reports-function)
(when id
(debbugs-gnu-goto id))))
@@ -1090,8 +1095,7 @@ Interactively, it is non-nil with the prefix argument."
(setq buffer-read-only t))
(defun debbugs-gnu-sort-id (s1 s2)
- (> (cdr (assq 'id (car s1)))
- (cdr (assq 'id (car s2)))))
+ (> (alist-get 'id (car s1)) (alist-get 'id (car s2))))
(defconst debbugs-gnu-state-preference
'((debbugs-gnu-new . 1)
@@ -1106,8 +1110,8 @@ Interactively, it is non-nil with the prefix argument."
(debbugs-gnu-done . 10)))
(defun debbugs-gnu-get-state-preference (face-string)
- (or (cdr (assq (get-text-property 0 'face face-string)
- debbugs-gnu-state-preference))
+ (or (alist-get (get-text-property 0 'face face-string)
+ debbugs-gnu-state-preference)
10))
(defconst debbugs-gnu-severity-preference
@@ -1118,14 +1122,13 @@ Interactively, it is non-nil with the prefix argument."
("wishlist" . 5)))
(defun debbugs-gnu-get-severity-preference (state)
- (or (cdr (assoc (cdr (assq 'severity state))
- debbugs-gnu-severity-preference))
+ (or (cdr (assoc (alist-get 'severity state) debbugs-gnu-severity-preference))
10))
(defun debbugs-gnu-sort-state (s1 s2)
- (let ((id1 (cdr (assq 'id (car s1))))
+ (let ((id1 (alist-get 'id (car s1)))
(age1 (debbugs-gnu-get-state-preference (aref (nth 1 s1) 1)))
- (id2 (cdr (assq 'id (car s2))))
+ (id2 (alist-get 'id (car s2)))
(age2 (debbugs-gnu-get-state-preference (aref (nth 1 s2) 1))))
(cond
;; Tagged bugs go to the beginning.
@@ -1149,12 +1152,10 @@ Interactively, it is non-nil with the prefix argument."
(defun debbugs-gnu-sort-submitter (s1 s2)
(let ((address1
(debbugs-gnu--split-address
- (decode-coding-string
- (or (cdr (assq 'originator (car s1))) "") 'utf-8)))
+ (decode-coding-string (alist-get 'originator (car s1) "") 'utf-8)))
(address2
(debbugs-gnu--split-address
- (decode-coding-string
- (or (cdr (assq 'originator (car s2))) "") 'utf-8))))
+ (decode-coding-string (alist-get 'originator (car s2) "") 'utf-8))))
(cond
;; Bugs I'm the originator of go to the beginning.
((and (string-equal user-mail-address (car address1))
@@ -1164,28 +1165,22 @@ Interactively, it is non-nil with the prefix argument."
(not (string-equal (car address1) (car address2))))
nil)
;; Then, we check the originator. Prefer the name over the address.
- (t (if (functionp 'string-collate-lessp)
- (funcall 'string-collate-lessp
- (or (cdr address1) (car address1) "")
- (or (cdr address2) (car address2) "")
- nil t)
- (string-lessp
- (downcase (or (cdr address1) (car address1) ""))
- (downcase (or (cdr address2) (car address2) ""))))))))
+ (t (string-collate-lessp
+ (or (cdr address1) (car address1) "")
+ (or (cdr address2) (car address2) "")
+ nil t)))))
(defun debbugs-gnu-sort-title (s1 s2)
(let ((owner1
(car (debbugs-gnu--split-address
- (decode-coding-string
- (or (cdr (assq 'owner (car s1))) "") 'utf-8))))
+ (decode-coding-string (alist-get 'owner (car s1) "") 'utf-8))))
(subject1
- (decode-coding-string (or (cdr (assq 'subject (car s1))) "") 'utf-8))
+ (decode-coding-string (alist-get 'subject (car s1) "") 'utf-8))
(owner2
(car (debbugs-gnu--split-address
- (decode-coding-string
- (or (cdr (assq 'owner (car s2))) "") 'utf-8))))
+ (decode-coding-string (alist-get 'owner (car s2) "") 'utf-8))))
(subject2
- (decode-coding-string (or (cdr (assq 'subject (car s2))) "") 'utf-8)))
+ (decode-coding-string (alist-get 'subject (car s2) "") 'utf-8)))
(cond
;; Bugs I'm the owner of go to the beginning.
((and (string-equal user-mail-address owner1)
@@ -1195,9 +1190,7 @@ Interactively, it is non-nil with the prefix argument."
(not (string-equal owner1 owner2)))
nil)
;; Then, we check the title.
- (t (if (functionp 'string-collate-lessp)
- (funcall 'string-collate-lessp subject1 subject2 nil t)
- (string-lessp (downcase subject1) (downcase subject2)))))))
+ (t (string-collate-lessp subject1 subject2 nil t)))))
(defun debbugs-gnu-toggle-sort ()
"Toggle sorting by age and by state."
@@ -1227,18 +1220,18 @@ Interactively, it is non-nil with the prefix argument."
(interactive)
(let ((id (debbugs-gnu-current-id))
(status (debbugs-gnu-current-status)))
- (if (null (cdr (assq 'blockedby status)))
+ (if (null (alist-get 'blockedby status))
(message "Bug %d is not blocked by any other bug" id)
- (apply #'debbugs-gnu-bugs (cdr (assq 'blockedby status))))))
+ (apply #'debbugs-gnu-bugs (alist-get 'blockedby status)))))
(defun debbugs-gnu-show-blocking-reports ()
"Display all bug reports this report is blocking."
(interactive)
(let ((id (debbugs-gnu-current-id))
(status (debbugs-gnu-current-status)))
- (if (null (cdr (assq 'blocks status)))
+ (if (null (alist-get 'blocks status))
(message "Bug %d is not blocking any other bug" id)
- (apply #'debbugs-gnu-bugs (cdr (assq 'blocks status))))))
+ (apply #'debbugs-gnu-bugs (alist-get 'blocks status)))))
(defun debbugs-gnu-show-all-blocking-reports (&optional release)
"Narrow the display to just the reports that are blocking an Emacs release."
@@ -1265,9 +1258,9 @@ Interactively, it is non-nil with the prefix argument."
(goto-char (point-min))
(while (not (eobp))
(setq status (debbugs-gnu-current-status))
- (if (not (memq (cdr (assq 'id status)) blockers))
+ (if (not (memq (alist-get 'id status) blockers))
(delete-region (point) (progn (forward-line 1) (point)))
- (push (cdr (assq 'id status)) debbugs-gnu-limit)
+ (push (alist-get 'id status) debbugs-gnu-limit)
(forward-line 1)))
(when id
(debbugs-gnu-goto id))))
@@ -1287,15 +1280,15 @@ Subject fields."
(while (not (eobp))
(setq status (debbugs-gnu-current-status))
(if (and (not (member string (assq 'keywords status)))
- (not (equal string (cdr (assq 'severity status))))
+ (not (equal string (alist-get 'severity status)))
(or status-only
(not (string-match
- string (cdr (assq 'originator status)))))
+ string (alist-get 'originator status))))
(or status-only
- (not (cdr (assq 'subject status)))
- (not (string-match string (cdr (assq 'subject status))))))
+ (not (alist-get 'subject status))
+ (not (string-match string (alist-get 'subject status)))))
(delete-region (point) (progn (forward-line 1) (point)))
- (push (cdr (assq 'id status)) debbugs-gnu-limit)
+ (push (alist-get 'id status) debbugs-gnu-limit)
(forward-line 1)))
(when id
(debbugs-gnu-goto id)))))
@@ -1329,7 +1322,7 @@ interest to you."
(defun debbugs-gnu--update-tag-face (id)
(dolist (entry tabulated-list-entries)
- (when (equal (cdr (assq 'id (car entry))) id)
+ (when (equal (alist-get 'id (car entry)) id)
(aset (cadr entry) 0
(propertize
(format "%5d" id)
@@ -1350,7 +1343,7 @@ interest to you."
(defvar debbugs-gnu-subject nil)
(defun debbugs-gnu-current-id (&optional noerror)
- (or (cdr (assq 'id (debbugs-gnu-current-status)))
+ (or (alist-get 'id (debbugs-gnu-current-status))
(and (not noerror)
(error "No bug on the current line"))))
@@ -1383,7 +1376,7 @@ interest to you."
(set-buffer-modified-p nil)
(special-mode))
-(defun debbugs-read-emacs-bug-with-rmail (id status merged)
+(defun debbugs-gnu-read-emacs-bug-with-rmail (id status merged)
"Read email exchange for debbugs bug ID.
STATUS is the bug's status list.
MERGED is the list of bugs merged with this one."
@@ -1406,30 +1399,35 @@ MERGED is the list of bugs merged with this one."
(rmail-show-message (1+ rmail-current-message))))))
(set (make-local-variable 'debbugs-gnu-bug-number) id)
(set (make-local-variable 'debbugs-gnu-subject)
- (format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
+ (format "Re: bug#%d: %s" id (alist-get 'subject status)))
(rmail-summary)
- (define-key rmail-summary-mode-map "C" 'debbugs-gnu-send-control-message)
- (define-key rmail-summary-mode-map "E" 'debbugs-gnu-make-control-message)
+ (define-key rmail-summary-mode-map "C" #'debbugs-gnu-send-control-message)
+ (define-key rmail-summary-mode-map "E" #'debbugs-gnu-make-control-message)
(set-window-text-height nil 10)
(other-window 1)
- (define-key rmail-mode-map "C" 'debbugs-gnu-send-control-message)
- (define-key rmail-mode-map "E" 'debbugs-gnu-make-control-message)
+ (define-key rmail-mode-map "C" #'debbugs-gnu-send-control-message)
+ (define-key rmail-mode-map "E" #'debbugs-gnu-make-control-message)
(rmail-show-message 1)))
(defconst debbugs-gnu-select-bugs-limit-max 50
"Absolute maximum for `debbugs-gnu-select-bugs-limit'.")
+
(defcustom debbugs-gnu-select-bugs-limit 10
"Maximum number of bugs to retrieve for multi-bug mailbox group.
This applies for `debbugs-gnu-select-current-bugs'.
-Maximum allowed value is 50 to avoid overloading the server."
+Maximum allowed value is `debbugs-gnu-select-bugs-limit-max' to
+avoid overloading the server."
:type '(integer
:validate
(lambda (widget)
(unless (<= 1
(widget-value widget)
debbugs-gnu-select-bugs-limit-max)
- (widget-put widget :error
- (format "Invalid value: range is 1..%d"
debbugs-gnu-select-bugs-limit-max)))))
+ (widget-put
+ widget :error
+ (format "Invalid value: range is 1..%d"
+ debbugs-gnu-select-bugs-limit-max))
+ widget)))
:version "27.1")
(defun debbugs-gnu-select-current-bugs ()
@@ -1443,6 +1441,7 @@ Limited by `debbugs-gnu-select-bugs-limit'."
(defun debbugs-gnu-select-current-bugs-with-gnus ()
"Create a Gnus group of the messages from the currently shown bugs."
(save-excursion
+ (require 'gnus-group)
(let ((mbox-url
(replace-regexp-in-string
";mboxstat=yes" ""
@@ -1450,11 +1449,11 @@ Limited by `debbugs-gnu-select-bugs-limit'."
nil t))
ids)
(goto-char (point-min))
- (dotimes (i debbugs-gnu-select-bugs-limit)
+ (dotimes (_ debbugs-gnu-select-bugs-limit)
(push (debbugs-gnu-current-id t) ids)
- (push (cdr (assq 'mergedwith (debbugs-gnu-current-status))) ids)
+ (push (alist-get 'mergedwith (debbugs-gnu-current-status)) ids)
(forward-line 1))
- (setq ids (delete nil (nreverse ids)))
+ (setq ids (delq nil (nreverse ids)))
(gnus-read-ephemeral-bug-group ids mbox-url)
(debbugs-gnu-summary-mode 1))))
@@ -1463,7 +1462,7 @@ Limited by `debbugs-gnu-select-bugs-limit'."
:type 'boolean
:version "27.1")
-(defun debbugs-read-emacs-bug-with-gnus (id status merged)
+(defun debbugs-gnu-read-emacs-bug-with-gnus (id status merged)
"Read email exchange for debbugs bug ID.
STATUS is the bug's status list.
MERGED is the list of bugs merged with this one."
@@ -1479,7 +1478,7 @@ MERGED is the list of bugs merged with this one."
(with-current-buffer (window-buffer (selected-window))
(set (make-local-variable 'debbugs-gnu-bug-number) id)
(set (make-local-variable 'debbugs-gnu-subject)
- (format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
+ (format "Re: bug#%d: %s" id (alist-get 'subject status)))
(debbugs-gnu-summary-mode 1)))
(defun debbugs-gnu-select-report ()
@@ -1488,23 +1487,23 @@ MERGED is the list of bugs merged with this one."
(when (mouse-event-p last-input-event) (mouse-set-point last-input-event))
;; We open the report messages.
(let* ((status (debbugs-gnu-current-status))
- (id (cdr (assq 'id status)))
- (merged (cdr (assq 'mergedwith status))))
+ (id (alist-get 'id status))
+ (merged (alist-get 'mergedwith status)))
(setq merged (if (listp merged) merged (list merged)))
(cond
((not id)
(message "No bug report on the current line"))
((eq debbugs-gnu-mail-backend 'rmail)
- (debbugs-read-emacs-bug-with-rmail id status merged))
+ (debbugs-gnu-read-emacs-bug-with-rmail id status merged))
((eq debbugs-gnu-mail-backend 'gnus)
- (debbugs-read-emacs-bug-with-gnus id status merged))
+ (debbugs-gnu-read-emacs-bug-with-gnus id status merged))
(t (error "No valid mail backend specified")))))
(defvar debbugs-gnu-summary-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "C" 'debbugs-gnu-send-control-message)
- (define-key map "E" 'debbugs-gnu-make-control-message)
- (define-key map [(meta m)] 'debbugs-gnu-apply-patch)
+ (define-key map "C" #'debbugs-gnu-send-control-message)
+ (define-key map "E" #'debbugs-gnu-make-control-message)
+ (define-key map [(meta m)] #'debbugs-gnu-apply-patch)
map))
(define-minor-mode debbugs-gnu-summary-mode
@@ -1719,7 +1718,7 @@ removed instead."
(not noversion)
(member message '("close" "done"
"fixed" "notfixed" "found" "notfound"))
- (member "emacs" (cdr (assq 'package status))))
+ (member "emacs" (alist-get 'package status)))
(save-excursion
(read-string
"Version: "
@@ -1795,8 +1794,7 @@ removed instead."
(completing-read-multiple
(format "%s with bug(s) #: " (capitalize message))
(if (equal message "unblock")
- (mapcar #'number-to-string
- (cdr (assq 'blockedby status)))
+ (mapcar #'number-to-string (alist-get 'blockedby status))
debbugs-gnu-completion-table)
nil (and (equal message "unblock") status)))
" ")))
@@ -1939,7 +1937,7 @@ REMOTE-INFO is return value of
`debbugs-gnu--git-remote-info'."
(goto-char (point-min))
(buffer-substring (point-min) (line-end-position))))
(remote (pop remote-info)))
- (let ((ref-globs (cdr (assq 'ref-globs remote-info))))
+ (let ((ref-globs (alist-get 'ref-globs remote-info)))
(with-temp-buffer
(apply
#'debbugs-gnu--git-insert
@@ -1955,7 +1953,7 @@ REMOTE-INFO is return value of
`debbugs-gnu--git-remote-info'."
"Insert info about COMMIT-RANGE into message.
Optionally call `debbugs-gnu-make-control-message' to close BUGNUM."
(let* ((status (car (debbugs-get-status bugnum)))
- (packages (cdr (assq 'package status)))
+ (packages (alist-get 'package status))
(remote-info (debbugs-gnu--git-remote-info)))
(insert "\nPushed to "
(or (debbugs-gnu--git-get-pushed-to commit-range remote-info) "")
@@ -1963,7 +1961,7 @@ Optionally call `debbugs-gnu-make-control-message' to
close BUGNUM."
(debbugs-gnu--git-insert
"show" "--no-patch"
(concat "--format=" debbugs-gnu-commit-description-format
- "\n" (cdr (assq 'commit-url remote-info)) "\n")
+ "\n" (alist-get 'commit-url remote-info) "\n")
commit-range)
(when (y-or-n-p "Close bug? ")
(let ((emacs-version
@@ -2112,7 +2110,7 @@ successfully sent."
(defvar debbugs-gnu-pick-vc-log-commit-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "c" 'debbugs-gnu-pick-commits)
+ (define-key map "c" #'debbugs-gnu-pick-commits)
map))
(define-minor-mode debbugs-gnu-pick-vc-log-commit-mode
@@ -2126,8 +2124,8 @@ successfully sent."
(defvar debbugs-gnu-usertags-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
- (define-key map "\r" 'debbugs-gnu-select-usertag)
- (define-key map [mouse-2] 'debbugs-gnu-select-usertag)
+ (define-key map [return] #'debbugs-gnu-select-usertag)
+ (define-key map [mouse-2] #'debbugs-gnu-select-usertag)
map))
(define-derived-mode debbugs-gnu-usertags-mode tabulated-list-mode "Usertags"
@@ -2171,11 +2169,11 @@ successfully sent."
(setq tabulated-list-format `[("User" ,user-tab-length t)
("Tag" 10 t)])
(setq tabulated-list-sort-key (cons "User" nil))
- ;(setq tabulated-list-printer 'debbugs-gnu-print-entry)
+ ;(setq tabulated-list-printer #'debbugs-gnu-print-entry)
;; Retrieve user tags.
(dolist (user users)
- (dolist (tag (sort (debbugs-get-usertag :user user) 'string<))
+ (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'.
@@ -2262,7 +2260,7 @@ or bug ranges, with default to
`debbugs-gnu-default-bug-number-list'."
(setq debbugs-gnu-current-directory
(read-file-name
"Emacs repository location: "
- debbugs-gnu-current-directory nil t nil 'file-directory-p))))
+ debbugs-gnu-current-directory nil t nil #'file-directory-p))))
(defun debbugs-gnu-apply-patch (&optional branch selectively)
"Apply the patch from the current message.
@@ -2469,7 +2467,7 @@ If SELECTIVELY, query the user before applying the patch."
(defvar debbugs-gnu-lisp-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [(meta m)] 'debbugs-gnu-insert-changelog)
+ (define-key map [(meta m)] #'debbugs-gnu-insert-changelog)
map))
(define-minor-mode debbugs-gnu-lisp-mode
@@ -2480,7 +2478,7 @@ If SELECTIVELY, query the user before applying the patch."
(defvar debbugs-gnu-diff-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [(meta m)] 'debbugs-gnu-diff-select)
+ (define-key map [(meta m)] #'debbugs-gnu-diff-select)
map))
(define-minor-mode debbugs-gnu-diff-mode
@@ -2498,7 +2496,7 @@ If SELECTIVELY, query the user before applying the patch."
(defvar debbugs-gnu-change-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [(meta m)] 'debbugs-gnu-change-checkin)
+ (define-key map [(meta m)] #'debbugs-gnu-change-checkin)
map))
(define-minor-mode debbugs-gnu-change-mode
@@ -2545,7 +2543,7 @@ If SELECTIVELY, query the user before applying the patch."
(defvar debbugs-gnu-log-edit-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [(meta m)] 'debbugs-gnu-log-edit-done)
+ (define-key map [(meta m)] #'debbugs-gnu-log-edit-done)
map))
(define-minor-mode debbugs-gnu-log-edit-mode
diff --git a/debbugs-org.el b/debbugs-org.el
index dd69438..99defe1 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -33,6 +33,7 @@
;; (autoload 'debbugs-org "debbugs-org" "" 'interactive)
;; (autoload 'debbugs-org-search "debbugs-org" "" 'interactive)
;; (autoload 'debbugs-org-patches "debbugs-org" "" 'interactive)
+;; (autoload 'debbugs-org-tagged "debbugs-org" "" 'interactive)
;; (autoload 'debbugs-org-bugs "debbugs-org" "" 'interactive)
;; The bug tracker is called interactively by
@@ -135,8 +136,7 @@
(defun debbugs-org-get-severity-priority (state)
"Returns the TODO priority of STATE."
- (or (cdr (assoc (cdr (assq 'severity state))
- debbugs-org-severity-priority))
+ (or (cdr (assoc (alist-get 'severity state) debbugs-org-severity-priority))
(cdr (assoc "minor" debbugs-org-severity-priority))))
(defconst debbugs-org-priority-faces
@@ -157,33 +157,29 @@ Further key-value pairs are requested until an empty key
is
returned. If a key cannot be queried by a SOAP request, it is
marked as \"client-side filter\"."
(interactive)
- (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
- #'debbugs-org-show-reports))
- (call-interactively 'debbugs-gnu-search)))
+ (let ((debbugs-gnu-show-reports-function #'debbugs-org-show-reports))
+ (call-interactively #'debbugs-gnu-search)))
;;;###autoload
(defun debbugs-org-patches ()
"List the bug reports that have been marked as containing a patch."
(interactive)
- (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
- #'debbugs-org-show-reports))
- (call-interactively 'debbugs-gnu-patches)))
+ (let ((debbugs-gnu-show-reports-function #'debbugs-org-show-reports))
+ (call-interactively #'debbugs-gnu-patches)))
;;;###autoload
(defun debbugs-org-tagged ()
"List the bug reports that have been tagged locally."
(interactive)
- (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
- #'debbugs-org-show-reports))
+ (let ((debbugs-gnu-show-reports-function #'debbugs-org-show-reports))
(call-interactively 'debbugs-gnu-tagged)))
;;;###autoload
(defun debbugs-org ()
"List all outstanding bugs."
(interactive)
- (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
- #'debbugs-org-show-reports))
- (call-interactively 'debbugs-gnu)))
+ (let ((debbugs-gnu-show-reports-function #'debbugs-org-show-reports))
+ (call-interactively #'debbugs-gnu)))
(defun debbugs-org-show-reports ()
"Show bug reports as retrieved via `debbugs-gnu-current-query'."
@@ -198,30 +194,30 @@ marked as \"client-side filter\"."
(dolist (status
;; `debbugs-get-status' returns in random order, so we must sort.
(sort
- (apply 'debbugs-get-status
+ (apply #'debbugs-get-status
(debbugs-gnu-get-bugs debbugs-gnu-local-query))
- (lambda (a b) (> (cdr (assq 'id a)) (cdr (assq 'id b))))))
+ (lambda (a b) (> (alist-get 'id a) (alist-get 'id b)))))
(let* ((beg (point))
- (id (cdr (assq 'id status)))
- (done (string-equal (cdr (assq 'pending status)) "done"))
+ (id (alist-get 'id status))
+ (done (string-equal (alist-get 'pending status) "done"))
(priority (debbugs-org-get-severity-priority status))
- (archived (cdr (assq 'archived status)))
- (tags (append (cdr (assq 'found_versions status))
- (cdr (assq 'tags status))))
- (subject (when (cdr (assq 'subject status))
+ (archived (alist-get 'archived status))
+ (tags (append (alist-get 'found_versions status)
+ (alist-get 'tags status)))
+ (subject (when (alist-get 'subject status)
(decode-coding-string
- (cdr (assq 'subject status)) 'utf-8)))
- (date (cdr (assq 'date status)))
- (last-modified (cdr (assq 'last_modified status)))
- (originator (when (cdr (assq 'originator status))
+ (alist-get 'subject status) 'utf-8)))
+ (date (alist-get 'date status))
+ (last-modified (alist-get 'last_modified status))
+ (originator (when (alist-get 'originator status)
(decode-coding-string
- (cdr (assq 'originator status)) 'utf-8)))
- (owner (when (cdr (assq 'owner status))
- (decode-coding-string (cdr (assq 'owner status)) 'utf-8)))
- (closed-by (when (cdr (assq 'done status))
+ (alist-get 'originator status) 'utf-8)))
+ (owner (when (alist-get 'owner status)
+ (decode-coding-string (alist-get 'owner status) 'utf-8)))
+ (closed-by (when (alist-get 'done status)
(decode-coding-string
- (cdr (assq 'done status)) 'utf-8)))
- (merged (cdr (assq 'mergedwith status))))
+ (alist-get 'done status) 'utf-8)))
+ (merged (alist-get 'mergedwith status)))
;; Handle tags.
(when (string-match "^\\([0-9.]+\\); \\(.+\\)$" subject)
@@ -241,7 +237,7 @@ marked as \"client-side filter\"."
"* %s [#%s] %s %s\n"
(if done "DONE" "TODO")
priority subject
- (if tags (mapconcat 'identity (append '("") tags '("")) ":") "")))
+ (if tags (mapconcat #'identity (append '("") tags '("")) ":") "")))
;; Submitted.
(when date
@@ -257,7 +253,7 @@ marked as \"client-side filter\"."
(format
" :MERGED_WITH: %s\n"
(if (numberp merged)
- merged (mapconcat 'number-to-string merged " ")))))
+ merged (mapconcat #'number-to-string merged " ")))))
(insert (format " :CREATOR: %s\n" originator))
(when owner (insert (format " :OWNER: %s\n" owner)))
(when closed-by (insert (format " :CLOSED_BY: %s\n" closed-by)))
@@ -306,10 +302,10 @@ the corresponding buffer (e.g. by closing Emacs)."
(defconst debbugs-org-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "C-c # t") 'debbugs-gnu-toggle-tag)
- (define-key map (kbd "C-c # C") 'debbugs-gnu-send-control-message)
- (define-key map (kbd "C-c # E") 'debbugs-gnu-make-control-message)
- (define-key map (kbd "C-c # d") 'debbugs-gnu-display-status)
+ (define-key map (kbd "C-c # t") #'debbugs-gnu-toggle-tag)
+ (define-key map (kbd "C-c # C") #'debbugs-gnu-send-control-message)
+ (define-key map (kbd "C-c # E") #'debbugs-gnu-make-control-message)
+ (define-key map (kbd "C-c # d") #'debbugs-gnu-display-status)
map)
"Keymap for the `debbugs-org-mode' minor mode.")
@@ -348,9 +344,8 @@ the corresponding buffer (e.g. by closing Emacs)."
In interactive calls, prompt for a comma separated list of bugs
or bug ranges, with default to `debbugs-gnu-default-bug-number-list'."
(interactive)
- (cl-letf (((symbol-function 'debbugs-gnu-show-reports)
- #'debbugs-org-show-reports))
- (call-interactively 'debbugs-gnu-bugs)))
+ (let ((debbugs-gnu-show-reports-function #'debbugs-org-show-reports))
+ (call-interactively #'debbugs-gnu-bugs)))
;; TODO
diff --git a/debbugs-ug.info b/debbugs-ug.info
index 06519cb..2629d91 100644
--- a/debbugs-ug.info
+++ b/debbugs-ug.info
@@ -74,6 +74,10 @@ prefix.
When the bug numbers to be retrieved are known, the commands
'debbugs-gnu-bugs' or 'debbugs-org-bugs' are applicable.
+ The commands 'debbugs-gnu-patches' / 'debbugs-org-patches' and
+'debbugs-gnu-tagged' / 'debbugs-org-tagged' retrieve bugs with a
+predefined filter.
+
-- Command: debbugs-gnu severities &optional packages archivedp
suppress tags
-- Command: debbugs-org severities &optional packages archivedp
@@ -357,6 +361,11 @@ This enables the following key strokes:
'<mouse-1>' Show the email messages that discuss the bug.
'<mouse-2>'
+'A' 'debbugs-gnu-select-current-bugs'
+ Show the email messages for all currently displayed
+ messages (including merged reports). Limited by user
+ option 'debbugs-gnu-select-bugs-limit'.
+
'd' 'debbugs-gnu-display-status'
Show all bug attributes.
@@ -403,6 +412,10 @@ This enables the following key strokes:
Make (but don't yet send) a control message for this
bug, *note Control Messages::.
+ Tagging a bug locally via 't' is an efficient way to keep bugs
+visible you are working on. The command 'debbugs-gnu-tagged' shows
+all locally tagged bugs in a list.
+
The user option 'debbugs-gnu-suppress-closed' controls, whether
closed bugs are shown in the initial list.
@@ -718,18 +731,18 @@ Command Index
[index ]
* Menu:
-* debbugs-browse-mode: Minor Mode. (line 12)
-* debbugs-gnu: Retrieving Bugs. (line 15)
-* debbugs-gnu-bugs: Retrieving Bugs. (line 69)
-* debbugs-gnu-patches: Retrieving Bugs. (line 86)
-* debbugs-gnu-pick-commits: Posting Patches. (line 16)
-* debbugs-gnu-search: Searching Bugs. (line 15)
-* debbugs-gnu-tagged: Retrieving Bugs. (line 96)
-* debbugs-org: Retrieving Bugs. (line 17)
-* debbugs-org-bugs: Retrieving Bugs. (line 70)
-* debbugs-org-patches: Retrieving Bugs. (line 87)
-* debbugs-org-search: Searching Bugs. (line 16)
-* debbugs-org-tagged: Retrieving Bugs. (line 97)
+* debbugs-browse-mode: Minor Mode. (line 12)
+* debbugs-gnu: Retrieving Bugs. (line 19)
+* debbugs-gnu-bugs: Retrieving Bugs. (line 73)
+* debbugs-gnu-patches: Retrieving Bugs. (line 90)
+* debbugs-gnu-pick-commits: Posting Patches. (line 16)
+* debbugs-gnu-search: Searching Bugs. (line 15)
+* debbugs-gnu-tagged: Retrieving Bugs. (line 100)
+* debbugs-org: Retrieving Bugs. (line 21)
+* debbugs-org-bugs: Retrieving Bugs. (line 74)
+* debbugs-org-patches: Retrieving Bugs. (line 91)
+* debbugs-org-search: Searching Bugs. (line 16)
+* debbugs-org-tagged: Retrieving Bugs. (line 101)
File: debbugs-ug.info, Node: Variable Index, Next: Key Index, Prev: Command
Index, Up: Top
@@ -741,24 +754,24 @@ Variable Index
* Menu:
* debbugs-browse-function: Minor Mode. (line 12)
-* debbugs-gnu-all-packages: Retrieving Bugs. (line 36)
-* debbugs-gnu-all-severities: Retrieving Bugs. (line 27)
+* debbugs-gnu-all-packages: Retrieving Bugs. (line 40)
+* debbugs-gnu-all-severities: Retrieving Bugs. (line 31)
* debbugs-gnu-branch-directory: Applying Patches. (line 18)
* debbugs-gnu-commit-description-format: Customizing debbugs-gnu-pick-commits.
(line 6)
-* debbugs-gnu-default-bug-number-list: Retrieving Bugs. (line 81)
-* debbugs-gnu-default-packages: Retrieving Bugs. (line 63)
-* debbugs-gnu-default-severities: Retrieving Bugs. (line 63)
-* debbugs-gnu-default-suppress-bugs: Retrieving Bugs. (line 44)
+* debbugs-gnu-default-bug-number-list: Retrieving Bugs. (line 85)
+* debbugs-gnu-default-packages: Retrieving Bugs. (line 67)
+* debbugs-gnu-default-severities: Retrieving Bugs. (line 67)
+* debbugs-gnu-default-suppress-bugs: Retrieving Bugs. (line 48)
* debbugs-gnu-git-remote-info-alist: Customizing debbugs-gnu-pick-commits.
(line 6)
-* debbugs-gnu-mail-backend: Tabulated Lists. (line 82)
+* debbugs-gnu-mail-backend: Tabulated Lists. (line 91)
* debbugs-gnu-read-commit-range-hook: Posting Patches. (line 11)
* debbugs-gnu-send-mail-function: Control Messages. (line 133)
-* debbugs-gnu-suppress-closed: Tabulated Lists. (line 79)
+* debbugs-gnu-suppress-closed: Tabulated Lists. (line 88)
* debbugs-gnu-trunk-directory: Applying Patches. (line 18)
* debbugs-org-severity-priority: TODO Items. (line 10)
-* debbugs-show-progress: Retrieving Bugs. (line 105)
+* debbugs-show-progress: Retrieving Bugs. (line 109)
File: debbugs-ug.info, Node: Key Index, Next: Mail Command Index, Prev:
Variable Index, Up: Top
@@ -769,28 +782,29 @@ Key Index
[index ]
* Menu:
-* /: Tabulated Lists. (line 36)
-* B: Tabulated Lists. (line 57)
-* b: Tabulated Lists. (line 58)
-* C: Tabulated Lists. (line 71)
+* /: Tabulated Lists. (line 41)
+* A: Tabulated Lists. (line 33)
+* B: Tabulated Lists. (line 62)
+* b: Tabulated Lists. (line 63)
+* C: Tabulated Lists. (line 76)
* C-c # C: TODO Items. (line 25)
* C-c # d: TODO Items. (line 19)
* C-c # E: TODO Items. (line 28)
* C-c # t: TODO Items. (line 22)
-* d: Tabulated Lists. (line 33)
-* E: Tabulated Lists. (line 75)
-* g: Tabulated Lists. (line 52)
+* d: Tabulated Lists. (line 38)
+* E: Tabulated Lists. (line 80)
+* g: Tabulated Lists. (line 57)
* M-m: Applying Patches. (line 10)
* <mouse-1>: Tabulated Lists. (line 30)
* <mouse-2>: Tabulated Lists. (line 31)
-* R: Tabulated Lists. (line 42)
+* R: Tabulated Lists. (line 47)
* <RET>: Tabulated Lists. (line 29)
-* <RET> <1>: Tabulated Lists. (line 82)
-* s: Tabulated Lists. (line 62)
-* t: Tabulated Lists. (line 65)
+* <RET> <1>: Tabulated Lists. (line 91)
+* s: Tabulated Lists. (line 67)
+* t: Tabulated Lists. (line 70)
* <TAB>: TODO Items. (line 16)
-* w: Tabulated Lists. (line 49)
-* x: Tabulated Lists. (line 68)
+* w: Tabulated Lists. (line 54)
+* x: Tabulated Lists. (line 73)
File: debbugs-ug.info, Node: Mail Command Index, Prev: Key Index, Up: Top
@@ -1140,52 +1154,52 @@ Debbugs control mailserver commands
Tag Table:
Node: Top1097
Node: Retrieving Bugs2704
-Node: Searching Bugs7376
-Ref: Searching Bugs-Footnote-111926
-Ref: Searching Bugs-Footnote-212014
-Node: Presenting Bugs12105
-Node: Tabulated Lists12767
-Node: TODO Items16606
-Node: Control Messages17927
-Node: Applying Patches21444
-Node: Posting Patches22834
-Node: Customizing debbugs-gnu-pick-commits25319
-Node: Minor Mode26019
-Node: Command Index27295
-Node: Variable Index28297
-Node: Key Index29813
-Node: Mail Command Index31521
-Ref: Mail Command Index: reassign31674
-Ref: Mail Command Index: reopen32440
-Ref: Mail Command Index: found33594
-Ref: Mail Command Index: notfound34675
-Ref: Mail Command Index: fixed35084
-Ref: Mail Command Index: notfixed35530
-Ref: Mail Command Index: submitter36153
-Ref: Mail Command Index: forwarded36547
-Ref: Mail Command Index: notforwarded37165
-Ref: Mail Command Index: retitle37366
-Ref: Mail Command Index: severity37750
-Ref: Mail Command Index: clone38081
-Ref: Mail Command Index: merge38845
-Ref: Mail Command Index: forcemerge40232
-Ref: Mail Command Index: unmerge40676
-Ref: Mail Command Index: tags41379
-Ref: Mail Command Index: block42445
-Ref: Mail Command Index: unblock42482
-Ref: Mail Command Index: close42967
-Ref: Mail Command Index: package43617
-Ref: Mail Command Index: owner44229
-Ref: Mail Command Index: noowner44592
-Ref: Mail Command Index: archive44765
-Ref: Mail Command Index: unarchive44906
-Ref: Mail Command Index: #45199
-Ref: Mail Command Index: quit45459
-Ref: Mail Command Index: stop45466
-Ref: Mail Command Index: thank45473
-Ref: Mail Command Index: thanks45481
-Ref: Mail Command Index: thankyou45490
-Ref: Mail Command Index: thank you45501
-Ref: Mail Command Index: --45513
+Node: Searching Bugs7527
+Ref: Searching Bugs-Footnote-112077
+Ref: Searching Bugs-Footnote-212165
+Node: Presenting Bugs12256
+Node: Tabulated Lists12918
+Node: TODO Items17183
+Node: Control Messages18504
+Node: Applying Patches22021
+Node: Posting Patches23411
+Node: Customizing debbugs-gnu-pick-commits25896
+Node: Minor Mode26596
+Node: Command Index27872
+Node: Variable Index28874
+Node: Key Index30390
+Node: Mail Command Index32169
+Ref: Mail Command Index: reassign32322
+Ref: Mail Command Index: reopen33088
+Ref: Mail Command Index: found34242
+Ref: Mail Command Index: notfound35323
+Ref: Mail Command Index: fixed35732
+Ref: Mail Command Index: notfixed36178
+Ref: Mail Command Index: submitter36801
+Ref: Mail Command Index: forwarded37195
+Ref: Mail Command Index: notforwarded37813
+Ref: Mail Command Index: retitle38014
+Ref: Mail Command Index: severity38398
+Ref: Mail Command Index: clone38729
+Ref: Mail Command Index: merge39493
+Ref: Mail Command Index: forcemerge40880
+Ref: Mail Command Index: unmerge41324
+Ref: Mail Command Index: tags42027
+Ref: Mail Command Index: block43093
+Ref: Mail Command Index: unblock43130
+Ref: Mail Command Index: close43615
+Ref: Mail Command Index: package44265
+Ref: Mail Command Index: owner44877
+Ref: Mail Command Index: noowner45240
+Ref: Mail Command Index: archive45413
+Ref: Mail Command Index: unarchive45554
+Ref: Mail Command Index: #45847
+Ref: Mail Command Index: quit46107
+Ref: Mail Command Index: stop46114
+Ref: Mail Command Index: thank46121
+Ref: Mail Command Index: thanks46129
+Ref: Mail Command Index: thankyou46138
+Ref: Mail Command Index: thank you46149
+Ref: Mail Command Index: --46161
End Tag Table
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 7c49a06..643595d 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -84,6 +84,10 @@ called with a prefix.
When the bug numbers to be retrieved are known, the commands
@code{debbugs-gnu-bugs} or @code{debbugs-org-bugs} are applicable.
+The commands @code{debbugs-gnu-patches} / @code{debbugs-org-patches}
+and @code{debbugs-gnu-tagged} / @code{debbugs-org-tagged} retrieve
+bugs with a predefined filter.
+
@deffn {Command} debbugs-gnu severities &optional packages archivedp suppress
tags
@deffnx {Command} debbugs-org severities &optional packages archivedp suppress
tags
@@ -471,6 +475,10 @@ Make (but don't yet send) a control message for this bug,
@ref{Control
Messages}.
@end multitable
+Tagging a bug locally via @kbd{t} is an efficient way to keep bugs
+visible you are working on. The command @code{debbugs-gnu-tagged}
+shows all locally tagged bugs in a list.
+
@vindex debbugs-gnu-suppress-closed
The user option @code{debbugs-gnu-suppress-closed} controls, whether
closed bugs are shown in the initial list.
diff --git a/debbugs.el b/debbugs.el
index 80f5beb..51b42c7 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -101,7 +101,7 @@ This corresponds to the Debbugs server to be accessed,
either
"The max number of bugs or results per soap invocation.")
(defvar debbugs-cache-data
- (make-hash-table :test 'equal :size debbugs-max-hits-per-request)
+ (make-hash-table :test #'equal :size debbugs-max-hits-per-request)
"Hash table of retrieved bugs.")
(defcustom debbugs-cache-expiry (* 60 60)
@@ -285,7 +285,7 @@ patch:
(unless (null query)
(error "Unknown key: %s" (car query)))
(prog1
- (sort (car (soap-invoke debbugs-wsdl debbugs-port "get_bugs" vec)) '<)
+ (sort (car (soap-invoke debbugs-wsdl debbugs-port "get_bugs" vec)) #'<)
(when debbugs-show-progress
(remove-function
(symbol-function #'url-display-percentage)
@@ -303,7 +303,7 @@ patch:
(null debbugs-cache-expiry)
(and
(natnump debbugs-cache-expiry)
- (> (cdr (assoc 'cache_time status))
+ (> (alist-get 'cache_time status)
(- (float-time) debbugs-cache-expiry)))))
;; Due to `debbugs-gnu-completion-table', this function
;; could be called in rapid sequence. We cache temporarily
@@ -329,10 +329,10 @@ patch:
(puthash 0 status debbugs-cache-data)))
;; Return the value, as list.
- (list (cdr (assoc 'newest_bug status))))
+ (list (alist-get 'newest_bug status)))
(sort
- (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) '<)))
+ (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) #'<)))
(defun debbugs-convert-soap-value-to-string (string-value)
"If STRING-VALUE is unibyte, decode its contents as a UTF-8 string.
@@ -453,7 +453,7 @@ Example:
(null debbugs-cache-expiry)
(and
(natnump debbugs-cache-expiry)
- (> (cdr (assoc 'cache_time status))
+ (> (alist-get 'cache_time status)
(- (float-time) debbugs-cache-expiry)))))
(progn
(setq cached-bugs (append cached-bugs (list status)))
@@ -518,19 +518,19 @@ Example:
(lambda (x)
(let (y)
;; "archived" is the number 1 or 0.
- (setq y (assoc 'archived (cdr (assoc 'value x))))
+ (setq y (assq 'archived (alist-get 'value x)))
(setcdr y (= (cdr y) 1))
;; "found_versions" and "fixed_versions" are lists,
;; containing strings or numbers.
(dolist (attribute '(found_versions fixed_versions))
- (setq y (assoc attribute (cdr (assoc 'value x))))
+ (setq y (assq attribute (alist-get 'value x)))
(setcdr y (mapcar
(lambda (z) (if (numberp z) (number-to-string z) z))
(cdr y))))
;; "mergedwith", "blocks" and "blockedby" are either numbers
;; or strings, containing blank separated bug numbers.
(dolist (attribute '(mergedwith blocks blockedby))
- (setq y (assoc attribute (cdr (assoc 'value x))))
+ (setq y (assq attribute (alist-get 'value x)))
(when (numberp (cdr y))
(setcdr y (list (cdr y))))
(when (stringp (cdr y))
@@ -539,26 +539,25 @@ Example:
;; "subject", "originator", "owner" and "summary" may be an
;; xsd:base64Binary value containing a UTF-8-encoded string.
(dolist (attribute '(subject originator owner summary))
- (setq y (assoc attribute (cdr (assoc 'value x))))
+ (setq y (assq attribute (alist-get 'value x)))
(when (stringp (cdr y))
(setcdr y (debbugs-convert-soap-value-to-string (cdr y)))))
;; "package" is a string, containing comma separated
;; package names. "keywords" and "tags" are strings,
;; containing blank separated package names.
(dolist (attribute '(package keywords tags))
- (setq y (assoc attribute (cdr (assoc 'value x))))
+ (setq y (assq attribute (alist-get 'value x)))
(when (stringp (cdr y))
(setcdr y (split-string (cdr y) ",\\| " t))))
;; Cache the result, and return.
(if (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry))
(puthash
- (cdr (assoc 'key x))
+ (alist-get 'key x)
;; Put also a time stamp.
- (cons (cons 'cache_time (float-time))
- (cdr (assoc 'value x)))
+ (cons (cons 'cache_time (float-time)) (alist-get 'value x))
debbugs-cache-data)
;; Don't cache.
- (cdr (assoc 'value x)))))
+ (alist-get 'value x))))
debbugs-soap-invoke-async-object))))
(defun debbugs-get-usertag (&rest query)
@@ -782,7 +781,7 @@ Examples:
,\(floor \(float-time \(encode-time 0 0 0 31 8 2011)))
:operator \"NUMBT\"))"
- (let ((phrase (assoc :phrase query))
+ (let ((phrase (assq :phrase query))
(debbugs-create-progress-reporter
(and debbugs-show-progress (null debbugs-progress-reporter)))
(debbugs-progress-reporter debbugs-progress-reporter)
@@ -966,7 +965,7 @@ Example: Return the originator of last submitted bug.
\(debbugs-get-attribute
\(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1)))
\\='originator)"
- (cdr (assoc attribute bug-or-message)))
+ (alist-get attribute bug-or-message))
(defun debbugs-get-message-numbers (messages)
"Return the message numbers of MESSAGES.
@@ -1018,7 +1017,7 @@ FILENAME is nil, the downloaded mbox is inserted into the
current buffer."
(let (url (mt "") bn)
(unless (setq url (plist-get
- (cdr (assoc debbugs-port debbugs-servers))
+ (alist-get debbugs-port debbugs-servers nil nil #'equal)
:bugreport-url))
(error "URL of bugreport script for port %s is not specified"
debbugs-port))
- [elpa] externals/debbugs 4465f3c 216/311: debbugs-gnu.el: Add "26.1", (continued)
- [elpa] externals/debbugs 4465f3c 216/311: debbugs-gnu.el: Add "26.1", Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 3f86ce3 218/311: Use "https" in debbugs bug URLs., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 722796f 221/311: Fix bug#25784 in debbugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 1022674 242/311: Minor cleanup in debbugs-gnu.el, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs f10da96 247/311: Fix debbugs-gnu-announce-commit for ELPA bugs, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs c40d91c 241/311: * packages/debbugs/debbugs.el: Require Emacs 25.1., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e234767 259/311: Don't insert two Summary lines in the commit message, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs dcb6956 262/311: * packages/debbugs/debbugs-ug.texi (Minor Mode): Show example of activation., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs c916195 270/311: * debbugs-gnu.el (debbugs-gnu-phrase-prompt): Small fix in help-echo., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 930b0dd 275/311: * packages/debbugs/debbugs-gnu.el (debbugs-gnu-rescan): New argument NOCACHE., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 84c56ad 280/311: Debbugs code cleanup,
Stefan Monnier <=
- [elpa] externals/debbugs 9639e41 287/311: Release debbugs 0.22, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e200440 299/311: Debbugs code cleanup, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 0a2dd7d 308/311: Fix debbugs-gnu Subject setting when used directly from Gnus, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 8e3045a 174/311: Allow reading debbugs from an offline cache, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs b82c4ec 199/311: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs b051b97 196/311: Simplify debbugs-org.el, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs edb8081 205/311: Minor fixes for debbugs control messages, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs facae1d 217/311: Release debbugs 0.12, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 14ad2e0 210/311: Improve debbugs sorting., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 3ceed8f 212/311: Add the pseudo-package "test" to `debbugs-gnu-default-packages', Stefan Monnier, 2020/11/29