GNU bug report logs - #50500
Add ways to copy id bookmark link in eww

Previous Next

Package: emacs;

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

Date: Fri, 10 Sep 2021 06:44:01 UTC

Severity: wishlist

Tags: wontfix

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50500 in the body.
You can then email your comments to 50500 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Fri, 10 Sep 2021 06:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yuchen Pei <hi <at> ypei.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Sep 2021 06:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Yuchen Pei <hi <at> ypei.me>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: Add ways to copy id bookmark link in eww
Date: Fri, 10 Sep 2021 16:43:40 +1000
[Message part 1 (text/plain, inline)]
Hello,

I'd like to add a functionality to copy the bookmark link to the 
kill ring when the point is on a element with an id attribute.

For example, say I am reading 
<http://www.gnu.org/licenses/gpl-3.0.html>, and Section 13 looks 
interesting which I want to save for reference.  By calling the 
said function while the point is at Section 13, the link 
<http://www.gnu.org/licenses/gpl-3.0.html#section13> is added to 
the kill ring.

I imagine it makes sense to bind it to w when the point is not on 
a link.

I took a look at eww.el and shr.el and I'm not sure where to start 
to add this functionality.  Does anyone have any pointers?

-- 
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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Fri, 10 Sep 2021 11:16:01 GMT) Full text and rfc822 format available.

Message #8 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Fri, 10 Sep 2021 13:15:40 +0200
Yuchen Pei <hi <at> ypei.me> writes:

> I'd like to add a functionality to copy the bookmark link to the kill
> ring when the point is on a element with an id attribute.
>
> For example, say I am reading
> <http://www.gnu.org/licenses/gpl-3.0.html>, and Section 13 looks
> interesting which I want to save for reference.  By calling the said
> function while the point is at Section 13, the link
> <http://www.gnu.org/licenses/gpl-3.0.html#section13> is added to the
> kill ring.

