+(defun debbugs-gnu-widen ()
+ "Display all the currently selected bug reports."
+ (interactive)
+ (let ((id (debbugs-gnu-current-id t))
+ (inhibit-read-only t))
+ (setq debbugs-gnu-current-limit nil)
+ (tabulated-list-init-header)
+ (tabulated-list-print)
+ (when id
+ (debbugs-gnu-goto id))))
+
+(defun debbugs-gnu-narrow-to-status (string &optional status-only)
+ "Only display the bugs matching STRING.
+If STATUS-ONLY (the prefix), ignore matches in the From and
+Subject fields."
+ (interactive "sNarrow to: \np")
+ (let ((id (debbugs-gnu-current-id t))
+ (inhibit-read-only t)
+ status)
+ (setq debbugs-gnu-current-limit nil)
+ (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)))
+ (or status-only
+ (not (string-match string (cdr (assq 'originator status)))))
+ (or status-only
+ (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)))
+