X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/a7638d9a7101316716e341def6956cbb6a750dfd..15bc5b861d01a1bb9e9f8f5e2040e5275438cd9d:/packages/debbugs/debbugs-gnu.el diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el index ed603c8d7..363f4e9c0 100644 --- a/packages/debbugs/debbugs-gnu.el +++ b/packages/debbugs/debbugs-gnu.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; This package provides an interface to bug reports which are located -;; on the GNU bug tracker debbugs.gnu.org. It's main purpose is to +;; on the GNU bug tracker debbugs.gnu.org. Its main purpose is to ;; show and manipulate bug reports from Emacs, but it could be used ;; also for other GNU projects which use the same bug tracker. @@ -120,7 +120,7 @@ :group 'debbugs :version "24.1") -(defcustom debbugs-gnu-default-severities '("normal") +(defcustom debbugs-gnu-default-severities '("serious" "important" "normal") "*The list severities bugs are searched for. \"tagged\" is not a severity but marks locally tagged bugs." :group 'debbugs-gnu @@ -137,9 +137,13 @@ :group 'debbugs-gnu :type '(set (const "automake") (const "coreutils") + (const "debbugs.gnu.org") (const "emacs") + (const "emacs-xwidgets") (const "gnus") - (const "libtool")) + (const "guile") + (const "libtool") + (const "woodchuck")) :version "24.1") (defcustom debbugs-gnu-default-hits-per-page 500 @@ -590,7 +594,7 @@ marked as \"client-side filter\"." 'debbugs-gnu-new) ((< (- (float-time) (cdr (assq 'log_modified status))) - (* 60 60 24 7)) + (* 60 60 24 7 2)) 'debbugs-gnu-handled) (t 'debbugs-gnu-stale))) @@ -652,6 +656,9 @@ Used instead of `tabulated-list-print-entry'." (title (aref cols 3)) (title-length (nth 1 (aref tabulated-list-format 3)))) (when (and + ;; We may have a narrowing in effect. + (or (not debbugs-gnu-current-limit) + (memq (cdr (assq 'id list-id)) debbugs-gnu-current-limit)) ;; Filter suppressed bugs. (or (not (widget-get debbugs-gnu-current-widget :suppress)) (not (catch :suppress @@ -713,6 +720,8 @@ Used instead of `tabulated-list-print-entry'." (define-key map "d" 'debbugs-gnu-display-status) (define-key map "g" 'debbugs-gnu-rescan) (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 "C" 'debbugs-gnu-send-control-message) map)) @@ -743,6 +752,7 @@ Used instead of `tabulated-list-print-entry'." (goto-char pos))) (defvar debbugs-gnu-sort-state 'number) +(defvar debbugs-gnu-current-limit nil) (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs" "Major mode for listing bug reports. @@ -753,8 +763,8 @@ All normal editing commands are switched off. The following commands are available: \\{debbugs-gnu-mode-map}" - (set (make-local-variable 'debbugs-gnu-sort-state) - 'number) + (set (make-local-variable 'debbugs-gnu-sort-state) 'number) + (set (make-local-variable 'debbugs-gnu-current-limit) nil) (setq tabulated-list-format [("Id" 5 debbugs-gnu-sort-id) ("State" 20 debbugs-gnu-sort-state) ("Submitter" 25 t) @@ -837,6 +847,44 @@ The following commands are available: (tabulated-list-init-header) (tabulated-list-print)) +(defun debbugs-gnu-widen () + "Display all the currently selected bug reports." + (interactive) + (let ((id (debbugs-gnu-current-id t)) + (buffer-read-only nil)) + (tabulated-list-init-header) + (tabulated-list-print) + (setq debbugs-gnu-current-limit nil) + (when id + (debbugs-gnu-goto id)))) + +(defun debbugs-gnu-narrow-to-status (string) + "Only display the bugs matching STRING." + (interactive "sNarrow to: ") + (let ((id (debbugs-gnu-current-id t)) + (buffer-read-only nil) + status) + (debbugs-gnu-widen) + (goto-char (point-min)) + (while (not (eobp)) + (setq status (debbugs-gnu-current-status)) + (if (and (not (member string (assq 'keywords status))) + (not (member string (assq 'severity status))) + (not (string-match string (cdr (assq 'originator status)))) + (not (string-match string (cdr (assq 'subject status))))) + (delete-region (point) (progn (forward-line 1) (point))) + (push (cdr (assq 'id status)) debbugs-gnu-current-limit) + (forward-line 1))) + (when id + (debbugs-gnu-goto id)))) + +(defun debbugs-gnu-goto (id) + "Go to the line displaying bug ID." + (goto-char (point-min)) + (while (and (not (eobp)) + (not (equal (debbugs-gnu-current-id t) id))) + (forward-line 1))) + (defun debbugs-gnu-toggle-tag () "Toggle tag of the report in the current line." (interactive)