+(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)))
+