emacs-devel
[Top][All Lists]
Advanced

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

Re: master 31be4d7: Add a way to use an external command to download HTM


From: Mauro Aranda
Subject: Re: master 31be4d7: Add a way to use an external command to download HTML in eww
Date: Fri, 18 Sep 2020 08:34:07 -0300

larsi@gnus.org (Lars Ingebrigtsen) writes:

> branch: master
> commit 31be4d7ca48fd21bdcd5428ce4164790efd39099
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
>
>     Add a way to use an external command to download HTML in eww
>    
>     * doc/misc/eww.texi (Advanced): Document it.
>    
>     * lisp/net/eww.el (eww-retrieve): New function.
>     (eww-reload): Use it.
>     (eww): Ditto.
>     (eww-retrieve-command): New variable.
> ---
>  doc/misc/eww.texi | 17 +++++++++++++++++
>  etc/NEWS          |  5 +++++
>  lisp/net/eww.el   | 32 ++++++++++++++++++++++++++++++--
>  3 files changed, 52 insertions(+), 2 deletions(-)
>
> diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
> index 85be112..e814d0a 100644
> --- a/doc/misc/eww.texi
> +++ b/doc/misc/eww.texi
> @@ -212,6 +212,23 @@ in an external browser by customizing
>  @node Advanced
>  @chapter Advanced
>  
> +@findex eww-retrieve-command
> +  EWW normally uses @code{url-retrieve} to fetch the @acronym{HTML}
> +before rendering it. It can sometimes be convenient to use an external
> +program to do this, and @code{eww-retrieve-command} should then be a
> +list that specifies a command and the parameters.  For instance, to
> +use the Chromium browser, you could say something like this:
> +
> +@lisp
> +(setq eww-retrieve-command
> +      '("chromium" "--headless"
> +    "--virtual-time-budget=3000"
> +    "--dump-dom"))
> +@end lisp

[...]

> diff --git a/lisp/net/eww.el b/lisp/net/eww.el
> index 07aa48a..bc23fb9 100644
> --- a/lisp/net/eww.el
> +++ b/lisp/net/eww.el
> @@ -134,6 +134,15 @@ The string will be passed through `substitute-command-keys'."
>    :type '(choice (const :tag "Unlimited" nil)
>                   integer))
>  
> +(defcustom eww-retrieve-command nil
> +  "Command to retrieve an URL via an external program.
> +If nil, `url-retrieve' is used to download the data.  If non-nil,
> +this should be a list where the first item is the program, and
> +the rest are the arguments."
> +  :version "28.1"
> +  :type '(choice (const :tag "Use `url-retrieve'" nil)
> +                 (list string)))
> +

The docstring and the example says that the variable can be a list of
strings.  But the type says it can be a list of only one element, a
string.  Did you mean `repeat' instead of `list'?

reply via email to

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