Subject: bug#16204: proposed patch for 24.4

From: Ivan Kanis <[email-masked]>
Date: Fri, 25 Jul 2014 11:58:59 +0200

Hi Lars,

This bug has been driving me nuts for a while. I have set shr-width many
times and it would just not work. I have then wasted time trying to find
out why it didn't work.

I would like to spare that time to users of 24.4 when it gets released.

I propose the following patch in the branch emacs-24 on bzr:

=== modified file 'lisp/net/eww.el'
--- lisp/net/eww.el     2014-03-05 18:44:58 +0000
+++ lisp/net/eww.el     2014-07-25 09:32:01 +0000
@@ -264,7 +264,6 @@
     (setq eww-current-dom document)
     (let ((inhibit-read-only t)
          (after-change-functions nil)
-         (shr-width nil)
          (shr-target-id (url-target (url-generic-parse-url url)))
          (shr-external-rendering-functions
           '((title . eww-tag-title)

=== modified file 'lisp/net/shr.el'
--- lisp/net/shr.el     2014-04-14 22:01:54 +0000
+++ lisp/net/shr.el     2014-07-25 09:25:15 +0000
@@ -196,8 +196,7 @@
   (let ((start (point))
        (shr-state nil)
        (shr-start nil)
-       (shr-base nil)
-       (shr-width (or shr-width (1- (window-width)))))
+       (shr-base nil))
     (shr-descend (shr-transform-dom dom))
     (shr-remove-trailing-whitespace start (point))))

I have tested with shr-width equal to nil and 70 and it does the
right thing ie. the former wraps at the window width and the latter at
column 70.

I can commit it if everyone is OK with this.

Ivan

-- 
The monitor needs another box of pixels.
    -- BOFH excuse #60