Well, people put ids on all kinds of elements, but they're not generally
meant to be used for navigation.  (I mean, sometimes they are, but
statistically speaking, they're not.)

So I'm not sure that `w' in general should be doing this in eww.
Anybody else got an opinion?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Fri, 10 Sep 2021 13:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Yuchen Pei <hi <at> ypei.me>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Fri, 10 Sep 2021 23:03:42 +1000
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Yuchen Pei <hi <at> ypei.me> writes:
>
>> I'd like to add a functionality to copy the bookmark link to 
>> the kill
>> ring when the point is on a element with an id attribute.
>>
>> For example, say I am reading
>> <http://www.gnu.org/licenses/gpl-3.0.html>, and Section 13 
>> looks
>> interesting which I want to save for reference.  By calling the 
>> said
>> function while the point is at Section 13, the link
>> <http://www.gnu.org/licenses/gpl-3.0.html#section13> is added 
>> to the
>> kill ring.
>
> Well, people put ids on all kinds of elements, but they're not 
> generally
> meant to be used for navigation.  (I mean, sometimes they are, 
> but
> statistically speaking, they're not.)
>
> So I'm not sure that `w' in general should be doing this in eww.
> Anybody else got an opinion?

Makes sense.  How about adding it as a customization variable, so 
that one can customize whether `w` also includes the id bookmark 
part and by default it does not.  It is often useful to save more 
precise positions in web page documents.

-- 
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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Fri, 10 Sep 2021 16:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Yuchen Pei <hi <at> ypei.me>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Fri, 10 Sep 2021 19:08:44 +0300
>> Well, people put ids on all kinds of elements, but they're not generally
>> meant to be used for navigation.  (I mean, sometimes they are, but
>> statistically speaking, they're not.)
>>
>> So I'm not sure that `w' in general should be doing this in eww.
>> Anybody else got an opinion?
>
> Makes sense.  How about adding it as a customization variable, so that one
> can customize whether `w` also includes the id bookmark part and by default
> it does not.  It is often useful to save more precise positions in web
> page documents.

The problem is that "id" from such HTML:

  <h5 id="section13">13. Use with the GNU Affero General Public License.</h5>

is not rendered on UI, so the user doesn't know that here is some "id"
available for bookmarking.  But, for example, github.com for the sections
of the README.org file with ids displays visual indication that looks like
a chain icon on the left.  If eww will support some visual indication about
ids used on the page like github does, then it will make sense also to
include the displayed id to the copied link.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Sat, 11 Sep 2021 12:29:01 GMT) Full text and rfc822 format available.

Message #17 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: Yuchen Pei <hi <at> ypei.me>, 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Sat, 11 Sep 2021 14:28:30 +0200
Juri Linkov <juri <at> linkov.net> writes:

> The problem is that "id" from such HTML:
>
>   <h5 id="section13">13. Use with the GNU Affero General Public License.</h5>
>
> is not rendered on UI, so the user doesn't know that here is some "id"
> available for bookmarking.  But, for example, github.com for the sections
> of the README.org file with ids displays visual indication that looks like
> a chain icon on the left.  If eww will support some visual indication about
> ids used on the page like github does, then it will make sense also to
> include the displayed id to the copied link.

I'm not sure I understand -- do you want eww to have a visual indicator
on all HTML elements that have an id?  That would be ... weird and ugly,
I think?  Github doesn't display anything in particular on elements with
ids per se -- they do display a link icon on sections, and the sections
have ids, but that's because they generated the HTML that way.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Sat, 11 Sep 2021 12:35:02 GMT) Full text and rfc822 format available.

Message #20 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Sat, 11 Sep 2021 14:34:28 +0200
Yuchen Pei <hi <at> ypei.me> writes:

> Makes sense.  How about adding it as a customization variable, so that
> one can customize whether `w` also includes the id bookmark part and
> by default it does not.  It is often useful to save more precise
> positions in web page documents.

Hm...  I think it would vary whether a user would want to do this or
not.  Hm...  Perhaps a `C-u' to `eww-copy-page-url' could make the
command do this?

I don't think any other web browsers offer to make links to random id'd
elements in the DOM, do they?  id's aren't displayed visually -- they're
an internal DOM thing, so the user has no idea whether an element has an
id, or whether that id has a semantic meaning or not (they're usually
just put on elements so that they can be manipulated from Javascript).

So I'm sceptical that this would be useful in practice.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Sat, 11 Sep 2021 19:21:02 GMT) Full text and rfc822 format available.

Message #23 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Yuchen Pei <hi <at> ypei.me>, 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Sat, 11 Sep 2021 22:06:04 +0300
>> The problem is that "id" from such HTML:
>>
>>   <h5 id="section13">13. Use with the GNU Affero General Public License.</h5>
>>
>> is not rendered on UI, so the user doesn't know that here is some "id"
>> available for bookmarking.  But, for example, github.com for the sections
>> of the README.org file with ids displays visual indication that looks like
>> a chain icon on the left.  If eww will support some visual indication about
>> ids used on the page like github does, then it will make sense also to
>> include the displayed id to the copied link.
>
> I'm not sure I understand -- do you want eww to have a visual indicator
> on all HTML elements that have an id?  That would be ... weird and ugly,
> I think?  Github doesn't display anything in particular on elements with
> ids per se -- they do display a link icon on sections, and the sections
> have ids, but that's because they generated the HTML that way.

That's why I said "*IF* eww will support some visual indication" :-)
But I don't think such visual distraction would be appreciated by users.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50500; Package emacs. (Thu, 25 Aug 2022 14:51:02 GMT) Full text and rfc822 format available.

Message #26 received at 50500 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: Yuchen Pei <hi <at> ypei.me>, 50500 <at> debbugs.gnu.org
Subject: Re: bug#50500: Add ways to copy id bookmark link in eww
Date: Thu, 25 Aug 2022 16:49:50 +0200
Juri Linkov <juri <at> linkov.net> writes:

> That's why I said "*IF* eww will support some visual indication" :-)
> But I don't think such visual distraction would be appreciated by users.

Me neither.  And without such a display, then users have no idea where
the IDs are, which makes copying the #id when hitting `w' odd.
(Especially since we for reasons of efficiency only put the id text
properties on the first character of the element that has an id, it'd be
pretty random what you get.)

So all in all, I don't think this is something we want to add, and I'm
therefore closing this bug report.




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 25 Aug 2022 14:51:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 50500 <at> debbugs.gnu.org and Yuchen Pei <hi <at> ypei.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 25 Aug 2022 14:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Sep 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 214 days ago.

Previous Next


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