]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/debbugs/debbugs-gnu.el
Activate `soap-invoke-async' in debbugs
[gnu-emacs-elpa] / packages / debbugs / debbugs-gnu.el
index eba1f758165f34b0f94d57188132e32ec9db8752..c57867a3d352da1c9130476dd491409daa0f90f9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; debbugs-gnu.el --- interface for the GNU bug tracker
 
-;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;         Michael Albinus <michael.albinus@gmx.org>
   "*The list severities bugs are searched for.
 \"tagged\" is not a severity but marks locally tagged bugs."
   ;; <http://debbugs.gnu.org/Developer.html#severities>
+  ;; /ssh:debbugs:/etc/debbugs/config @gSeverityList
+  ;; We don't use "critical" and "grave".
   :group 'debbugs-gnu
   :type '(set (const "serious")
              (const "important")
   (mapcar 'cadr (cdr (get 'debbugs-gnu-default-packages 'custom-type)))
   "*List of all possible package names.")
 
-;; Please do not increase this value, otherwise we would run into
-;; performance problems on the server.
-(defconst debbugs-gnu-default-hits-per-page 500
-  "The number of bugs shown per page.")
-
 (defcustom debbugs-gnu-default-suppress-bugs
   '((pending . "done"))
   "*A list of specs for bugs to be suppressed.
@@ -574,8 +571,7 @@ marked as \"client-side filter\"."
   "Show bug reports."
   (let ((inhibit-read-only t)
        (debbugs-port "gnu.org")
-       (buffer-name "*Emacs Bugs*")
-       all-status)
+       (buffer-name "*Emacs Bugs*"))
     ;; The tabulated mode sets several local variables.  We must get
     ;; rid of them.
     (when (get-buffer buffer-name)
@@ -583,20 +579,10 @@ marked as \"client-side filter\"."
     (switch-to-buffer (get-buffer-create buffer-name))
     (debbugs-gnu-mode)
 
-    ;; Retrieve all bugs in chunks of `debbugs-gnu-default-hits-per-page'.
-    (let ((bug-ids (debbugs-gnu-get-bugs debbugs-gnu-current-query))
-         (hits debbugs-gnu-default-hits-per-page)
-         curr-ids)
-      (while bug-ids
-       (setq curr-ids (butlast bug-ids (- (length bug-ids) hits))
-             bug-ids (last bug-ids (- (length bug-ids) hits))
-             all-status
-             (append all-status (apply 'debbugs-get-status curr-ids)))))
-
     ;; Print bug reports.
-    ;; TODO: Do it asynchronously, in parallel to retrieving next chunk
-    ;; of bug statuses.
-    (dolist (status all-status)
+    (dolist (status
+            (apply 'debbugs-get-status
+                   (debbugs-gnu-get-bugs debbugs-gnu-current-query)))
       (let* ((id (cdr (assq 'id status)))
             (words
              (mapconcat
@@ -615,8 +601,7 @@ marked as \"client-side filter\"."
                                            'utf-8))
             merged)
        (unless (equal (cdr (assq 'pending status)) "pending")
-         (setq words
-               (concat words "," (cdr (assq 'pending status)))))
+         (setq words (concat words "," (cdr (assq 'pending status)))))
        (let ((packages (delete "emacs" (cdr (assq 'package status)))))
          (when packages
            (setq words (concat words "," (mapconcat 'identity packages ",")))))
@@ -686,6 +671,7 @@ marked as \"client-side filter\"."
                  'debbugs-gnu-tagged
                'default))))
           'append))))
+
     (tabulated-list-init-header)
     (tabulated-list-print)
 
@@ -783,7 +769,6 @@ Used instead of `tabulated-list-print-entry'."
 (defun debbugs-gnu-rescan ()
   "Rescan the current set of bug reports."
   (interactive)
-
   ;; Refresh the buffer.  `save-excursion' does not work, so we
   ;; remember the position.
   (let ((pos (point)))
@@ -1568,4 +1553,7 @@ If given a prefix, patch in the branch directory instead."
 
 ;;; TODO:
 
+;; * Another random thought - is it possible to implement some local
+;;   cache, so only changed bugs are fetched?  Glenn Morris.
+
 ;;; debbugs-gnu.el ends here