[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 a864bfb: Fix content decoding in gnus-read-epheme
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] emacs-24 a864bfb: Fix content decoding in gnus-read-ephemeral-bug-group |
Date: |
Fri, 19 Dec 2014 11:18:44 +0000 |
branch: emacs-24
commit a864bfb57c8445156dbe7e30b0348d9896c27b28
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>
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.
---
lisp/gnus/ChangeLog | 6 ++++++
lisp/gnus/gnus-group.el | 42 +++++++++++++++++++++---------------------
2 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 3b2a702..f69d350 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-19 Andreas Schwab <address@hidden>
+
+ * 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-11-26 John Mastro <address@hidden> (tiny change)
* auth-source.el (auth-source-macos-keychain-search-items): Return
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index d8260b4..a7e3d30 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2459,27 +2459,27 @@ 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)
- (coding-system-for-read 'binary))
- (with-temp-file tmpfile
- (dolist (id ids)
- (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)
- (end-of-line)
- (insert (format ", address@hidden" (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))
+ (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))
+ ;; Add the debbugs address so that we can respond to reports easily.
+ (while (re-search-forward "^To: " nil t)
+ (end-of-line)
+ (insert (format ", address@hidden" (car ids)
+ (gnus-replace-in-string
+ (gnus-replace-in-string mbox-url "^http://" "")
+ "/.*$" ""))))))
+ (gnus-group-read-ephemeral-group
+ (format "nndoc+ephemeral:bug#%s"
+ (mapconcat 'number-to-string ids ","))
+ `(nndoc ,tmpfile
+ (nndoc-article-type mbox))
+ nil window-conf)
(delete-file tmpfile)))
(defun gnus-read-ephemeral-debian-bug-group (number)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 a864bfb: Fix content decoding in gnus-read-ephemeral-bug-group,
Andreas Schwab <=