From 5f9d7c7c5c41efea91b24c78e35f9e661ac7d7dd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 13 Sep 2014 12:25:38 +0300 Subject: [PATCH] Fix HTML rendering by shr-insert-document in Rmail. lisp/mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part using the specified transfer-encoding, if any, or 'undecided'. (rmail-mime-render-html-shr): Bind shr-width to nil, so lines are broken at the window margin. Fixes: debbugs:4258 --- lisp/ChangeLog | 2 ++ lisp/mail/rmailmm.el | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e79f8563b49..a05b7b59a27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part using the specified transfer-encoding, if any, or 'undecided'. + (rmail-mime-render-html-shr): Bind shr-width to nil, so lines are + broken at the window margin. 2013-12-27 Ken Olum diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index becfb2f8cab..b5b594f59f2 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -694,7 +694,12 @@ HEADER is a header component of a MIME-entity object (see ;; Image retrieval happens asynchronously, but meanwhile ;; `rmail-swap-buffers' may have been run, leaving ;; `shr-image-fetched' trying to insert the image in the wrong buffer. - (shr-inhibit-images t)) + (shr-inhibit-images t) + ;; Bind shr-width to nil to force shr-insert-document break + ;; the lines at the window margin. The default is + ;; fill-column, whose default value is too small, and screws + ;; up display of the quoted messages. + shr-width) (shr-insert-document dom))) (defun rmail-mime-render-html-lynx (source-buffer) -- 2.39.5