[gnus git] branch master updated: m0-11-106-g3a1304b =1= Fix content decoding in gnus-read-ephemeral-bug-group

Katsumi <[email protected]> Thu, 08 Jan 2015 04:29:19 +0100
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  3a1304b7891f4aa5300d1a2c8d15a44d07d1c90a (commit)
      from  b83561e18ceb438203812786590893bd5fc2a6cc (commit)


- Log -----------------------------------------------------------------
commit 3a1304b7891f4aa5300d1a2c8d15a44d07d1c90a
Author: Andreas Schwab <[email protected]>
Date:   Thu Jan 8 03:28:47 2015 +0000

    Fix content decoding in gnus-read-ephemeral-bug-group
    
    * gnus-group.el (gnus-read-ephemeral-bug-group): Bind
    coding-system-for-read and coding-system-for-write only around
    with-temp-file, and make buffer unibyte.  Don't write temp file twice.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fdce2b8..7e6f112 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -19,6 +19,12 @@
 	* registry.el (cl-remf, cl-loop, cl-subseq):
 	Alias to remf, loop, and subseq respectively for old Emacsen.
 
+2014-12-19  Andreas Schwab  <[email protected]>
+
+	* gnus-group.el (gnus-read-ephemeral-bug-group): Bind
+	coding-system-for-read and coding-system-for-write only around
+	with-temp-file, and make buffer unibyte.  Don't write temp file twice.
+
 2014-12-18  Paul Eggert  <[email protected]>
 
 	* registry.el (registry-db): Set default slot later.
diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el
index 29c380f..8dd1d78 100644
--- a/lisp/gnus-group.el
+++ b/lisp/gnus-group.el
@@ -2455,10 +2455,11 @@ the bug number, and browsing the URL must return mbox output."
     (setq ids (string-to-number ids)))
   (unless (listp ids)
     (setq ids (list ids)))
-  (let ((tmpfile (mm-make-temp-file "gnus-temp-group-"))
-	(coding-system-for-write 'binary)
+  (let ((tmpfile (mm-make-temp-file "gnus-temp-group-")))
+    (let ((coding-system-for-write 'binary)
 	  (coding-system-for-read 'binary))
       (with-temp-file tmpfile
+	(set-buffer-multibyte nil)
 	(dolist (id ids)
 	  (url-insert-file-contents (format mbox-url id)))
 	(goto-char (point-min))
@@ -2468,14 +2469,13 @@ the bug number, and browsing the URL must return mbox output."
 	  (insert (format ", %s@%s" (car ids)
 			  (gnus-replace-in-string
 			   (gnus-replace-in-string mbox-url "^http://" "")
-			 "/.*$" ""))))
-      (write-region (point-min) (point-max) tmpfile)
+			   "/.*$" ""))))))
     (gnus-group-read-ephemeral-group
      (format "nndoc+ephemeral:bug#%s"
 	     (mapconcat 'number-to-string ids ","))
      `(nndoc ,tmpfile
 	     (nndoc-article-type mbox))
-       nil window-conf))
+     nil window-conf)
     (delete-file tmpfile)))
 
 (defun gnus-read-ephemeral-debian-bug-group (number)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    6 ++++++
 lisp/gnus-group.el |   42 +++++++++++++++++++++---------------------
 2 files changed, 27 insertions(+), 21 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project