[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using eww as browser for Emacs internals and documentation (was: bug#387

From: Juri Linkov
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> Can you tell more about the plan?

Web browsers support the officially registered URI scheme 'about'
to reveal internal state and built-in functions:

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'

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.

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>


<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?


- 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 via email to

[Prev in Thread] Current Thread [Next in Thread]