GNU bug report logs - #34920
27.0.50; Poor eww rendering of SourceHut file "trees"

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Tue, 19 Mar 2019 20:13:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34920 in the body.
You can then email your comments to 34920 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Tue, 19 Mar 2019 20:13:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
New bug report received and forwarded. Copy sent to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org. (Tue, 19 Mar 2019 20:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Tue, 19 Mar 2019 16:00:53 -0400
Package: Emacs
Version: 27.0.50


When I ask `M-x eww RET https://git.sr.ht/~sircmpwn/core.sr.ht/tree RET`
I get a result where the files are listed as:

    d--------- 
    .builds/ 
    -rw-r--r-- 
    .gitignore 
    96 bytes 
    -rw-r--r-- 
    .gitmodules 
    107 bytes 
    -rw-r--r-- 
    LICENSE 
    1.4 KiB 
    -rw-r--r-- 
    README.md 
    184 bytes 
    -rwxr-xr-x 
    setup.py 
    1.4 KiB 
    d--------- 
    srht/ 
    -rwxr-xr-x 
    srht-migrate 
    113 bytes 
    -rwxr-xr-x 
    srht-update-profiles 
    708 bytes 

whereas I'd expect something more like:

    d--------- .builds/
    -rw-r--r-- .gitignore               96 bytes
    -rw-r--r-- .gitmodules             107 bytes
    -rw-r--r-- LICENSE                 1.4 KiB
    -rw-r--r-- README.md               184 bytes
    -rwxr-xr-x setup.py                1.4 KiB
    d--------- srht/
    -rwxr-xr-x srht-migrate            113 bytes
    -rwxr-xr-x srht-update-profiles    708 bytes


-- Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Tue, 19 Mar 2019 20:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Tue, 19 Mar 2019 21:22:36 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> When I ask `M-x eww RET https://git.sr.ht/~sircmpwn/core.sr.ht/tree RET`
> I get a result where the files are listed as:
>
>     d--------- 
>     .builds/ 

shr supports a very minimal subset of CSS, and that page is just a soup
of divs (which has block display syntax by default):

      <div class="mode">
        <span title="40000">
          
          d---------
          
        </span>
      </div>
      <div class="name tree">
        
        <a href="/~sircmpwn/core.sr.ht/tree/master/.builds"
        >
          .builds/
        </a>
        
      </div>
      <div class="commit">
        
      </div>

In addition, eww doesn't support external CSS at all, so what you're
seeing is what I'd expect.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Tue, 19 Mar 2019 21:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Tue, 19 Mar 2019 17:49:33 -0400
>> When I ask `M-x eww RET https://git.sr.ht/~sircmpwn/core.sr.ht/tree RET`
>> I get a result where the files are listed as:
>>
>>     d---------
>>     .builds/
>
> shr supports a very minimal subset of CSS, and that page is just a soup
> of divs (which has block display syntax by default):
>
>       <div class="mode">
>         <span title="40000">
>           
>           d---------
>           
>         </span>
>       </div>
>       <div class="name tree">
>         
>         <a href="/~sircmpwn/core.sr.ht/tree/master/.builds"
>         >
>           .builds/
>         </a>
>         
>       </div>
>       <div class="commit">
>         
>       </div>

I saw that, but I'm not familiar enough with HTML to know if it could be
simplified without impacting its use in various other circumstances (in
which case we could lobby SourceHut's author).

> In addition, eww doesn't support external CSS at all, so what you're
> seeing is what I'd expect.

Any hope to see some incremental improvement that would get us closer to
rendering these kinds of pages better?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Tue, 19 Mar 2019 21:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Tue, 19 Mar 2019 22:54:10 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I saw that, but I'm not familiar enough with HTML to know if it could be
> simplified without impacting its use in various other circumstances (in
> which case we could lobby SourceHut's author).

It's somewhat eccentric to use <div>s here instead of <span>s here,
since <span> are "inline" while <div> are "blocks" (which is why shr
breaks the line), but it's totally normal to not care: The CSS on the
web site will just override with whatever display: foo the web site
designer wants.

>> In addition, eww doesn't support external CSS at all, so what you're
>> seeing is what I'd expect.
>
> Any hope to see some incremental improvement that would get us closer to
> rendering these kinds of pages better?

Deciding to change shr to load external resources (for CSS etc) would be
a big step..

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 01:02:01 GMT) Full text and rfc822 format available.

Message #17 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Wed, 20 Mar 2019 21:01:05 -0400
>> I saw that, but I'm not familiar enough with HTML to know if it could be
>> simplified without impacting its use in various other circumstances (in
>> which case we could lobby SourceHut's author).
>
> It's somewhat eccentric to use <div>s here instead of <span>s here,
> since <span> are "inline" while <div> are "blocks" (which is why shr
> breaks the line), but it's totally normal to not care: The CSS on the
> web site will just override with whatever display: foo the web site
> designer wants.

Hmm... so we could ask the author to use `span` instead of `div` here
and we'd get a better rendering.  I'll see what he says.

>>> In addition, eww doesn't support external CSS at all, so what you're
>>> seeing is what I'd expect.
>> Any hope to see some incremental improvement that would get us closer to
>> rendering these kinds of pages better?
> Deciding to change shr to load external resources (for CSS etc) would be
> a big step..

It already loads external resources for images, tho, so I don't see why
it would be such a big change.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 08:20:01 GMT) Full text and rfc822 format available.

Message #20 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 09:19:25 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Hmm... so we could ask the author to use `span` instead of `div` here
> and we'd get a better rendering.  I'll see what he says.

Better, but not good.  He's really just creating a table without using
<table>, I think...

> It already loads external resources for images, tho, so I don't see why
> it would be such a big change.

The CSS would have to be loaded before rendering.  Images are loaded
after the HTML has been rendered and don't really affect layout.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 12:15:02 GMT) Full text and rfc822 format available.

Message #23 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 08:14:37 -0400
> The CSS would have to be loaded before rendering.  Images are loaded
> after the HTML has been rendered and don't really affect layout.

Well, clearly it's not exactly the same, indeed, but I thought you were
referring to the underlying privacy problem of fetching
a remote resource.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 12:45:01 GMT) Full text and rfc822 format available.

Message #26 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 13:44:50 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Well, clearly it's not exactly the same, indeed, but I thought you were
> referring to the underlying privacy problem of fetching
> a remote resource.

No, there's no additional privacy problem.

shr will never support more than an itsy-bitsy CSS subset (due to both
speed and layout considerations), so fetching CSS externally would be a
disservice to the users.

And asking web designers to change their pages so that they'll look
better in non-CSS browser isn't really scaleable.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 13:21:01 GMT) Full text and rfc822 format available.

Message #29 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 09:20:02 -0400
> shr will never support more than an itsy-bitsy CSS subset (due to both
> speed and layout considerations),

[ Never say never, but, yes, that sounds about right.  ]

> so fetching CSS externally would be a disservice to the users.

Not sure I understand why you think so: is it because of (1) the time wasted
fetching it or (2) the slowdown imposed by parsing it or (3) the slowdown
imposed on the rendering when the CSS is large or (4) ...?

My impression is that just (1) would rarely be a performance
problem (assuming it's just one CSS file) and that the parsing could
ditch all the irrelevant properties we don't support anyway so the
impact of (3) should be minor.  So is it (2)?

> And asking web designers to change their pages so that they'll look
> better in non-CSS browser isn't really scaleable.  :-)

So what the solution?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 13:50:02 GMT) Full text and rfc822 format available.

Message #32 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 14:48:53 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Not sure I understand why you think so: is it because of (1) the time wasted
> fetching it or (2) the slowdown imposed by parsing it or (3) the slowdown
> imposed on the rendering when the CSS is large or (4) ...?
>
> My impression is that just (1) would rarely be a performance
> problem (assuming it's just one CSS file)

It's seldom just one CSS file, and CSS files these days are often big
auto-generated monstrosities...

> and that the parsing could ditch all the irrelevant properties we
> don't support anyway so the impact of (3) should be minor.  So is it
> (2)?

(3) is minor, while (2) could be an issue.

But my point is that since we support very little CSS, spending time
fetching something that in 99% of the cases will make no difference to
our rendering is a disservice to the users.  eww is slow enough as it
is.

>> And asking web designers to change their pages so that they'll look
>> better in non-CSS browser isn't really scaleable.  :-)
>
> So what the solution?

Accept that most complex web pages will look like crap in shr and use it
for what it's suited for.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Thu, 21 Mar 2019 17:10:01 GMT) Full text and rfc822 format available.

Message #35 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 17:09:31 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>> Not sure I understand why you think so: is it because of (1) the time wasted
>> fetching it or (2) the slowdown imposed by parsing it or (3) the slowdown
>> imposed on the rendering when the CSS is large or (4) ...?
>>
>> My impression is that just (1) would rarely be a performance
>> problem (assuming it's just one CSS file)
>
> It's seldom just one CSS file, and CSS files these days are often big
> auto-generated monstrosities...
>
>> and that the parsing could ditch all the irrelevant properties we
>> don't support anyway so the impact of (3) should be minor.  So is it
>> (2)?
>
> (3) is minor, while (2) could be an issue.
>
> But my point is that since we support very little CSS, spending time
> fetching something that in 99% of the cases will make no difference to
> our rendering is a disservice to the users.  eww is slow enough as it
> is.

Would an opt-in user option not suit, assuming an initial PoC succeeds?

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Fri, 22 Mar 2019 00:40:02 GMT) Full text and rfc822 format available.

Message #38 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Thu, 21 Mar 2019 20:39:32 -0400
> Would an opt-in user option not suit, assuming an initial PoC succeeds?

I was thinking a command that you can run to re-render with the remote
CSS, but that's basically the same idea.

If it gives useful results, we could go crazy and introduce some config
var indicating which remote CSS are worth downloading and which aren't.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Sat, 23 Mar 2019 15:26:02 GMT) Full text and rfc822 format available.

Message #41 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Sat, 23 Mar 2019 16:24:54 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Would an opt-in user option not suit, assuming an initial PoC succeeds?
>
> I was thinking a command that you can run to re-render with the remote
> CSS, but that's basically the same idea.
>
> If it gives useful results, we could go crazy and introduce some config
> var indicating which remote CSS are worth downloading and which aren't.

That's a possibility, but like I said, shr supports such a minimal
subset of CSS that you're not going to see much, if any, difference.

And there's no way to determine what CSS files are going to contain the
stuff we support, so you'd have to fetch and parse them all.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Tue, 09 Apr 2019 23:55:01 GMT) Full text and rfc822 format available.

Message #44 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Tue, 09 Apr 2019 19:54:48 -0400
severity 34920 wishlist
quit

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> But my point is that since we support very little CSS, spending time
> fetching something that in 99% of the cases will make no difference to
> our rendering is a disservice to the users.

I tried loading a version of the sourcehut page with its main.css pasted
in <style type="text/css">...</style> and I can confirm it made no
visible difference.

>>> And asking web designers to change their pages so that they'll look
>>> better in non-CSS browser isn't really scaleable.  :-)
>>
>> So what the solution?
>
> Accept that most complex web pages will look like crap in shr and use it
> for what it's suited for.  :-)

Sounds like wontfix...





Severity set to 'wishlist' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 09 Apr 2019 23:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34920; Package emacs. (Mon, 13 May 2019 19:33:01 GMT) Full text and rfc822 format available.

Message #49 received at 34920 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 34920 <at> debbugs.gnu.org
Subject: Re: bug#34920: 27.0.50; Poor eww rendering of SourceHut file "trees"
Date: Mon, 13 May 2019 15:32:04 -0400
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> That's a possibility, but like I said, shr supports such a minimal
> subset of CSS that you're not going to see much, if any, difference.
>
> And there's no way to determine what CSS files are going to contain the
> stuff we support, so you'd have to fetch and parse them all.

Anyway, making shr being ACID compliant (or something along those lines)
is, I think, beyond the scope of a bug report -- if shr is going to
render HTML according to the CSS specs, it's a monumental project (and
is, I believe) make shr so slow that you can't use it, anyway.

So I'm closing this bug report.  :-/

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 13 May 2019 19:33:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 34920 <at> debbugs.gnu.org and Stefan Monnier <monnier <at> IRO.UMontreal.CA> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 13 May 2019 19:33:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.