GNU bug report logs - #38713
27.0.50; eww doesn't handle protocols other than https?

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 22 Dec 2019 23:16:01 UTC

Severity: minor

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 38713 in the body.
You can then email your comments to 38713 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 bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Sun, 22 Dec 2019 23:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 Dec 2019 23:16:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; eww doesn't handle protocols other than https?
Date: Mon, 23 Dec 2019 01:11:09 +0200
[Message part 1 (text/plain, inline)]
0. emacs -Q
1. M-x eww RET about:protocols RET hangs with the following line:

Loading http://about:protocols/...

whereas after applying the following patch it displays the nicely
formatted HTML page:

  Supported Protocols - URL vEmacs
   Protocol   Properties   Description
   about   Synchronous  N/A
     Default Port: 0
   ...

[eww-protocols.patch (text/x-diff, inline)]
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index dccaf0497f..64386921c7 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -319,7 +319,8 @@ eww--dwim-expand-url
         (t
 	 ;; Anything that starts with something that vaguely looks
 	 ;; like a protocol designator is interpreted as a full URL.
-         (if (or (string-match "\\`[A-Za-z]+:" url)
+         (unless (string-match-p "\\`about:" url)
+         (if (or (string-match-p "\\`[A-Za-z]+:" url)
 		 ;; Also try to match "naked" URLs like
 		 ;; en.wikipedia.org/wiki/Free software
 		 (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url)
@@ -335,7 +336,7 @@ eww--dwim-expand-url
                  (setq url (concat url "/"))))
            (setq url (concat eww-search-prefix
                              (mapconcat
-                              #'url-hexify-string (split-string url) "+"))))))
+                              #'url-hexify-string (split-string url) "+")))))))
   url)
 
 (defun eww--preprocess-html (start end)
diff --git a/lisp/url/url-about.el b/lisp/url/url-about.el
index e9d9d6346e..ee79ee1aab 100644
--- a/lisp/url/url-about.el
+++ b/lisp/url/url-about.el
@@ -91,7 +95,7 @@ url-about
     (if (fboundp func)
 	(progn
 	  (set-buffer (generate-new-buffer " *about-data*"))
-	  (insert "Content-type: text/plain\n\n")
+	  (insert "Content-type: text/html\n\n")
 	  (funcall func url)
 	  (current-buffer))
       (error "URL does not know about `%s'" item))))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Sun, 22 Dec 2019 23:27:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 38713 <at> debbugs.gnu.org
Subject: Re: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Mon, 23 Dec 2019 00:26:29 +0100
Juri Linkov <juri <at> linkov.net> writes:

> 0. emacs -Q
> 1. M-x eww RET about:protocols RET hangs with the following line:
>
> Loading http://about:protocols/...
>
> whereas after applying the following patch it displays the nicely
> formatted HTML page:
>
>   Supported Protocols - URL vEmacs
>    Protocol   Properties   Description
>    about   Synchronous  N/A
>      Default Port: 0
>    ...

I'm not sure that makes much sense, really.  Emacs has other ways of
documenting these things other than putting them in an about:
pseudo-protocol thing.  (While other browsers do not.)

eww does not support everything that the url* library does, and
shouldn't.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Mon, 23 Dec 2019 23:18:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 38713 <at> debbugs.gnu.org
Subject: Re: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Tue, 24 Dec 2019 01:12:15 +0200
>> 1. M-x eww RET about:protocols RET hangs with the following line:
>>
>> Loading http://about:protocols/...
>>
>> whereas after applying the following patch it displays the nicely
>> formatted HTML page:
>>
>>   Supported Protocols - URL vEmacs
>>    Protocol   Properties   Description
>>    about   Synchronous  N/A
>>      Default Port: 0
>>    ...
>
> I'm not sure that makes much sense, really.  Emacs has other ways of
> documenting these things other than putting them in an about:
> pseudo-protocol thing.  (While other browsers do not.)

This is part of the planned bigger effort - browsers already support
the 'about' URI scheme, but Emacs is still lagging behind.  I'd like
to expend lisp/url/url-about.el to give information on Emacs internals
including about:memory, about:buffers, about:processes, about:timers and
many more, using HTML instead of semi-obsolete Info or other ad-hoc formats.

Do you think this is worth the effort?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Tue, 24 Dec 2019 01:32:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 38713 <at> debbugs.gnu.org
Subject: Re: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Tue, 24 Dec 2019 02:31:09 +0100
Juri Linkov <juri <at> linkov.net> writes:

> This is part of the planned bigger effort - browsers already support
> the 'about' URI scheme, but Emacs is still lagging behind.  I'd like
> to expend lisp/url/url-about.el to give information on Emacs internals
> including about:memory, about:buffers, about:processes, about:timers and
> many more, using HTML instead of semi-obsolete Info or other ad-hoc formats.
>
> Do you think this is worth the effort?

Reimplementing the Emacs Lisp manual piece-by-piece in eww doesn't sound
like a very promising path, I think?  And for live data on things, `M-x
list-timers' is always going to be better than HTML.

The long-term goal is to have the TeXinfo target HTML instead of Info,
so the lispref manual will end up being HTML.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Tue, 24 Dec 2019 15:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: larsi <at> gnus.org, 38713 <at> debbugs.gnu.org
Subject: Re: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Tue, 24 Dec 2019 17:28:09 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Date: Tue, 24 Dec 2019 01:12:15 +0200
> Cc: 38713 <at> debbugs.gnu.org
> 
> >> 1. M-x eww RET about:protocols RET hangs with the following line:
> >>
> >> Loading http://about:protocols/...
> >>
> >> whereas after applying the following patch it displays the nicely
> >> formatted HTML page:
> >>
> >>   Supported Protocols - URL vEmacs
> >>    Protocol   Properties   Description
> >>    about   Synchronous  N/A
> >>      Default Port: 0
> >>    ...
> >
> > I'm not sure that makes much sense, really.  Emacs has other ways of
> > documenting these things other than putting them in an about:
> > pseudo-protocol thing.  (While other browsers do not.)
> 
> This is part of the planned bigger effort - browsers already support
> the 'about' URI scheme, but Emacs is still lagging behind.  I'd like
> to expend lisp/url/url-about.el to give information on Emacs internals
> including about:memory, about:buffers, about:processes, about:timers and
> many more, using HTML instead of semi-obsolete Info or other ad-hoc formats.
> 
> Do you think this is worth the effort?

Can you tell more about the plan?  For example, the following
questions seem to be pertinent:

 . why implement this as part of eww? Emacs is not a browser, which
   can only react to protocols, it has other ways of interaction

 . where will all the HTML content come from? will it be taken from
   the existing documentation or written from scratch?

 . eww is not very sophisticated browser, so are you sure displaying
   HTML with it will be significantly better than "semi-obsolete"
   Info?

 . more generally, what will be the advantages of providing
   documentation this way, as opposed to the way we provide it now?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38713; Package emacs. (Wed, 22 Jan 2020 16:17:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 38713 <at> debbugs.gnu.org
Subject: Re: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Wed, 22 Jan 2020 17:15:50 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Reimplementing the Emacs Lisp manual piece-by-piece in eww doesn't sound
> like a very promising path, I think?  And for live data on things, `M-x
> list-timers' is always going to be better than HTML.

After the discussion on emacs-devel, it didn't sound like anybody was
very enthusiastic about this idea, so I'm closing the 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. (Wed, 22 Jan 2020 16:17:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 38713 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 16:17:03 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. (Thu, 20 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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