unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, emacs-devel@gnu.org
Subject: Using eww as browser for Emacs internals and documentation (was: bug#38713: 27.0.50; eww doesn't handle protocols other than https?)
Date: Wed, 25 Dec 2019 02:36:30 +0200	[thread overview]
Message-ID: <87mubhduqh.fsf_-_@mail.linkov.net> (raw)
In-Reply-To: <83lfr1wxo6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Dec 2019 17:28:09 +0200")

> Can you tell more about the plan?

Web browsers support the officially registered URI scheme 'about'
to reveal internal state and built-in functions:
https://en.wikipedia.org/wiki/About_URI_scheme

There is one 'about' URI, namely 'about:protocols'
already implemented in Emacs in lisp/url/url-about.el
Then why not to support more 'about' URIs like:

about:memory - with data returned from 'garbage-collect'
about:processes
about:timers
about:buffers
etc.

If it's worth going that path, then would it be nice also
to browse docstrings in eww as well with such URI as e.g.
about:function/cdr

There is one problem that some links might require executing
Lisp code, e.g. to visit C source code.  In this case where
Web browsers execute JavaScript, use Emacs-specific EMACScript:

<a href="emacscript:(find-function 'car)">Click to visit C source code</a>

or

<a href="#" onclick="(find-function-C-source 'car)">C source code</a>

> 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

Because eww provides basic capabilities present in web browsers such
as rendering the standard HTML format and using hypertext links
for navigation.

OTOH, I think it would be useful only for browsing, not for interaction:
it would not make sense to implement so-called "web apps" to be able to
e.g. mark and delete buffers in the buffer list displayed in eww -
this would be an inappropriate thing to do.

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

HTML content will be generated by functions like the existing
'url-about-protocols' in lisp/url/url-about.el.  These functions
might extract data from various data sources, including docstrings.

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

Many features of the Info browser are already supported in eww
such as search and next/prev page navigation.  But eww could be
extended further with capabilities of the Info browser.

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

Advantages:

- consistent unified UI for browsing Emacs internals and documentation;
- browser-like navigation using links where every resource is represented
  by standardized URI scheme;
- navigation history shared between various resources including Help and Info;
- easy bookmarking of every available resource;
...



       reply	other threads:[~2019-12-25  0:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pngggdma.fsf@mail.linkov.net>
     [not found] ` <87bls0t00q.fsf@gnus.org>
     [not found]   ` <87woammyb4.fsf@mail.linkov.net>
     [not found]     ` <83lfr1wxo6.fsf@gnu.org>
2019-12-25  0:36       ` Juri Linkov [this message]
2019-12-25 21:43         ` Using eww as browser for Emacs internals and documentation Lars Ingebrigtsen
2019-12-25 21:59           ` Juri Linkov
2020-01-08 16:43           ` T.V Raman
2019-12-25 22:22         ` Stefan Monnier
2019-12-25 23:07           ` Lars Ingebrigtsen
2020-01-08 16:44           ` T.V Raman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mubhduqh.fsf_-_@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).