unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 68254@debbugs.gnu.org, yvv0@proton.me
Subject: bug#68254: EWW ‘readable’ by default
Date: Thu, 21 Mar 2024 12:51:21 +0200	[thread overview]
Message-ID: <861q833ljq.fsf@gnu.org> (raw)
In-Reply-To: <c917fe41-45d8-8ad9-0f61-75ff62e73f50@gmail.com> (message from Jim Porter on Mon, 18 Mar 2024 17:00:33 -0700)

> Date: Mon, 18 Mar 2024 17:00:33 -0700
> Cc: 68254@debbugs.gnu.org, yvv0@proton.me
> From: Jim Porter <jporterbugs@gmail.com>
> 
> Thanks for looking. I've addressed all of your comments, and made some 
> more extensive changes to the implementation. I split up some of the 
> logic in the first patch so that it's easier to reuse without error, and 
> then added 'eww-readable-urls' in the second.

Thanks, I have some minor nits below.

> Because of how much I changed, I'd like to add some regression tests to 
> make sure everything still works correctly, but otherwise these patches 
> should be ready to go.

Yes, tests would be good.

> ++++
> +*** 'eww-readable' now toggles display of the readable parts of a web page.
> +When called interactively, 'eww-readable' toggles whether to display
> +only the readable parts of a page or the full page.  With a positive
> +prefix argument, always display the readable parts, and with a zero or
> +negative prefix, always display the full page.

You say "toggles", but then "display".  It is better to make the style
consistent.

> +(defun eww--parse-html-region (start end &optional encode)
> +  "Parse the HTML between START and END, returning the DOM as an S-expression.
> +Use ENCODE to decode the region; if nil, decode as UTF-8.

It is better to call the argument DECODE, not ENCODE.

> +@vindex eww-readable-urls
> +  If you want EWW to render a certain page in ``readable'' mode by
> +default, you can add a regular expression matching its URL to
> +@code{eww-readable-urls}.  Each entry can either be a regular expression
> +as a string or a cons cell of the form @code{(@var{regexp}
> +. @var{readability})}. If @var{readability} is non-@code{nil}, this
                        ^^
Please use @w to prevent breaking long expressions between two lines.
Also, please leave two spaces between sentences.

> +(defcustom eww-readable-urls nil
> +  "A list of regexps matching URLs to display in readable mode by default.
> +Each element can be either a string regexp or a cons cell of the
> +form (REGEXP . READABILITY).  If READABILITY is non-nil, this behaves
> +the same as the string form; otherwise, URLs matching REGEXP will never
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
What do you mean by "the same as the string form"? which string form?





  reply	other threads:[~2024-03-21 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05  7:35 bug#68254: EWW ‘readable’ by default Navajeeth via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 11:52 ` Eli Zaretskii
     [not found]   ` <poNSnv1DQ7L71-FirbCx9nuQ8gqLlPGTIjDYk2pKo2_H3BPuJArYQ2ziQ4pyADSxHCY5cU40D6MUzRqBAZE3pEcFmnzFPD49xunpLyh1UqI=@proton.me>
2024-01-05 13:35     ` Eli Zaretskii
2024-03-17 19:24       ` Jim Porter
2024-03-18  4:32         ` Adam Porter
2024-03-18  5:17           ` Navajeeth via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-18  5:44             ` Jim Porter
2024-03-18  5:18           ` Jim Porter
2024-03-18 12:37         ` Eli Zaretskii
2024-03-19  0:00           ` Jim Porter
2024-03-21 10:51             ` Eli Zaretskii [this message]
2024-03-22  5:46               ` Jim Porter
2024-03-23  7:48                 ` Eli Zaretskii
2024-03-23 17:26                   ` Jim Porter

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=861q833ljq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68254@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=yvv0@proton.me \
    /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).