From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuchen Pei Newsgroups: gmane.emacs.bugs Subject: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path. Date: Fri, 10 Sep 2021 16:57:58 +1000 Message-ID: <87fsucyl1l.fsf@ypei.me> References: <87lf45xh86.fsf@ypei.me> <877dfp53zm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=====-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23999"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 27.2 Cc: 50497@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 10 09:00:15 2021 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 1mOaWE-0005yy-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 09:00:15 +0200 Original-Received: from localhost ([::1]:36220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOaWD-0000bq-5l for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 03:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOaV3-0007ku-R8 for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 02:59:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOaV3-0006R6-Jo for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 02:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOaV3-0002AY-J5 for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 02:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Sep 2021 06:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50497 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50497-submit@debbugs.gnu.org id=B50497.16312570938278 (code B ref 50497); Fri, 10 Sep 2021 06:59:01 +0000 Original-Received: (at 50497) by debbugs.gnu.org; 10 Sep 2021 06:58:13 +0000 Original-Received: from localhost ([127.0.0.1]:36799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOaUH-00029S-3o for submit@debbugs.gnu.org; Fri, 10 Sep 2021 02:58:13 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:57409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOaUE-00029C-Ns for 50497@debbugs.gnu.org; Fri, 10 Sep 2021 02:58:11 -0400 Original-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) Original-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: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegtddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffujgffkfggtgesghdtreertdertdenucfhrhhomhepjghutghh vghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpeduteegge dtgfelfeeitdffvefgvdetveekffehvdetgeetteevjeefteevfefhveenucffohhmrghi nheplhhisghrvghplhgrnhgvthdrohhrghdphihpvghirdhmvgenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Sep 2021 02:58:02 -0400 (EDT) In-reply-to: <877dfp53zm.fsf@mail.linkov.net> 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" Xref: news.gmane.io gmane.emacs.bugs:213971 Archived-At: --=====-=-= Content-Type: text/plain; format=flowed Juri Linkov writes: >> I often find myself wanting to navigate paginated web pages >> (e.g. ), 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 --=====-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTsB9gscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0GJcAP4hKfUiy8f4JYWvZrm8Ju3HyksQ/0PMayGHPEK393kM bgEAq8ULjiJMdVC/GwhIh3eucK4rbFPib4C9oyKxCnwDhAg= =no3I -----END PGP SIGNATURE----- --=====-=-=--