emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] /srv/bzr/emacs/elpa r197: Allow ignoring matches in From/Su


From: Lars Magne Ingebrigtsen
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r197: Allow ignoring matches in From/Subject when narrowing.
Date: Wed, 11 Apr 2012 15:27:04 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 197
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: elpa
timestamp: Wed 2012-04-11 15:27:04 +0200
message:
  Allow ignoring matches in From/Subject when narrowing.
modified:
  packages/debbugs/debbugs-gnu.el
=== modified file 'packages/debbugs/debbugs-gnu.el'
--- a/packages/debbugs/debbugs-gnu.el   2012-04-11 13:20:50 +0000
+++ b/packages/debbugs/debbugs-gnu.el   2012-04-11 13:27:04 +0000
@@ -852,26 +852,29 @@
   (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)
+    (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: ")
+(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))
        (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)))))
+              (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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]