From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#68254: EWW =?UTF-8?Q?=E2=80=98readable=E2=80=99?= by default Date: Sun, 17 Mar 2024 22:44:05 -0700 Message-ID: <46d7b310-0c0d-769b-3937-d5dbe28ac3b3@gmail.com> References: <6ee278b0-1511-cfd9-7695-7e019d879f7b@gmail.com> <67bf26f6-382e-4065-8e02-b6433fe78b76@alphapapa.net> <2MQKkzbUomaUaXnNZ-fBUQh16ART3ObpVaHqCDAjrbzQxg4fHmMh2jEeB5cRcfXQJq3p4XfRG9ho6Icykbdc10b8qOlXgeb5FGfgEUw1h10=@proton.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68254@debbugs.gnu.org, eliz@gnu.org To: Navajeeth , Adam Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 18 06:52:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rm5vS-0008l1-A0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Mar 2024 06:52:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rm5vB-0000LZ-Hm; Mon, 18 Mar 2024 01:52:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rm5v7-0000LO-KI for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2024 01:52:25 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rm5v6-0006L8-DF for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2024 01:52:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rm5vi-0005TU-9k for bug-gnu-emacs@gnu.org; Mon, 18 Mar 2024 01:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Mar 2024 05:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68254 X-GNU-PR-Package: emacs Original-Received: via spool by 68254-submit@debbugs.gnu.org id=B68254.171074113720916 (code B ref 68254); Mon, 18 Mar 2024 05:53:02 +0000 Original-Received: (at 68254) by debbugs.gnu.org; 18 Mar 2024 05:52:17 +0000 Original-Received: from localhost ([127.0.0.1]:36991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm5uz-0005RD-0d for submit@debbugs.gnu.org; Mon, 18 Mar 2024 01:52:17 -0400 Original-Received: from mail-oo1-f45.google.com ([209.85.161.45]:44105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm5ux-0005Qq-Da for 68254@debbugs.gnu.org; Mon, 18 Mar 2024 01:52:16 -0400 Original-Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-5a4859178f1so1333933eaf.0 for <68254@debbugs.gnu.org>; Sun, 17 Mar 2024 22:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710741032; x=1711345832; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Km9MWqYRF9v06QYmE99HUVUo7+4J8awM08KljMSiu7Q=; b=NtU83FZM32ao2L4xPFBQEFy1TXJDApfnbHZe4KOzK7o4d73elD2ioqeTTZe4FnocP3 QGWr9xzyuXiw+ZUhGoLZgYwP8qzMTqlpokSIO5tQ5SaNEfjFHhJE6TJlkvEOkM4CXKt5 Gq4ys4DVEjgDkpv4JKD6YZoqznE+7i9Tal0vkk8KsLh3a41yHEsNTNFrsCavMkfT7KR/ oMAc1WQpE77b/waPxF5rQtv1bTTJaBnjDZSprAMNG1apYGX8GGzdDyP7CwfvIuS41qyg /wzW3+RmuEReBF24WBZn7sbjcZjWxZYNnNCh3cZGZA2Vs3aGijDI6UwuR1Tsd1JfspIu A84w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710741032; x=1711345832; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Km9MWqYRF9v06QYmE99HUVUo7+4J8awM08KljMSiu7Q=; b=du0ugO5W21sLRjBKVNFhcvcjq7yghBI8RTxKBcdyOUn1p3AiFyrTvL8TohziIwr9qC ijP39IE+WtfNfIpB9PtraQDVEO3N82M/5ROUItSEnZVZ9gCOP4Z0kzzyklNbJdPcPDKG vEEO4b9QI+zkqntZUFdBgpc3wuPJFhHa+JlSimgdYuSTZTbjR7fWpVCXMGiIGACTHucf ZMTU+Ro4EdPo6V5umU/QOgt6wZXyXcrOnm5qRny2aZ5X/iqYEAfGy7WgjHvsm4Ilirg+ 0C7Pb+rjMASDqm+jQQu83GHzTHEf4qjAw5r7peb6xY2nbgDQgX6eK4x/3bp9IXfxHr26 oFpw== X-Gm-Message-State: AOJu0YwGcyMaFHerje0yO2QLvXeOv6al+zLesKW2CK43nfFyLzU/1uiL heYaOto5LpwZcG/6F9oWv/n30Xkkl6LgMUVs35h65ldhGdaq/eS5k4DDl8cU X-Google-Smtp-Source: AGHT+IHAGaSClNvqWfKXrPzvT1lFfw/zdCTXPZAnWhDfeLXIyPsHEsvEXvyv3b1LVV9PLH4+54b9ZQ== X-Received: by 2002:a05:6a21:3a48:b0:1a3:677a:c9e2 with SMTP id zu8-20020a056a213a4800b001a3677ac9e2mr944889pzb.26.1710740646216; Sun, 17 Mar 2024 22:44:06 -0700 (PDT) Original-Received: from [192.168.1.2] (076-168-148-233.res.spectrum.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id o3-20020a17090a3d4300b0029c7014cc00sm6903278pjf.1.2024.03.17.22.44.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Mar 2024 22:44:05 -0700 (PDT) Content-Language: en-US In-Reply-To: <2MQKkzbUomaUaXnNZ-fBUQh16ART3ObpVaHqCDAjrbzQxg4fHmMh2jEeB5cRcfXQJq3p4XfRG9ho6Icykbdc10b8qOlXgeb5FGfgEUw1h10=@proton.me> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281794 Archived-At: On 3/17/2024 10:17 PM, Navajeeth via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Thank you so much for the patch, @Jim! I dunno how to apply patches, but > I’ll learn and try yours out as soon as I can. Even though I contribute to Emacs, I tend to use the latest proper release as my daily editor (so I'm using 29.2 now).[1] If I want to use a patch I wrote on an older release, I take the new version of all the relevant functions and then override the old ones using 'advice-add': (defun updated-eww-readable (&optional arg) ;; new implementation here ) (advice-add 'eww-readable :override 'updated-eww-readable) If the patch has merged to the master branch, I usually wrap that with '(when (< emacs-major-version 30) ...)' so that it doesn't do anything on the master builds, and also so I know to remove it when 30.1 comes out and I prune my init.el. > I think a better way to go would be to have a /readability-off/ list for > the readability-minor-mode. In my experience, with the kind of sites I > open with EWW (textual sites without a lot of graphics or JavaScript), > the list of ones where ‘eww-readable’ doesn’t work is a lot smaller than > the ones where it does. I was thinking about doing something like this. The list of regexps could include a way to say both "if this regexp matches, use readable mode" and "if this regexp matches, *don't* use readable mode". Then you could make the list look something like this: '(("^https://example.com/" . not-readable) ".*") That would make every page except those from https://example.com use readable mode. I think that would be the most flexible for complex cases, while still being simple for the common case (a list of "plain" regexps for readable-mode pages). It would also make it easy to have most of a site (except for one section) use readable-mode. [1] Mainly I just want to avoid having to worry about updating Emacs master and then ending up with a broken Emacs. Murphy's Law dictates that that will always occur at the worst possible time.