unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25096: shr: Add a customizable face for links after being clicked
@ 2016-12-02 19:01 Hong Xu
  2016-12-02 19:13 ` Drew Adams
  2017-01-24 20:27 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Hong Xu @ 2016-12-02 19:01 UTC (permalink / raw)
  To: 25096


It is often confusing that after clicking on a link to visit it in an
external browser, you are not really sure whether it has been really
clicked. Browsers such as Firefox use a dashed box to indicate that. It
would be nice if shr also supports this feature.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-02 19:01 bug#25096: shr: Add a customizable face for links after being clicked Hong Xu
@ 2016-12-02 19:13 ` Drew Adams
  2016-12-02 21:27   ` Hong Xu
  2017-01-24 20:27 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-12-02 19:13 UTC (permalink / raw)
  To: Hong Xu, 25096

> It is often confusing that after clicking on a link to visit it in
> an external browser, you are not really sure whether it has been really
> clicked. Browsers such as Firefox use a dashed box to indicate that.
> It would be nice if shr also supports this feature.

Where do you see such links, in Emacs?

There is already face `link-visited', which is for visited links,
as opposed to face `link', which is for unvisited links.

And in Info, there is face `info-xref-visited', which is for visited
links, as opposed to `info-xref', which is for unvisited links.

For another context, Emacs could do something similar.  What is
the face you see now, for the links you are interested in?  Is it
`link'? `custom-link'?

No doubt it is the context (mode) where you are clicking the link
that needs to DTRT: use a visited-link face after you use a link.
What is that context?






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-02 19:13 ` Drew Adams
@ 2016-12-02 21:27   ` Hong Xu
  2016-12-03  0:02     ` Drew Adams
  0 siblings, 1 reply; 14+ messages in thread
From: Hong Xu @ 2016-12-02 21:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25096

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]


On 2016-12-02 Fri 11:13 GMT-0800, Drew Adams <drew.adams@oracle.com> wrote:

>> It is often confusing that after clicking on a link to visit it in
>> an external browser, you are not really sure whether it has been really
>> clicked. Browsers such as Firefox use a dashed box to indicate that.
>> It would be nice if shr also supports this feature.
>
> Where do you see such links, in Emacs?
>
> There is already face `link-visited', which is for visited links,
> as opposed to face `link', which is for unvisited links.
>
> And in Info, there is face `info-xref-visited', which is for visited
> links, as opposed to `info-xref', which is for unvisited links.
>
> For another context, Emacs could do something similar.  What is
> the face you see now, for the links you are interested in?  Is it
> `link'? `custom-link'?
>
> No doubt it is the context (mode) where you are clicking the link
> that needs to DTRT: use a visited-link face after you use a link.
> What is that context?

Sorry for the confusion. I'm talking about it in eww.

Also, I'm not talking about a "visited-link" -- it is really about
indication that a link was just successfully clicked. For example, in
eww, visit an arbitrary page and move point to an arbitrary link and
then press '&' (eww-browse-with-external-browser). There is no
indication that the command has been executed. Even a dashed box lasting
a few seconds on the clicked URL would help a lot.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-02 21:27   ` Hong Xu
@ 2016-12-03  0:02     ` Drew Adams
  2016-12-03  3:42       ` Clément Pit--Claudel
  0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-12-03  0:02 UTC (permalink / raw)
  To: Hong Xu; +Cc: 25096

> Sorry for the confusion. I'm talking about it in eww.
> 
> Also, I'm not talking about a "visited-link" -- it is really about
> indication that a link was just successfully clicked. For example,
> in eww, visit an arbitrary page and move point to an arbitrary link and
> then press '&' (eww-browse-with-external-browser). There is no
> indication that the command has been executed. Even a dashed box
> lasting a few seconds on the clicked URL would help a lot.

So it's an EWW enhancement request.

An ephemeral box won't tell you later that you already visited
that URL in an external browser.

You could also have 3 faces for having used the link:

1. For having visited its destination in EWW.
2. For having visited its destination in an external browser.
3. For having visited its destination in both.

#1 could use a foreground color.  #2 could use an outline box.
#3 could use both.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-03  0:02     ` Drew Adams
@ 2016-12-03  3:42       ` Clément Pit--Claudel
  2016-12-03 15:41         ` Drew Adams
  0 siblings, 1 reply; 14+ messages in thread
From: Clément Pit--Claudel @ 2016-12-03  3:42 UTC (permalink / raw)
  To: 25096


