GNU bug report logs - #50497
[PATCH] Adding eww-{next,previous,up,top}-path.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Yuchen Pei <hi@HIDDEN>; Keywords: patch; dated Fri, 10 Sep 2021 03:06:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 14 Sep 2021 11:04:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 07:04:59 2021
Received: from localhost ([127.0.0.1]:47704 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ6FG-0007lK-Om
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 07:04:58 -0400
Received: from quimby.gnus.org ([95.216.78.240]:40204)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mQ6FF-0007l6-A8
 for 50497 <at> debbugs.gnu.org; Tue, 14 Sep 2021 07:04:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=S6i2Kbam2kEkqTOqVPpXzlMhpo6kejvOx6V84cjPYXw=; b=GTPWS6hemuQW9dBDc4Qhlr7dDC
 kYClewGPNR5vf4KeSjBAtcpujRMgS00amBUJRiRxhPF6e+v9H0OngokALS75jfp0ea57Q+aF54RmH
 pmT9776VNcsknobK/suKr7Va9T27/JIsa25dwmOD5FNJ8I8QqUOXffecRGa7TE6EmDiM=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mQ6F6-00061q-Db; Tue, 14 Sep 2021 13:04:50 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN> <87czpfnw4j.fsf@HIDDEN>
 <87pmtfx7fs.fsf@HIDDEN> <878s00j416.fsf@HIDDEN>
 <87zgsgqsoc.fsf@HIDDEN>
Date: Tue, 14 Sep 2021 13:04:47 +0200
In-Reply-To: <87zgsgqsoc.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 13 Sep 2021 20:51:39 +0300")
Message-ID: <87tuinwh80.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: > What do you think
 about supporting synchronous mode in eww? > When adding a variable that causes
 eww-retrieve to use > url-retrieve-synchronously, isearch part could look
 like this: > > (defun eww-i [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> What do you think about supporting synchronous mode in eww?
> When adding a variable that causes eww-retrieve to use
> url-retrieve-synchronously, isearch part could look like this:
>
>   (defun eww-isearch-next-buffer (&optional _buffer wrap)
>     (let ((eww-synchronous t))
>       (if wrap
>           (condition-case nil
>               (eww-top-url)
>             (error nil))
>         (if isearch-forward
>             (eww-next-url)
>           (eww-previous-url))))
>     (current-buffer))

Sure, makes sense to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 13 Sep 2021 17:59:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 13:59:58 2021
Received: from localhost ([127.0.0.1]:46768 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPqFK-0005SL-CU
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 13:59:58 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:36821)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mPqFI-0005S5-4V
 for 50497 <at> debbugs.gnu.org; Mon, 13 Sep 2021 13:59:57 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 40B6A10000D;
 Mon, 13 Sep 2021 17:59:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Organization: LINKOV.NET
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN> <87czpfnw4j.fsf@HIDDEN>
 <87pmtfx7fs.fsf@HIDDEN> <878s00j416.fsf@HIDDEN>
Date: Mon, 13 Sep 2021 20:51:39 +0300
In-Reply-To: <878s00j416.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 13 Sep 2021 10:03:33 +0200")
Message-ID: <87zgsgqsoc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> That's also true, so I was sceptical about adding that (because it also
>>> makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
>>> been pondering whether to remove it (or at least hide it behind and
>>> option defaulting to "off").
>>
>> But users like it:
>> https://www.reddit.com/r/emacs/comments/9oi1e3/ewws_awesome_isearch_support_just_blew_my_mind/
>
> Yeah, it's a neat trick (which makes people go "ooo").  So disabling it
> would be a shame.  But it does make the user experience slightly worse
> most of the time...
>
> Actually, we could just tweak it -- today it says "repeat for next
> buffer" even if there's no next buffer (it only checks afterwards),
> apparently.  Hm...  Right, if eww only sets
> `multi-isearch-next-buffer-function' when there's a rel=next/prev, then
> this awkwardness disappears.

But still I'd like to make `C-s' less sub-optimal when used
on pages with a rel=next/prev and to fix such complaints:

  "It turns out that this interacts badly with asynchronous loading of
  web pages -- I think the buffer is being searched before the web content
  is loaded, but with local content it's either all managing to happen
  fast enough that the issue doesn't arise, or it's being done in a more
  synchronous manner.  Hopefully this can be addressed, but in the
  meantime you may need to test with local html files."

What do you think about supporting synchronous mode in eww?
When adding a variable that causes eww-retrieve to use
url-retrieve-synchronously, isearch part could look like this:

  (defun eww-isearch-next-buffer (&optional _buffer wrap)
    (let ((eww-synchronous t))
      (if wrap
          (condition-case nil
              (eww-top-url)
            (error nil))
        (if isearch-forward
            (eww-next-url)
          (eww-previous-url))))
    (current-buffer))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 13 Sep 2021 08:38:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 04:38:11 2021
Received: from localhost ([127.0.0.1]:44289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPhTe-0006Hr-Oh
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 04:38:11 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:33325)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mPhTb-0006H3-P4
 for 50497 <at> debbugs.gnu.org; Mon, 13 Sep 2021 04:38:08 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 9FFB9E0007;
 Mon, 13 Sep 2021 08:37:59 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Organization: LINKOV.NET
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN> <87czpfnw4j.fsf@HIDDEN>
 <87pmtfx7fs.fsf@HIDDEN> <878s00j416.fsf@HIDDEN>
Date: Mon, 13 Sep 2021 11:25:41 +0300
In-Reply-To: <878s00j416.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 13 Sep 2021 10:03:33 +0200")
Message-ID: <87wnnkg9ve.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Juri Linkov <juri@HIDDEN> writes:
>
>>> That's also true, so I was sceptical about adding that (because it also
>>> makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
>>> been pondering whether to remove it (or at least hide it behind and
>>> option defaulting to "off").
>>
>> But users like it:
>> https://www.reddit.com/r/emacs/comments/9oi1e3/ewws_awesome_isearch_support_just_blew_my_mind/
>
> Yeah, it's a neat trick (which makes people go "ooo").  So disabling it
> would be a shame.  But it does make the user experience slightly worse
> most of the time...
>
> Actually, we could just tweak it -- today it says "repeat for next
> buffer" even if there's no next buffer (it only checks afterwards),
> apparently.  Hm...  Right, if eww only sets
> `multi-isearch-next-buffer-function' when there's a rel=next/prev, then
> this awkwardness disappears.
>
> Now done.

Thanks, this makes perfect sense - when there are no next/prev links,
then normal isearch should be used.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 13 Sep 2021 08:03:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 04:03:44 2021
Received: from localhost ([127.0.0.1]:44168 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPgwK-00037A-5Q
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 04:03:44 -0400
Received: from quimby.gnus.org ([95.216.78.240]:55322)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mPgwI-00036x-SJ
 for 50497 <at> debbugs.gnu.org; Mon, 13 Sep 2021 04:03:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=UlE+2DkFwGxDe9KW0kvKGzFLgWPSf4/BDzO2EQD5Ibg=; b=uFAaZOS5cKdyHab3t1lm0wO3Ss
 U+cfIgTzkab8oqyflaB1bd7Qi9t/bLC65bmB5YOYYFvKH4kxI7OoYJOjxhdMdLHiy4cJ0kh5u5OJv
 gvXbAvNQf/NiMBbCxSmb4MqtyyEwPE1UOdHqou69w7mSxZJaLSUzricPzbUoXwvXc2wc=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mPgwA-0006Kt-2e; Mon, 13 Sep 2021 10:03:36 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN> <87czpfnw4j.fsf@HIDDEN>
 <87pmtfx7fs.fsf@HIDDEN>
Date: Mon, 13 Sep 2021 10:03:33 +0200
In-Reply-To: <87pmtfx7fs.fsf@HIDDEN> (Juri Linkov's message of "Sat, 
 11 Sep 2021 22:01:43 +0300")
Message-ID: <878s00j416.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: >> That's also true,
 so I was sceptical about adding that (because it also >> makes `C-s' etc
 behave sub-optimally in 99.7% of web pages), so I've >> been pondering whether
 to remove it (or at least h [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> That's also true, so I was sceptical about adding that (because it also
>> makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
>> been pondering whether to remove it (or at least hide it behind and
>> option defaulting to "off").
>
> But users like it:
> https://www.reddit.com/r/emacs/comments/9oi1e3/ewws_awesome_isearch_support_just_blew_my_mind/

Yeah, it's a neat trick (which makes people go "ooo").  So disabling it
would be a shame.  But it does make the user experience slightly worse
most of the time...

Actually, we could just tweak it -- today it says "repeat for next
buffer" even if there's no next buffer (it only checks afterwards),
apparently.  Hm...  Right, if eww only sets
`multi-isearch-next-buffer-function' when there's a rel=next/prev, then
this awkwardness disappears.

Now done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 11 Sep 2021 19:20:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 11 15:20:45 2021
Received: from localhost ([127.0.0.1]:41425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mP8YO-0002fY-TF
	for submit <at> debbugs.gnu.org; Sat, 11 Sep 2021 15:20:45 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:47587)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mP8YM-0002f8-B3
 for 50497 <at> debbugs.gnu.org; Sat, 11 Sep 2021 15:20:42 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 4E0ACC0003;
 Sat, 11 Sep 2021 19:20:33 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Organization: LINKOV.NET
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN> <87czpfnw4j.fsf@HIDDEN>
Date: Sat, 11 Sep 2021 22:01:43 +0300
In-Reply-To: <87czpfnw4j.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 11 Sep 2021 14:18:36 +0200")
Message-ID: <87pmtfx7fs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> Actually, the same 99.7% of all web pages doesn't provide special
>> attributes "next"/"previous"/"up" used by 'n'/'p'/'u' eww commands.
>
> That's also true, so I was sceptical about adding that (because it also
> makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
> been pondering whether to remove it (or at least hide it behind and
> option defaulting to "off").

But users like it:
https://www.reddit.com/r/emacs/comments/9oi1e3/ewws_awesome_isearch_support_just_blew_my_mind/

And if it behaves sub-optimally, it could be fixed by just creating
a new bug report :-)

> But at least it has one thing going for it -- it's a standard mechanism,
> not using guesswork.
>
>> So using URL regexp matching as a fallback for other 99.7% of web pages
>> that don't have numbers in URL will support (100% - 99.7%) * 2 pages.
>
> It's true, but it'll also make `C-s' (at the end of an eww buffer) guess
> at what's the next buffer, load it, and search through that instead.
> Which is just kinda problematic, since an URL with a number in it isn't
> necessarily related to the URL with the next number in it.
>
> We'd be displaying web pages to the user that the user hasn't asked for,
> and that the person who wrote the web site didn't intend for the user to
> navigate in that way.

I agree, then such fuzzy guesswork should be optional.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 11 Sep 2021 12:22:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 11 08:22:31 2021
Received: from localhost ([127.0.0.1]:39668 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mP21f-0008Go-3H
	for submit <at> debbugs.gnu.org; Sat, 11 Sep 2021 08:22:31 -0400
Received: from quimby.gnus.org ([95.216.78.240]:36068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mP21c-0008Gb-Qq
 for 50497 <at> debbugs.gnu.org; Sat, 11 Sep 2021 08:22:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=GzSEyyxM/FMwCjBSL/KCCnIuV5HRet4zZQLddGehsdw=; b=o3SSQo9eT+mimp9suUFDjJIV6X
 WxmfNteNvmBzLQToSrrMW23Hf43vYQYFYVKuvw/ywzNpf9gMnU1fBnGXhw1nE19OZpRpE0YT2PAPK
 FS/rhACao8lIJUwP3uqA8+PdG8OjskVwDhgo1ILCOF5Moj2lDjifXC15V9z1IbRqm1x0=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mP21U-0008Me-Mf; Sat, 11 Sep 2021 14:22:23 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <87v938wq56.fsf@HIDDEN>
Date: Sat, 11 Sep 2021 14:22:20 +0200
In-Reply-To: <87v938wq56.fsf@HIDDEN> (Yuchen Pei's message of "Fri, 10 Sep
 2021 22:50:45 +1000")
Message-ID: <878s03nvyb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Yuchen Pei <hi@HIDDEN> writes: > OK, how about having them
 as a fallback to > eww-{nex,previous,up,top}-url, as Juri mentioned? From
 my experience > these -url functions don't work for most web pages either,
 so adding > my function [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50497
Cc: 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Yuchen Pei <hi@HIDDEN> writes:

> OK, how about having them as a fallback to
> eww-{nex,previous,up,top}-url, as Juri mentioned?  From my experience
> these -url functions don't work for most web pages either, so adding
> my functions as a fallback would increase the chance that the keys
> will work in some meaningful way.

See my response to Juri.  For the explicit commands (i.e., not involved
in isearch) it might make sense, because the user actually asked to see
"next page".  I think it's a DWIM step too far, though.  Just because
you've on https://foo.bar/?4524 doesn't mean that the site author had
meant for visitors to that page to go to https://foo.bar/?4525, which
may be a totally different topic (for instance, something Not Safe For
Work).

The user is free to edit the URLs as they wish, but as a command in a
web browser?  I'm sceptical that we'd be doing the users a favour.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 11 Sep 2021 12:18:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 11 08:18:58 2021
Received: from localhost ([127.0.0.1]:39660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mP1yD-0008Au-Vg
	for submit <at> debbugs.gnu.org; Sat, 11 Sep 2021 08:18:58 -0400
Received: from quimby.gnus.org ([95.216.78.240]:36034)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mP1y1-0008AV-Nz
 for 50497 <at> debbugs.gnu.org; Sat, 11 Sep 2021 08:18:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Ol74pwtZ723juDZtmXXOZ77uLgdGRs3guEpcxN4EqVg=; b=ND1ULPIvrS7pEd2y07/92t8Ynv
 3E1j1o7azoirk9Q7OmzM86bQT/Z7yHCL659g2zUiaeCrAhTmPfIGXYVZTEmPPHdM1SbC7Hkkf8IHo
 vBeH4QWtXg9dkLGKHE2hv1bLMRJDx/2HULG+aYpcf7u5/me22hCiaqRpFIF176qkfNCU=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mP1xs-0008Iz-W8; Sat, 11 Sep 2021 14:18:39 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
 <878s04ijhc.fsf@HIDDEN>
Date: Sat, 11 Sep 2021 14:18:36 +0200
In-Reply-To: <878s04ijhc.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 10 Sep 2021 19:10:23 +0300")
Message-ID: <87czpfnw4j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: > Actually, the same
 99.7% of all web pages doesn't provide special > attributes
 "next"/"previous"/"up"
 used by 'n'/'p'/'u' eww commands. That's also true, so I was sceptical about
 adding that (because it also makes `C-s' etc behave sub-optimally in 99.7%
 of web pages), so I've been pondering whether to remove it (or at least hide
 it be [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> Actually, the same 99.7% of all web pages doesn't provide special
> attributes "next"/"previous"/"up" used by 'n'/'p'/'u' eww commands.

That's also true, so I was sceptical about adding that (because it also
makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
been pondering whether to remove it (or at least hide it behind and
option defaulting to "off").  But at least it has one thing going for
it -- it's a standard mechanism, not using guesswork.

> So using URL regexp matching as a fallback for other 99.7% of web pages
> that don't have numbers in URL will support (100% - 99.7%) * 2 pages.

It's true, but it'll also make `C-s' (at the end of an eww buffer) guess
at what's the next buffer, load it, and search through that instead.
Which is just kinda problematic, since an URL with a number in it isn't
necessarily related to the URL with the next number in it.

We'd be displaying web pages to the user that the user hasn't asked for,
and that the person who wrote the web site didn't intend for the user to
navigate in that way.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 16:20:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 10 12:20:13 2021
Received: from localhost ([127.0.0.1]:39047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOjG9-0005XJ-7f
	for submit <at> debbugs.gnu.org; Fri, 10 Sep 2021 12:20:13 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:48233)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mOjG6-0005Wh-E9
 for 50497 <at> debbugs.gnu.org; Fri, 10 Sep 2021 12:20:10 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id A2BE4200004;
 Fri, 10 Sep 2021 16:20:03 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Organization: LINKOV.NET
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
Date: Fri, 10 Sep 2021 19:10:23 +0300
In-Reply-To: <87ee9wpt38.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 10 Sep 2021 13:28:59 +0200")
Message-ID: <878s04ijhc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50497
Cc: Yuchen Pei <hi@HIDDEN>, 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I often find myself wanting to navigate paginated web pages
>> (e.g. <https://media.libreplanet.org/videos?page=4>), or to go up or
>> all the way up when visiting a web page, which is why I added these
>> functions to my eww.
>>
>> Does this change make sense?  If so I will amend the patch to include
>> tests, doc and bug number.
>
> I'm not sure this is general enough to include in eww -- these are
> commands that will fail in 99.7% of all web pages, because they don't
> have URLs that are structured this way.

Actually, the same 99.7% of all web pages doesn't provide special
attributes "next"/"previous"/"up" used by 'n'/'p'/'u' eww commands.
So using URL regexp matching as a fallback for other 99.7% of web pages
that don't have numbers in URL will support (100% - 99.7%) * 2 pages.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 12:50:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 10 08:50:58 2021
Received: from localhost ([127.0.0.1]:37199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOfze-0005y7-Ki
	for submit <at> debbugs.gnu.org; Fri, 10 Sep 2021 08:50:58 -0400
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:57723)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1mOfzc-0005xv-FS
 for 50497 <at> debbugs.gnu.org; Fri, 10 Sep 2021 08:50:56 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id B11DF32009A0;
 Fri, 10 Sep 2021 08:50:50 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Fri, 10 Sep 2021 08:50:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=
 references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm2; bh=uKqd5wzpyxKS3HwSxdSsPTXt3m
 0cqdTUSkqSsbZHMR8=; b=RjK6Tl7cJvPFNHa+WKCIUe5LFZni5hX3kemRLJBA7I
 vA56OeG5VTUn7y5ldsjw6tlDi++8GgXMJjspBlNXXJel9UOzdtpMJE1G3/u9kM+p
 1NPH5zinnYw9c5IDff97NnbGbeCM7k1niTGyympHf56Ee8XD+oowHdMy7RacmsEO
 xMQgVcsPHfQtdJ2H6wotv0s/o9WNF5NEKMG2/EUBk5K4bDrNTo5wP4InJcaOgELi
 75bNf8M6GJuT9C3rvoDJMx3gjkH4XkZVdr9fyXe4WC7zMn+nwqR1b6cu8Ba+lIrt
 DACGPHBu3/g6EVak7RnE7ynrVy/quxx0kmEjZO7CyjPg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=uKqd5w
 zpyxKS3HwSxdSsPTXt3m0cqdTUSkqSsbZHMR8=; b=RrgIDHkpGgqhHfEhAMdQZe
 mc8blrAILez7qvVrInmkYlvwaqNW+bcNw+t9aV1qu4Pmvo1CsVDGThjp2LW/q9v9
 WqEsFfkm+NpZwikb6r47RB+GKHQKQ6ivwm68Mhq6MwecXfDds4bv0Z8b+7+uyIiK
 H43yp3NLBJEuPckMBcerTsNdqqXeL+yGBV7c+7MnxG5QDMguvL8Kjm7CCnPQm8yv
 3riuqS05e/IgXMpFAu4edN3x6nCagzWRXpol4o45Olcwv0iZHpiAXaG+CKOzOC3x
 7Wbut5V69NDyJ1gZubnP/90iEhvS9eCRUbJUyQCiVOjGNcLkf2YHROcAsfIojJeQ
 ==
X-ME-Sender: <xms:qVQ7YUPomH3RRYBIjhC91HLZrJsCH4dRrNab-iKAWZ5G_g_Rz3K3zA>
 <xme:qVQ7Ya8ygVriM6rZJQuURPpw6yt7NEiMvuWoTgCwACTHzNElYmyWhNH0n2fSGJ_pY
 Jock-Yg9eImNiIzew>
X-ME-Received: <xmr:qVQ7YbQmQA9o-jUzFj_c5ROmrJuJFncAoBRifZUifHSRKAbg_QAZrelcGO-_FE2eyMbWrR6N3fhGG7-2JmF8zdP9Ea7vQPQ95j8X>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeguddgheehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufgjfffkgggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgv
 nhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnhepudetgeegtd
 fgleefiedtffevgfdvteevkeffhedvteegteetveejfeetveefhfevnecuffhomhgrihhn
 pehlihgsrhgvphhlrghnvghtrdhorhhgpdihphgvihdrmhgvnecuvehluhhsthgvrhfuih
 iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhiseihphgvihdrmhgv
X-ME-Proxy: <xmx:qVQ7Ycue6SsjV6VciQdNoDc8-4KF_d46WGosVq7IKSy6JkE1I9bGSw>
 <xmx:qVQ7YcfCikCkdeGVBSDvIHFRfIwfd7V6Xtc26-85xKhFInkYtXAzhg>
 <xmx:qVQ7YQ1Vbsj8b9XArvVXQupHT2edSNIW04FzTGmDo8Up3Pv1dWQRTA>
 <xmx:qlQ7YUnmn1v1vNgCjVt7Pm5A_ye4LSNfv7gkGYQrEYFLWQREEWDzeQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 10 Sep 2021 08:50:48 -0400 (EDT)
References: <87lf45xh86.fsf@HIDDEN> <87ee9wpt38.fsf@HIDDEN>
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
In-reply-to: <87ee9wpt38.fsf@HIDDEN>
Date: Fri, 10 Sep 2021 22:50:45 +1000
Message-ID: <87v938wq56.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=====-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50497
Cc: 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=====-=-=
Content-Type: text/plain; format=flowed


Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Yuchen Pei <hi@HIDDEN> writes:
>
>> I often find myself wanting to navigate paginated web pages
>> (e.g. <https://media.libreplanet.org/videos?page=4>), or to go 
>> up or
>> all the way up when visiting a web page, which is why I added 
>> these
>> functions to my eww.
>>
>> Does this change make sense?  If so I will amend the patch to 
>> include
>> tests, doc and bug number.
>
> I'm not sure this is general enough to include in eww -- these 
> are
> commands that will fail in 99.7% of all web pages, because they 
> don't
> have URLs that are structured this way.

OK, how about having them as a fallback to 
eww-{nex,previous,up,top}-url, as Juri mentioned?  From my 
experience these -url functions don't work for most web pages 
either, so adding my functions as a fallback would increase the 
chance that the keys will work in some meaningful way.

-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=====-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTtUpQscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0LQIAQDLUywZCqDDF4Ef95Ll8esIMNpaDK2xAE5g5ywWm9oE
JQD/e95MzVTnCPkRppBtjBI83uyUlgb4LSfEXLk9PDEWIgI=
=RXQk
-----END PGP SIGNATURE-----
--=====-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 11:29:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 10 07:29:10 2021
Received: from localhost ([127.0.0.1]:37101 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOeiU-00084b-Ev
	for submit <at> debbugs.gnu.org; Fri, 10 Sep 2021 07:29:10 -0400
Received: from quimby.gnus.org ([95.216.78.240]:53890)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mOeiT-00084M-HS
 for 50497 <at> debbugs.gnu.org; Fri, 10 Sep 2021 07:29:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=aXWz9xqjX+Ik7OvLt8+APWcos+NraVbrk8TaPUt5e3I=; b=m821Bz5wUOnD31mHK7Jo5Wwdxk
 drZLyg1q0kXUvs5vEYSHnYOhx4VqjIbjg/9lqjZkCv1GqM0MsB2266h3FdHamqFIV2cBnUjAcYlIH
 5hwmoEO9cgitqgsNN6pTtqSRPKjBG8VstM8KTPPXra6tgJQHMDn6/BqWMCKaFKIbXt7g=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mOeiK-0003Dy-JO; Fri, 10 Sep 2021 13:29:03 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
References: <87lf45xh86.fsf@HIDDEN>
Date: Fri, 10 Sep 2021 13:28:59 +0200
In-Reply-To: <87lf45xh86.fsf@HIDDEN> (Yuchen Pei's message of "Fri, 10 Sep
 2021 13:05:45 +1000")
Message-ID: <87ee9wpt38.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Yuchen Pei <hi@HIDDEN> writes: > I often find myself wanting
 to navigate paginated web pages > (e.g.
 <https://media.libreplanet.org/videos?page=4>), 
 or to go up or > all the way up when visiting a web page, which is why I
 added the [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50497
Cc: 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Yuchen Pei <hi@HIDDEN> writes:

> I often find myself wanting to navigate paginated web pages
> (e.g. <https://media.libreplanet.org/videos?page=4>), or to go up or
> all the way up when visiting a web page, which is why I added these
> functions to my eww.
>
> Does this change make sense?  If so I will amend the patch to include
> tests, doc and bug number.

I'm not sure this is general enough to include in eww -- these are
commands that will fail in 99.7% of all web pages, because they don't
have URLs that are structured this way.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 06:58:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 10 02:58:13 2021
Received: from localhost ([127.0.0.1]:36799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOaUH-00029S-3o
	for submit <at> debbugs.gnu.org; Fri, 10 Sep 2021 02:58:13 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:57409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1mOaUE-00029C-Ns
 for 50497 <at> debbugs.gnu.org; Fri, 10 Sep 2021 02:58:11 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.west.internal (Postfix) with ESMTP id C2ADD3200975;
 Fri, 10 Sep 2021 02:58:04 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute3.internal (MEProxy); Fri, 10 Sep 2021 02:58:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=
 references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm2; bh=AA76x8XceA4M8uoiltdGmmyfdx
 OBylZvKeK4MRpHjwY=; b=qpO2tIMXPOhbCxE255/Lr6rfrmGf7lm5q74BuQmLIQ
 1Xhx2XoW6lJFCxvwcr1TKPXSSzJwDEj8XkCTbEY+aj3tL4gA3+ozl9HIRRfpxZt9
 5aFCgeUiT+9OxBkgWgJAlbH6oMPiYKmYyxHq1KqjQ0rWh9RqOe4GQVoV9/uKPcXy
 yOD6AUlnMPlxoYg1jAcw00oT0i4Nf2S6JLrBLxjxgj0Md2g63tcWrT9j+8iSIqwG
 kpsNUU369APO5ASmB/eLkxRvAaZEmQPxxtMZVTbTD9wtO5/W6GBs5+0AoajK10IC
 4jQSeCdP7Mwl4MMw0FnKhBUdYpgsAPQ9mwOyLbNfZl/w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=AA76x8
 XceA4M8uoiltdGmmyfdxOBylZvKeK4MRpHjwY=; b=s6evFzYZGiH5ELTpSrO76l
 3sYB3Qah1FcZFBHUMBKfYDNyY8RJN6ZV7PRjAttU4RnhaN5w92+WvHhZfFeTrf+R
 YoRS6CYpK+SOQ9afGss+vlLqxHJ5W2xzk8uHpw6w4ryX8ZMi/hiWt1NP6qA+RFZy
 sW1KhYsgDc22Vo2X6muQzgyPYhUDaOU3w/nXeixuxSYSfTyGoifI6SUztG3kVig0
 HtRhSUfaHs7WvqBrTiqY+5/K7S3/MMhhdPg7Hf+EnPd/Ym5oTZ/s8x6xKTtjJCHi
 3c51MnvPGfwJq+FaVT1+9eGQmd0NefPj5mqRIfeAsZkb9fhEaUHD0qnJ/UxFarlA
 ==
X-ME-Sender: <xms:_AE7YegDiIUvYR8Xb3VTKlWqrDZbihSQDayDIkYsxY31SgzB0QkJAg>
 <xme:_AE7YfA1QiA-tBTyakRcSMuUU7QM15bHTKpCmnoO4SoijAE2So6oTW4HYI77u3Fif
 OjF2AFI9Lwg9388bA>
X-ME-Received: <xmr:_AE7YWHvRglhClAm1ueZ-XpeNTSeGLvI3m_jkWfPEhT66WM7a9svrpylB1wP4KxP9g_5s4z258kw-9qGUQq3rENlhjy5pNs9LxM7>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegtddgudduudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpehffgfhvffujgffkfggtgesghdtreertdertdenucfhrhhomhepjghutghh
 vghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpeduteegge
 dtgfelfeeitdffvefgvdetveekffehvdetgeetteevjeefteevfefhveenucffohhmrghi
 nheplhhisghrvghplhgrnhgvthdrohhrghdphihpvghirdhmvgenucevlhhushhtvghruf
 hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghirdhmvg
X-ME-Proxy: <xmx:_AE7YXR-lL4P8Y_xMxSABxPQYEmdxLGB5VJJi2XR5YcO7cKYfxmMNQ>
 <xmx:_AE7YbzTCfZiuUj3v9l4uQDv8ByKKXCb1XJvDo_5XlqiHEfpzfA9vA>
 <xmx:_AE7YV6roFDDUTH6UWQBgFcICoNzeFMdny4NSVImqiaGPhb8cISo1g>
 <xmx:_AE7YZY3JEFhOfyyXSetIgC54_9SVSpGf-Mi5ChHf2vy6cE1g_bWcA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 10 Sep 2021 02:58:02 -0400 (EDT)
References: <87lf45xh86.fsf@HIDDEN> <877dfp53zm.fsf@HIDDEN>
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
In-reply-to: <877dfp53zm.fsf@HIDDEN>
Date: Fri, 10 Sep 2021 16:57:58 +1000
Message-ID: <87fsucyl1l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=====-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50497
Cc: 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=====-=-=
Content-Type: text/plain; format=flowed


Juri Linkov <juri@HIDDEN> writes:

>> I often find myself wanting to navigate paginated web pages
>> (e.g. <https://media.libreplanet.org/videos?page=4>), or to go 
>> up or all
>> the way up when visiting a web page, which is why I added these 
>> functions
>> to my eww.
>>
>> Does this change make sense?
>
> This reminds a very useful Firefox add-on "Go Up" that lets you 
> go up
> a level to the parent directory on the current website by 
> pressing
> Alt+UpArrow, and some other add-ons I don't remember their 
> names.
>
>> +    (define-key map "N" 'eww-next-path)
>> +    (define-key map "P" 'eww-previous-path)
>> +    (define-key map "U" 'eww-up-path)
>> +    (define-key map "T" 'eww-top-path)
>
> Would it be possible to combine this feature with the existing
>
>     (define-key map "n" 'eww-next-url)
>     (define-key map "p" 'eww-previous-url)
>     (define-key map "u" 'eww-up-url)
>     (define-key map "t" 'eww-top-url)
>
> that rely on special attributes.  I mean to install your new 
> commands.
> Then later add fallbacks to both sets of commands: if there is
> no special attribute, then "n"/"p"/"u"/"t" could try to deduce 
> the
> page from URL by calling your new commands, instead of signaling
> an error as they do currently by (user-error "No `next' on this 
> page").

This sounds good to me, if it does not break people's workflows.

> And vice versa: if your commands don't match a number in the 
> URL, then
> fall back to "n"/"p"/"u"/"t", maybe optionally.

I think the previous fallback should be sufficient, and I feel a 
"mutual" fallback like this could be confusing.

-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=====-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTsB9gscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0GJcAP4hKfUiy8f4JYWvZrm8Ju3HyksQ/0PMayGHPEK393kM
bgEAq8ULjiJMdVC/GwhIh3eucK4rbFPib4C9oyKxCnwDhAg=
=no3I
-----END PGP SIGNATURE-----
--=====-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at 50497 <at> debbugs.gnu.org:


Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 06:44:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 10 02:44:41 2021
Received: from localhost ([127.0.0.1]:36731 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOaHB-0001jm-O0
	for submit <at> debbugs.gnu.org; Fri, 10 Sep 2021 02:44:41 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mOaHA-0001jJ-Lp
 for 50497 <at> debbugs.gnu.org; Fri, 10 Sep 2021 02:44:41 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 7993824000E;
 Fri, 10 Sep 2021 06:44:32 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Organization: LINKOV.NET
References: <87lf45xh86.fsf@HIDDEN>
Date: Fri, 10 Sep 2021 09:43:09 +0300
In-Reply-To: <87lf45xh86.fsf@HIDDEN> (Yuchen Pei's message of "Fri, 10 Sep
 2021 13:05:45 +1000")
Message-ID: <877dfp53zm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50497
Cc: 50497 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> I often find myself wanting to navigate paginated web pages
> (e.g. <https://media.libreplanet.org/videos?page=4>), or to go up or all
> the way up when visiting a web page, which is why I added these functions
> to my eww.
>
> Does this change make sense?

This reminds a very useful Firefox add-on "Go Up" that lets you go up
a level to the parent directory on the current website by pressing
Alt+UpArrow, and some other add-ons I don't remember their names.

> +    (define-key map "N" 'eww-next-path)
> +    (define-key map "P" 'eww-previous-path)
> +    (define-key map "U" 'eww-up-path)
> +    (define-key map "T" 'eww-top-path)

Would it be possible to combine this feature with the existing

    (define-key map "n" 'eww-next-url)
    (define-key map "p" 'eww-previous-url)
    (define-key map "u" 'eww-up-url)
    (define-key map "t" 'eww-top-url)

that rely on special attributes.  I mean to install your new commands.
Then later add fallbacks to both sets of commands: if there is
no special attribute, then "n"/"p"/"u"/"t" could try to deduce the
page from URL by calling your new commands, instead of signaling
an error as they do currently by (user-error "No `next' on this page").
And vice versa: if your commands don't match a number in the URL, then
fall back to "n"/"p"/"u"/"t", maybe optionally.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Sep 2021 03:05:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 09 23:05:57 2021
Received: from localhost ([127.0.0.1]:36566 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOWrU-0004ZC-JR
	for submit <at> debbugs.gnu.org; Thu, 09 Sep 2021 23:05:56 -0400
Received: from lists.gnu.org ([209.51.188.17]:43966)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1mOWrT-0004Z4-48
 for submit <at> debbugs.gnu.org; Thu, 09 Sep 2021 23:05:55 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48762)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hi@HIDDEN>) id 1mOWrS-00024T-VT
 for bug-gnu-emacs@HIDDEN; Thu, 09 Sep 2021 23:05:54 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38495)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hi@HIDDEN>) id 1mOWrR-0003jN-4B
 for bug-gnu-emacs@HIDDEN; Thu, 09 Sep 2021 23:05:54 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 372175C010A
 for <bug-gnu-emacs@HIDDEN>; Thu,  9 Sep 2021 23:05:52 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Thu, 09 Sep 2021 23:05:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=from
 :to:subject:date:message-id:mime-version:content-type; s=fm2;
 bh=Zv4VJI6RUB8gj1sN4/7WXdqiFkp7Zu3f9YLwE3jsT2g=; b=cHR1wq9/XewQ
 zadIZtIBHaaJ8qRpUVZ59eO+O0kbQEsS3mYR2HwPMuKzCn9RffMzKBZ6h1r+aWDm
 Vkyhz9m6sgmv9+YwQdwrUxdsFW+0v9ZWw2Elaexumscuyt9XZkv/GoFr21nBf1VD
 F6ajYvGgO849i+hadswOkmzMHn2AdajtAcONS9xZhNZLdH+Nt1fFCEpCOq98NYkc
 //ZdWINJ+IlOkhXY1H7170sSN/fylEkZGS+Oj6nxiyFD9effKWRp6IMUyeTx1Hzq
 SxBMJVHCCrYgJLqg+NxBJLC0uXxqhIAhxwVzt44wWxLvdVR9JdbzCqGujCYWocAR
 cVVXwHf3Ug==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; bh=Zv4VJI6RUB8gj1sN4/7WXdqiFkp7Z
 u3f9YLwE3jsT2g=; b=DYO0RQRGoGYWBj+anq8N0RRMKOo+CqGyIreHlm1YZgU1k
 QGpanCtut/nmYJrrx+eA9Wnb7Rii3EQgwHzNOfQ6SkwlhJcuvxlBZn/nZIHCp20b
 CTt62cO2hwcXgIqQJJPLH73IL3kez9GtbOuH1O5x6VnaHUStYkpg+pA9kX+vQaff
 s2qit6U5FwXwMTOudXV9/rPr60qSjsBXuRfwzSwUa8JS0ubOk/+vezr5hWnRO6co
 Wnnn+jU8XgXzlFTtkAGwzFID+oqdlAJFzBUOEqwjWVi8U/fYTf2cqHvjv5LxADBy
 +LS3XM4JT4HbRmcjhTJygyNDxgsyzi5hmlcVgX3+A==
X-ME-Sender: <xms:j8s6YRqtdZj5ToKF-bRs5i9lz952R1LwPRvQ6-1c4pKLpmU13L9aJg>
 <xme:j8s6YTosjgtZ-bBUxRWzdkCDpMS6k5RstMTsVp_z0bAcFg-xk2--RsVhb5pN4zYFh
 jKDbEZYR7cZdVP4Hw>
X-ME-Received: <xmr:j8s6YeNIHbAbLyLbt6cWAvslmahx6x5451V9eSFdpmzg1EyzpnKaJ0onZwc_f1LDkZFDCVulfSORva0lcRVgLw-68F-1HU4zFL3m>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegtddgieegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesghdtreertd
 ertdenucfhrhhomhepjghutghhvghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucgg
 tffrrghtthgvrhhnpeetvdfgieefheekheekkeduieeflefhtdfhveeiieevleeviefhve
 ejteeuffetieenucffohhmrghinheplhhisghrvghplhgrnhgvthdrohhrghenucevlhhu
 shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghird
 hmvg
X-ME-Proxy: <xmx:j8s6Yc5mG5w_oebVCLG4MdWz2BcXx9NK3kHbOVOOocphB5E_X1SMCA>
 <xmx:j8s6YQ6eM7zLUm_JsP1DpaqPoAiXUE69EXsW6jQ8RFAp0rHQ-5AcoQ>
 <xmx:j8s6YUh8ydtjgkqm4uQUT_4JqTBwmK-F-HuhUSIGPzbOLo2rOYQa6w>
 <xmx:kMs6YVXs8aRNSIHz9zmUbMrTa-wxrSg-ZXw2XA8IVJrSGE4AXQnAyQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Thu, 9 Sep 2021 23:05:50 -0400 (EDT)
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Subject: [PATCH] Adding eww-{next,previous,up,top}-path.
Date: Fri, 10 Sep 2021 13:05:45 +1000
Message-ID: <87lf45xh86.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="======-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
Received-SPF: pass client-ip=66.111.4.27; envelope-from=hi@HIDDEN;
 helo=out3-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--======-=-=
Content-Type: multipart/mixed; boundary="=====-=-="

--=====-=-=
Content-Type: text/plain; format=flowed

I often find myself wanting to navigate paginated web pages 
(e.g. <https://media.libreplanet.org/videos?page=4>), or to go up 
or all the way up when visiting a web page, which is why I added 
these functions to my eww.

Does this change make sense?  If so I will amend the patch to 
include tests, doc and bug number.

Note that there seem to be currently no tests for eww, so I will 
need to create a new file.

BTW a newbie question: CONTRIBUTE mentions the commit message 
should include bug number, but when I send a patch like this a bug 
number is only generated afterwards.  Does this mean I should 
report a bug, wait for the item to be created in debbugs, before 
sending a patch for the bug?

Thanks.


--=====-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Add-eww-next-previous-up-top-path.patch
Content-Transfer-Encoding: quoted-printable

From=208abc291f6fb9bd85c51fd1b0b7f6dce044b231a5 Mon Sep 17 00:00:00 2001
From: Yuchen Pei <hi@HIDDEN>
Date: Fri, 10 Sep 2021 12:41:49 +1000
Subject: [PATCH] Add eww-{next,previous,up,top}-path.

Similar to eww-{next,previous,up,top}-url, but working based on the
url path rather than the rel attribute.

* lisp/net/eww.el (eww-next-path, eww-previous-path, eww-up-path,
eww-top-path).
* doc/misc/eww.texi TODO.
* test/lisp/net/eww-tests.el TODO.
=2D--
 lisp/net/eww.el | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 90301e92ac..ded01f97e8 100644
=2D-- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -974,6 +974,10 @@ eww-mode-map
     (define-key map "p" 'eww-previous-url)
     (define-key map "u" 'eww-up-url)
     (define-key map "t" 'eww-top-url)
+    (define-key map "N" 'eww-next-path)
+    (define-key map "P" 'eww-previous-path)
+    (define-key map "U" 'eww-up-path)
+    (define-key map "T" 'eww-top-path)
     (define-key map "&" 'eww-browse-with-external-browser)
     (define-key map "d" 'eww-download)
     (define-key map "w" 'eww-copy-page-url)
@@ -1194,6 +1198,50 @@ eww-top-url
 	(eww-browse-url (shr-expand-url best-url (plist-get eww-data :url)))
       (user-error "No `top' for this page"))))
=20
+(defun eww-next-path ()
+  "Go to the `next' page according to the url path.
+The url of the `next' page is generated by incrementing the last
+number in the path."
+  (interactive)
+  (let ((url (plist-get eww-data :url)))
+    (when (string-match "^\\(.*?\\)\\([0-9]+\\)\\(.*\\)$" url)
+      (eww (concat
+	    (match-string 1 url)
+	    (number-to-string
+	     (1+ (string-to-number (match-string 2 url))))
+	    (match-string 3 url))))))
+
+(defun eww-previous-path ()
+  "Go to the `previous' page according to the url path.
+The url of the `previous' page is generated by decrementing the
+last integer in the path."
+  (interactive)
+  (let ((url (plist-get eww-data :url)))
+    (when (string-match "^\\(.*\\)\\([0-9]+\\)\\(.*\\)$" url)
+      (eww (concat
+	    (match-string 1 url)
+	    (number-to-string
+	     (1- (string-to-number (match-string 2 url))))
+	    (match-string 3 url))))))
+
+(defun eww-up-path ()
+  "Go to the `parent' page according to the url path.
+The url of the `parent' page is generated by removing the last
+segment delimited by a forward slash."
+  (interactive)
+  (let ((url (plist-get eww-data :url)))
+    (when (and (string-match "^\\(.*//.*/\\)[^/]+\\(/\\)?$" url)
+	       (match-string 1 url))
+      (eww (match-string 1 url)))))
+
+(defun eww-top-path ()
+  "Go to the domain."
+  (interactive)
+  (let ((url (plist-get eww-data :url)))
+    (when (and (string-match "^\\(.*//.*?/\\).*$" url)
+	       (match-string 1 url))
+      (eww (match-string 1 url)))))
+
 (defun eww-reload (&optional local encode)
   "Reload the current page.
 If LOCAL is non-nil (interactively, the command was invoked with
=2D-=20
2.33.0


--=====-=-=
Content-Type: text/plain; format=flowed


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=====-=-=--

--======-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTrLigscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0BH1AP9+ptTX5WZpHdBwirY1rKZwl2Hp3EqhuECiNUeLdXe0
egD+Joi7xds0+gWEKWClwEjxAGKyWIlrE4UMrFoNxf2pcQs=
=j3LK
-----END PGP SIGNATURE-----
--======-=-=--




Acknowledgement sent to Yuchen Pei <hi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50497; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 21 Sep 2021 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.