emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 7b29db2: Enable gnus-read-ephemeral-* to run mult


From: Katsumi Yamaoka
Subject: [Emacs-diffs] emacs-26 7b29db2: Enable gnus-read-ephemeral-* to run multiple times (bug#29008)
Date: Thu, 26 Oct 2017 21:13:50 -0400 (EDT)

branch: emacs-26
commit 7b29db222f744d97c480ba9573cdc6900a727db6
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    Enable gnus-read-ephemeral-* to run multiple times (bug#29008)
    
    NOTE: *DO NOT* merge this change to the trunk.
    
    * lisp/gnus/gnus-group.el (gnus-read-ephemeral-gmane-group)
    (gnus-read-ephemeral-bug-group): Make it work for any number of times
    for the case `url-automatic-caching' is set (bug#29008).
---
 lisp/gnus/gnus-group.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 4a41c49..56d42b4 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2373,7 +2373,10 @@ specified by `gnus-gmane-group-download-format'."
     (with-temp-file tmpfile
       (url-insert-file-contents
        (format gnus-gmane-group-download-format
-              group start (+ start range)))
+              group start (+ start range))
+       t)
+      ;; `url-insert-file-contents' sets this because of the 2nd arg.
+      (setq buffer-file-name nil)
       (write-region (point-min) (point-max) tmpfile)
       (gnus-group-read-ephemeral-group
        (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range)
@@ -2463,7 +2466,7 @@ the bug number, and browsing the URL must return mbox 
output."
            (if (and (not gnus-plugged)
                     (file-exists-p file))
                (insert-file-contents file)
-             (url-insert-file-contents (format mbox-url id)))))
+             (url-insert-file-contents (format mbox-url id) t))))
        ;; Add the debbugs address so that we can respond to reports easily.
        (let ((address
               (format "address@hidden" (car ids)
@@ -2488,7 +2491,9 @@ the bug number, and browsing the URL must return mbox 
output."
                    (insert ", " address))
                (insert "To: " address "\n")))
            (goto-char (point-max))
-           (widen)))))
+           (widen)))
+       ;; `url-insert-file-contents' sets this because of the 2nd arg.
+       (setq buffer-file-name nil)))
     (gnus-group-read-ephemeral-group
      (format "nndoc+ephemeral:bug#%s"
             (mapconcat 'number-to-string ids ","))



reply via email to

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