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 r196: Make sorting respect the current


From: Lars Magne Ingebrigtsen
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r196: Make sorting respect the current narrowing.
Date: Wed, 11 Apr 2012 15:20:50 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 196
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: elpa
timestamp: Wed 2012-04-11 15:20:50 +0200
message:
  Make sorting respect the current narrowing.
modified:
  packages/debbugs/debbugs-gnu.el
=== modified file 'packages/debbugs/debbugs-gnu.el'
--- a/packages/debbugs/debbugs-gnu.el   2012-04-11 13:13:09 +0000
+++ b/packages/debbugs/debbugs-gnu.el   2012-04-11 13:20:50 +0000
@@ -656,6 +656,9 @@
        (title            (aref cols 3))
        (title-length     (nth 1 (aref tabulated-list-format 3))))
     (when (and
+          ;; We may have a narrowing in effect.
+          (or (not debbugs-gnu-current-limit)
+              (memq (cdr (assq 'id list-id)) debbugs-gnu-current-limit))
           ;; Filter suppressed bugs.
           (or (not (widget-get debbugs-gnu-current-widget :suppress))
               (not (catch :suppress
@@ -749,6 +752,7 @@
     (goto-char pos)))
 
 (defvar debbugs-gnu-sort-state 'number)
+(defvar debbugs-gnu-current-limit nil)
 
 (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"
   "Major mode for listing bug reports.
@@ -759,8 +763,8 @@
 The following commands are available:
 
 \\{debbugs-gnu-mode-map}"
-  (set (make-local-variable 'debbugs-gnu-sort-state)
-       'number)
+  (set (make-local-variable 'debbugs-gnu-sort-state) 'number)
+  (set (make-local-variable 'debbugs-gnu-current-limit) nil)
   (setq tabulated-list-format [("Id"         5 debbugs-gnu-sort-id)
                               ("State"     20 debbugs-gnu-sort-state)
                               ("Submitter" 25 t)
@@ -850,6 +854,7 @@
        (buffer-read-only nil))
     (tabulated-list-init-header)
     (tabulated-list-print)
+    (setq debbugs-gnu-current-limit nil)
     (when id
       (debbugs-gnu-goto id))))
 
@@ -868,6 +873,7 @@
               (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))))


reply via email to

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