GNU bug report logs -
#16204
eww does not respect shr-width customization
Previous Next
Reported by: Ivan Shmakov <ivan <at> siamics.net>
Date: Fri, 20 Dec 2013 17:02:02 UTC
Severity: wishlist
Tags: fixed
Fixed in version 25.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Thank you for your review. But I have some comments. I'm sorry if I
misunderstood.
> I’d also ask for a separate “do not override” value. That is:
>
> (shr-width (if (DO-NOT-SET-P eww-rendering-width)
> shr-width
> eww-rendering-width))
I'm not sure how to work well with this logic.
I think shr-width should be overridden by nil or new rendering-width
every time, since previous windows-width will be set to shr-width next rendering.
When users change their window-width, the shr-width should be current
window-width, not previous width.
> > +(defvar eww-rendering-width nil)
>
> Shouldn’t it rather be defcustom?
For the above reason, I think defvar is ok.
> Shouldn’t this rather be ‘error’?
Yes, it is my mistake. Sorry.
Kenjiro Nakayama
ivan <at> siamics.net writes:
>>>>>> Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>>>>>> ivan <at> siamics.net writes:
>
> >> Package: emacs Severity: wishlist
>
> >> As currently implemented, eww-display-html simply resets shr-width
> >> to nil, disrespecting any user’s customization thereof, and
> >> providing no easy way to specify the HTML rendering width to use in
> >> EWW buffers.
>
> > Yes, I think so too. I wrote the patch to cusomize rendering-width
> > (shr-width) easily by users.
>
> ACK, thanks!
>
> […]
>
> > --- a/lisp/net/eww.el
> > +++ b/lisp/net/eww.el
> > @@ -129,6 +129,7 @@ See also `eww-form-checkbox-selected-symbol'."
> > (defvar eww-home-url nil)
> > (defvar eww-start-url nil)
> > (defvar eww-contents-url nil)
> > +(defvar eww-rendering-width nil)
>
> Shouldn’t it rather be defcustom?
>
> > (defvar eww-local-regex "localhost"
> > "When this regex is found in the URL, it's not a keyword but an address.")
> > @@ -255,7 +256,7 @@ word(s) will be searched for via `eww-search-prefix'."
> > (setq eww-current-dom document)
> > (let ((inhibit-read-only t)
> > (after-change-functions nil)
> > - (shr-width nil)
> > + (shr-width eww-rendering-width)
>
> I’d also ask for a separate “do not override” value. That is:
>
> (shr-width (if (DO-NOT-SET-P eww-rendering-width)
> shr-width
> eww-rendering-width))
>
> (And, similarly, defcustom’s :type above being a ‘choice’.)
>
> > (shr-target-id (url-target (url-generic-parse-url url)))
> > (shr-external-rendering-functions
> > '((title . eww-tag-title)
>
> […]
>
> > @@ -543,6 +546,15 @@ appears in a <link> or <a> tag."
> > (url-retrieve eww-current-url 'eww-render
> > (list eww-current-url (point))))
>
> > +(defun eww-set-rendering-width (width)
> > + "Set the redering width."
> > + (interactive "nSet new redering width (0: window-width) :")
> > + (if (zerop width)
> > + (setq eww-rendering-width nil)
> > + (if (wholenump width)
> > + (setq eww-rendering-width width)
> > + (message "Set Number to rendering width"))))
>
> Shouldn’t this rather be ‘error’?
>
> > +
> > ;; Form support.
>
> > (defvar eww-form nil)
This bug report was last modified 10 years and 217 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.