[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] /srv/bzr/emacs/elpa r194: Add commands to narrow/widen the
From: |
Lars Magne Ingebrigtsen |
Subject: |
[ELPA-diffs] /srv/bzr/emacs/elpa r194: Add commands to narrow/widen the bug reports. |
Date: |
Wed, 11 Apr 2012 15:10:11 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 194
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: elpa
timestamp: Wed 2012-04-11 15:10:11 +0200
message:
Add commands to narrow/widen the bug reports.
modified:
packages/debbugs/debbugs-gnu.el
=== modified file 'packages/debbugs/debbugs-gnu.el'
--- a/packages/debbugs/debbugs-gnu.el 2012-03-22 11:09:55 +0000
+++ b/packages/debbugs/debbugs-gnu.el 2012-04-11 13:10:11 +0000
@@ -717,6 +717,8 @@
(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))
@@ -841,6 +843,39 @@
(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)))
+ (tabulated-list-init-header)
+ (tabulated-list-print)
+ (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))
+ 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)))
+ (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 (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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] /srv/bzr/emacs/elpa r194: Add commands to narrow/widen the bug reports.,
Lars Magne Ingebrigtsen <=