branch: externals/debbugs
commit a0244316f9473fe689acd89be87d3a6b81857a7d
Author: Lars Magne Ingebrigtsen <[email protected]>
Commit: Lars Magne Ingebrigtsen <[email protected]>

    * debbugs-gnu.el (debbugs-toggle-sort): Sort the tagged bugs at
    the end.
---
 ChangeLog      |  5 +++++
 debbugs-gnu.el | 14 +++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d9da724..e28b61c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-06  Lars Magne Ingebrigtsen  <[email protected]>
+
+       * debbugs-gnu.el (debbugs-toggle-sort): Sort the tagged bugs at
+       the end.
+
 2011-07-05  Michael Albinus  <[email protected]>
 
        * debbugs-gnu.el (debbugs-owner): Removed.  We use `debbugs-tagged'
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 2f3c588..407b05d 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -382,11 +382,15 @@ The following commands are available:
       (sort-subr
        nil (lambda () (forward-line 1)) 'end-of-line
        (lambda ()
-        (if (eq debbugs-sort-state 'number)
-            (debbugs-current-id)
-          (or (cdr (assq (get-text-property (+ (point) 7) 'face)
-                         debbugs-state-preference))
-              10)))))
+        (let ((id (debbugs-current-id)))
+          (if (eq debbugs-sort-state 'number)
+              id
+            ;; Sort the tagged ones at the end.
+            (or (and (memq id debbugs-local-tags)
+                     20)
+                (cdr (assq (get-text-property (+ (point) 7) 'face)
+                           debbugs-state-preference))
+                10))))))
     (if (not current-bug)
        (goto-char start-point)
       (goto-char (point-min))

Reply via email to