[-- Attachment #1.1: Type: text/plain, Size: 1459 bytes --]

On 2016-12-02 19:02, Drew Adams wrote:
>> Sorry for the confusion. I'm talking about it in eww.
>>
>> Also, I'm not talking about a "visited-link" -- it is really about
>> indication that a link was just successfully clicked. For example,
>> in eww, visit an arbitrary page and move point to an arbitrary link and
>> then press '&' (eww-browse-with-external-browser). There is no
>> indication that the command has been executed. Even a dashed box
>> lasting a few seconds on the clicked URL would help a lot.
> 
> So it's an EWW enhancement request.
> 
> An ephemeral box won't tell you later that you already visited
> that URL in an external browser.
> 
> You could also have 3 faces for having used the link:
> 
> 1. For having visited its destination in EWW.
> 2. For having visited its destination in an external browser.
> 3. For having visited its destination in both.
> 
> #1 could use a foreground color.  #2 could use an outline box.
> #3 could use both.

Drew, I think there's some lingering confusion here.  Try pressing the left mouse button down on a link in Firefox, and keeping it pressed down.  Notice how Firefox displays a dotted box around the link.  This is indeed a eww enhancement request, but I don't think it's specific to external browsers; it's just about indicating that a link has been clicked in the time interval from the click to the point when the next page replaces the current one. 

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-03  3:42       ` Clément Pit--Claudel
@ 2016-12-03 15:41         ` Drew Adams
  2016-12-03 16:30           ` Clément Pit--Claudel
  0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-12-03 15:41 UTC (permalink / raw)
  To: Clément Pit--Claudel, 25096

> > An ephemeral box won't tell you later that you already visited
> > that URL in an external browser.
> >
> > You could also have 3 faces for having used the link:
> >
> > 1. For having visited its destination in EWW.
> > 2. For having visited its destination in an external browser.
> > 3. For having visited its destination in both.
> >
> > #1 could use a foreground color.  #2 could use an outline box.
> > #3 could use both.
> 
> Drew, I think there's some lingering confusion here.  Try pressing
> the left mouse button down on a link in Firefox, and keeping it
> pressed down.  Notice how Firefox displays a dotted box around the
> link.  This is indeed a eww enhancement request, but I don't think
> it's specific to external browsers; it's just about indicating that
> a link has been clicked in the time interval from the click to the
> point when the next page replaces the current one.

I see.  Apologies for not correctly understanding what the
request is.

In that case, I'd suggest that the subject line is misleading
or inaccurate.  It says clearly (?) that it is about the
_face_ for the link _after_ it has been clicked.

If it is instead about having some visual indication, _while_
it is clicked (e.g., mouse-down), that the link _is being_
clicked, then you might want to retitle the request.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-03 15:41         ` Drew Adams
@ 2016-12-03 16:30           ` Clément Pit--Claudel
  0 siblings, 0 replies; 14+ messages in thread
From: Clément Pit--Claudel @ 2016-12-03 16:30 UTC (permalink / raw)
  To: Drew Adams, 25096


[-- Attachment #1.1: Type: text/plain, Size: 557 bytes --]

On 2016-12-03 10:41, Drew Adams wrote:
> In that case, I'd suggest that the subject line is misleading
> or inaccurate.  It says clearly (?) that it is about the
> _face_ for the link _after_ it has been clicked.
> 
> If it is instead about having some visual indication, _while_
> it is clicked (e.g., mouse-down), that the link _is being_
> clicked, then you might want to retitle the request.

In Firefox, that dotted box highlighting actually persists after the mouse button is released: it lasts until the next page has been displayed.




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2016-12-02 19:01 bug#25096: shr: Add a customizable face for links after being clicked Hong Xu
  2016-12-02 19:13 ` Drew Adams
@ 2017-01-24 20:27 ` Lars Ingebrigtsen
  2017-01-24 21:39   ` Hong Xu
  1 sibling, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-24 20:27 UTC (permalink / raw)
  To: Hong Xu; +Cc: 25096

Hong Xu <hong@topbug.net> writes:

> It is often confusing that after clicking on a link to visit it in an
> external browser, you are not really sure whether it has been really
> clicked. Browsers such as Firefox use a dashed box to indicate that. It
> would be nice if shr also supports this feature.

Yes, perhaps.  But doesn't the external browser pop up immediately?
Does this have to be reflected visually in Emacs?

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2017-01-24 20:27 ` Lars Ingebrigtsen
@ 2017-01-24 21:39   ` Hong Xu
  2017-01-24 21:44     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Hong Xu @ 2017-01-24 21:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25096

On 01/24/2017 12:27 PM, Lars Ingebrigtsen wrote:
> Hong Xu <hong@topbug.net> writes:
> 
>> It is often confusing that after clicking on a link to visit it in an
>> external browser, you are not really sure whether it has been really
>> clicked. Browsers such as Firefox use a dashed box to indicate that. It
>> would be nice if shr also supports this feature.
> 
> Yes, perhaps.  But doesn't the external browser pop up immediately?
> Does this have to be reflected visually in Emacs?
> 

If you have firefox in a different workspace, you may not be aware that
a new tab has been opened there.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2017-01-24 21:39   ` Hong Xu
@ 2017-01-24 21:44     ` Lars Ingebrigtsen
  2017-01-25  3:12       ` Hong Xu
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-24 21:44 UTC (permalink / raw)
  To: Hong Xu; +Cc: 25096

Hong Xu <hong@topbug.net> writes:

> On 01/24/2017 12:27 PM, Lars Ingebrigtsen wrote:
>> Hong Xu <hong@topbug.net> writes:
>> 
>>> It is often confusing that after clicking on a link to visit it in an
>>> external browser, you are not really sure whether it has been really
>>> clicked. Browsers such as Firefox use a dashed box to indicate that. It
>>> would be nice if shr also supports this feature.
>> 
>> Yes, perhaps.  But doesn't the external browser pop up immediately?
>> Does this have to be reflected visually in Emacs?
>
> If you have firefox in a different workspace, you may not be aware that
> a new tab has been opened there.

True...  how would you like the marking to be done?  A stippled box
around the link is possible in Emacs, I think.  It might move the text
slightly, though (one pixel down, to be precise), so it might be
disturbing.

Hm...  Altering the colour instead, perhaps?  And should this marking
disappear after a while?  I think that might make sense.

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2017-01-24 21:44     ` Lars Ingebrigtsen
@ 2017-01-25  3:12       ` Hong Xu
  2018-04-13 12:18         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Hong Xu @ 2017-01-25  3:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25096

On 01/24/2017 01:44 PM, Lars Ingebrigtsen wrote:
> Hong Xu <hong@topbug.net> writes:
> 
>> On 01/24/2017 12:27 PM, Lars Ingebrigtsen wrote:
>>> Hong Xu <hong@topbug.net> writes:
>>>
>>>> It is often confusing that after clicking on a link to visit it in an
>>>> external browser, you are not really sure whether it has been really
>>>> clicked. Browsers such as Firefox use a dashed box to indicate that. It
>>>> would be nice if shr also supports this feature.
>>>
>>> Yes, perhaps.  But doesn't the external browser pop up immediately?
>>> Does this have to be reflected visually in Emacs?
>>
>> If you have firefox in a different workspace, you may not be aware that
>> a new tab has been opened there.
> 
> True...  how would you like the marking to be done?  A stippled box
> around the link is possible in Emacs, I think.  It might move the text
> slightly, though (one pixel down, to be precise), so it might be
> disturbing.
> 
> Hm...  Altering the colour instead, perhaps?  And should this marking
> disappear after a while?  I think that might make sense.
> 

Yes, a temporary color change makes sense.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2017-01-25  3:12       ` Hong Xu
@ 2018-04-13 12:18         ` Lars Ingebrigtsen
  2018-04-13 13:49           ` Basil L. Contovounesios
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-13 12:18 UTC (permalink / raw)
  To: Hong Xu; +Cc: 25096

Hong Xu <hong@topbug.net> writes:

>> Hm...  Altering the colour instead, perhaps?  And should this marking
>> disappear after a while?  I think that might make sense.
>> 
>
> Yes, a temporary color change makes sense.

I've now implemented this in Emacs 27.1.

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2018-04-13 12:18         ` Lars Ingebrigtsen
@ 2018-04-13 13:49           ` Basil L. Contovounesios
  2018-04-13 14:48             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Basil L. Contovounesios @ 2018-04-13 13:49 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Hong Xu, 25096

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've now implemented this in Emacs 27.1.

The new shr-selected-link and old shr-strike-through and shr-link faces
all use the older (DISPLAY PLIST), as opposed to (DISPLAY . PLIST), face
spec syntax, according to (info "(elisp) Defining Faces").

Would this be a good opportunity to update them?

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#25096: shr: Add a customizable face for links after being clicked
  2018-04-13 13:49           ` Basil L. Contovounesios
@ 2018-04-13 14:48             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-13 14:48 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Hong Xu, 25096

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I've now implemented this in Emacs 27.1.
>
> The new shr-selected-link and old shr-strike-through and shr-link faces
> all use the older (DISPLAY PLIST), as opposed to (DISPLAY . PLIST), face
> spec syntax, according to (info "(elisp) Defining Faces").
>
> Would this be a good opportunity to update them?

Yes, definitely.  I had forgotten about those.  Patches welcome.  :-)

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-04-13 14:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 19:01 bug#25096: shr: Add a customizable face for links after being clicked Hong Xu
2016-12-02 19:13 ` Drew Adams
2016-12-02 21:27   ` Hong Xu
2016-12-03  0:02     ` Drew Adams
2016-12-03  3:42       ` Clément Pit--Claudel
2016-12-03 15:41         ` Drew Adams
2016-12-03 16:30           ` Clément Pit--Claudel
2017-01-24 20:27 ` Lars Ingebrigtsen
2017-01-24 21:39   ` Hong Xu
2017-01-24 21:44     ` Lars Ingebrigtsen
2017-01-25  3:12       ` Hong Xu
2018-04-13 12:18         ` Lars Ingebrigtsen
2018-04-13 13:49           ` Basil L. Contovounesios
2018-04-13 14:48             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).