]> code.delx.au - gnu-emacs-elpa/commitdiff
* debbugs-gnu.el (debbugs-gnu-sort-state): Give tagged bugs
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 11 Jul 2011 18:32:17 +0000 (20:32 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 11 Jul 2011 18:32:17 +0000 (20:32 +0200)
priority 20.  In case there is just the severity list '("tagged"),
do not use that priority.
(debbugs-gnu-sort-title): Fix silly bug.

packages/debbugs/ChangeLog
packages/debbugs/debbugs-gnu.el

index b9a3c570aaa386b1c266a296171cfa7eb35fd584..0a22b8ab67c3dc9c3a4c29169a215dfcd0c63653 100644 (file)
@@ -1,3 +1,10 @@
+2011-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * debbugs-gnu.el (debbugs-gnu-sort-state): Give tagged bugs
+       priority 20.  In case there is just the severity list '("tagged"),
+       do not use that priority.
+       (debbugs-gnu-sort-title): Fix silly bug.
+
 2011-07-11  Michael Albinus  <michael.albinus@gmx.de>
 
        * debbugs-gnu.el (top): Require `tabulated-list'.  Autoload
index 6a09320d2d00f8d38d19d58d3ebdf8ef8019d960..dd99d86c2c3ba11356bd37b0379d3db3d90ba04c 100644 (file)
 
 ;; Furthermore, you could apply the global actions
 
-;;   "s": Toggle bug sorting
 ;;   "g": Rescan bugs
-;;   "x": Suppress closed bugs
 ;;   "q": Quit the buffer
+;;   "s": Toggle bug sorting for age or for state
+;;   "x": Toggle suppressing of closed bugs
 
 ;; When you visit the related bug messages in Gnus, you could also
 ;; send control messages by keystroke "C".
 
+;; In the header line of every bug list page, you can toggle sorting
+;; per column by selecting a column with the mouse.  The sorting
+;; happens as expected for the respective column; sorting in the Title
+;; column is depending on whether you are the owner of a bug.
+
 ;;; Code:
 
 (require 'debbugs)
 Used instead of `tabulated-list-print-entry'."
   ;; This shall be in `debbugs-gnu-show-reports'.  But
   ;; `tabulated-list-print' erases the buffer, therefore we do it
-  ;; here.
+  ;; here.  (bug#9047)
   (when (and debbugs-gnu-widgets (= (point) (point-min)))
     (widget-insert "Page:")
     (mapc
@@ -418,6 +423,7 @@ Used instead of `tabulated-list-print-entry'."
       ;; Insert title.
       (indent-to (setq pos (+ pos submitter-length 1)) 1)
       (insert (propertize title 'help-echo title))
+      ;; Add properties.
       (add-text-properties
        beg (point) `(tabulated-list-id ,list-id mouse-face ,widget-mouse-face))
       (insert ?\n))))
@@ -501,22 +507,26 @@ The following commands are available:
        (st1 (aref (nth 1 s1) 1))
        (id2 (cdr (assq 'id (car s2))))
        (st2 (aref (nth 1 s2) 1)))
-    (< (or (and (memq id1 debbugs-gnu-local-tags) 0)
+    (< (or (and (memq id1 debbugs-gnu-local-tags)
+               (not (equal debbugs-gnu-current-severities '("tagged")))
+               20)
           (cdr (assq (get-text-property 0 'face st1)
                      debbugs-gnu-state-preference))
           10)
-       (or (and (memq id2 debbugs-gnu-local-tags) 0)
+       (or (and (memq id2 debbugs-gnu-local-tags)
+               (not (equal debbugs-gnu-current-severities '("tagged")))
+               20)
           (cdr (assq (get-text-property 0 'face st2)
                      debbugs-gnu-state-preference))
           10))))
 
 (defun debbugs-gnu-sort-title (s1 s2)
-  (let ((owner1 (cdr (assq 'owner (car s1))))
-       (owner2 (cdr (assq 'owner (car s2)))))
-    (and (stringp owner1)
-        (string-equal owner1 user-mail-address)
-        (or (not (stringp owner2))
-            (not (string-equal owner1 user-mail-address))))))
+  (let ((owner (if (cdr (assq 'owner (car s1)))
+                  (car (mail-header-parse-address
+                        (decode-coding-string (cdr (assq 'owner (car s1)))
+                                              'utf-8))))))
+    (and (stringp owner)
+        (string-equal owner user-mail-address))))
 
 (defun debbugs-gnu-toggle-sort ()
   "Toggle sorting by age and by state."