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

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

[elpa] externals/debbugs 5495087 089/311: Allow ignoring matches in From


From: Stefan Monnier
Subject: [elpa] externals/debbugs 5495087 089/311: Allow ignoring matches in From/Subject when narrowing.
Date: Sun, 29 Nov 2020 18:41:47 -0500 (EST)

branch: externals/debbugs
commit 54950877b70aab76c9ddce5087e03bb913e0e611
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Commit: Lars Magne Ingebrigtsen <larsi@gnus.org>

    Allow ignoring matches in From/Subject when narrowing.
---
 debbugs-gnu.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 363f4e9..1621a34 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -852,26 +852,29 @@ The following commands are available:
   (interactive)
   (let ((id (debbugs-gnu-current-id t))
        (buffer-read-only nil))
+    (setq debbugs-gnu-current-limit 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: ")
+(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]