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

Previous Next

Package: emacs;

Reported by: Yuchen Pei <hi <at> ypei.me>

Date: Fri, 10 Sep 2021 03:06:02 UTC

Severity: wishlist

Tags: patch, wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Yuchen Pei <hi <at> ypei.me>
To: Juri Linkov <juri <at> linkov.net>
Cc: 50497 <at> debbugs.gnu.org
Subject: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Date: Fri, 10 Sep 2021 16:57:58 +1000
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> linkov.net> 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>
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 276 days ago.

Previous Next


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