]> code.delx.au - gnu-emacs/commitdiff
Allow reading Gnus reports from an offline cache
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 29 Feb 2016 06:53:00 +0000 (17:53 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 29 Feb 2016 06:53:00 +0000 (17:53 +1100)
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group):
Allow reading bug reports from an offline cache directory.

lisp/gnus/gnus-group.el

index f42f79895339be6b3d635abd069b401ef011559c..3de2609457299d4c8e43c97145072a182c09328d 100644 (file)
@@ -2448,7 +2448,11 @@ the bug number, and browsing the URL must return mbox output."
       (with-temp-file tmpfile
        (mm-disable-multibyte)
        (dolist (id ids)
-         (url-insert-file-contents (format mbox-url id)))
+         (let ((file (format "~/.emacs.d/debbugs-cache/%s" id)))
+           (if (and (not gnus-plugged)
+                    (file-exists-p file))
+               (insert-file-contents file)
+             (url-insert-file-contents (format mbox-url id)))))
        (goto-char (point-min))
        ;; Add the debbugs address so that we can respond to reports easily.
        (while (re-search-forward "^To: " nil t)