[gnus git] branch master updated: m0-5-89-g9836686 =1= gnus-sum.el (gnus-summary-enter-digest-group): Work for encoding and charset
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 9836686c6599eaa964c87e0d197b96e6ea558e4e (commit)
from 3c239834d1c8ae405445a30c01204c02d67ba89c (commit)
- Log -----------------------------------------------------------------
commit 9836686c6599eaa964c87e0d197b96e6ea558e4e
Author: Katsumi Yamaoka <[email protected]>
Date: Tue Aug 28 09:40:07 2012 +0000
gnus-sum.el (gnus-summary-enter-digest-group): Work for encoding and charset
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6efbb50..f91ec67 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-28 Katsumi Yamaoka <[email protected]>
+
+ * gnus-sum.el (gnus-summary-enter-digest-group): Decode content
+ transfer encoding first; bind gnus-newsgroup-charset to the charset
+ that the article specifies (Bug#12209).
+
2012-08-22 Katsumi Yamaoka <[email protected]>
* gnus-cus.el (gnus-group-customize): Decode values posting-style holds.
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index 8d17d1f..efbcb4d 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -9145,7 +9145,7 @@ To control what happens when you exit the group, see the
(list (cons 'save-article-group ogroup))))
(case-fold-search t)
(buf (current-buffer))
- dig to-address)
+ dig to-address charset)
(with-current-buffer gnus-original-article-buffer
;; Have the digest group inherit the main mail address of
;; the parent article.
@@ -9158,16 +9158,32 @@ To control what happens when you exit the group, see the
to-address))))))
(setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
(insert-buffer-substring gnus-original-article-buffer)
- ;; Remove lines that may lead nndoc to misinterpret the
- ;; document type.
(narrow-to-region
(goto-char (point-min))
(or (search-forward "\n\n" nil t) (point)))
+ ;; Remove lines that may lead nndoc to misinterpret the
+ ;; document type.
(goto-char (point-min))
(delete-matching-lines "^Path:\\|^From ")
+ ;; Parse charset, and decode content transfer encoding.
+ (setq charset (mail-content-type-get
+ (mail-header-parse-content-type
+ (or (gnus-fetch-field "content-type") ""))
+ 'charset))
+ (let ((encoding (gnus-fetch-field "content-transfer-encoding")))
+ (when encoding
+ (message-remove-header "content-transfer-encoding")
+ (goto-char (point-max))
+ (widen)
+ (narrow-to-region (point) (point-max))
+ (mm-decode-content-transfer-encoding
+ (intern (downcase (mail-header-strip encoding))))))
(widen))
(unwind-protect
- (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
+ (if (let ((gnus-newsgroup-ephemeral-charset
+ (if charset
+ (intern (downcase (gnus-strip-whitespace charset)))
+ gnus-newsgroup-charset))
(gnus-newsgroup-ephemeral-ignored-charsets
gnus-newsgroup-ignored-charsets))
(gnus-group-read-ephemeral-group
-----------------------------------------------------------------------
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-sum.el | 24 ++++++++++++++++++++----
2 files changed, 26 insertions(+), 4 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