all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Suggestion to add clickable text activation function to Emacs
@ 2017-09-28 17:42 Robert Weiner
  2017-09-29 16:27 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Weiner @ 2017-09-28 17:42 UTC (permalink / raw
  To: emacs-devel

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

Emacs allows for the definition of buffer regions that represent "clickable
text", see "(elisp)Clickable Text".  One type of clickable text is a button
which can be programmatically activated (have its action executed) with the
push-button function.

But there does not seem to be a function to programmatically activate other
types of clickable text.  This is a suggestion that such a function be
added to Emacs.  It would be similar to push-button but would account for
all the ways clickable text can be activated.  Right now it appears that
non-button clickable text can be activated essentially only interactively,
e.g. with a press of RET or mouse-2 or invocation of their key bindings.
But that is only one of many possible ways of activating clickable text.

There is a function, mouse-on-link-p, that determines if the given position
is within clickable text, but there is no corresponding activation function.

Bob

[-- Attachment #2: Type: text/html, Size: 1567 bytes --]

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

* Re: Suggestion to add clickable text activation function to Emacs
  2017-09-28 17:42 Suggestion to add clickable text activation function to Emacs Robert Weiner
@ 2017-09-29 16:27 ` Eli Zaretskii
  2017-09-29 16:43   ` Robert Weiner
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2017-09-29 16:27 UTC (permalink / raw
  To: rswgnu; +Cc: emacs-devel

> From: Robert Weiner <rsw@gnu.org>
> Date: Thu, 28 Sep 2017 13:42:15 -0400
> 
> Emacs allows for the definition of buffer regions that represent "clickable text", see "(elisp)Clickable Text".
> One type of clickable text is a button which can be programmatically activated (have its action executed) with
> the push-button function.
> 
> But there does not seem to be a function to programmatically activate other types of clickable text. This is a
> suggestion that such a function be added to Emacs. It would be similar to push-button but would account for
> all the ways clickable text can be activated. Right now it appears that non-button clickable text can be
> activated essentially only interactively, e.g. with a press of RET or mouse-2 or invocation of their key bindings.
> But that is only one of many possible ways of activating clickable text.

Maybe I'm missing something, but how will this be different from
calling the binding of the click?



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

* Re: Suggestion to add clickable text activation function to Emacs
  2017-09-29 16:27 ` Eli Zaretskii
@ 2017-09-29 16:43   ` Robert Weiner
  2017-09-29 18:01     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Weiner @ 2017-09-29 16:43 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: emacs-devel

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

On Fri, Sep 29, 2017 at 12:27 PM, Eli Zaretskii <eliz@gnu.org> wrote:

>
> Maybe I'm missing something, but how will this be different from
> calling the binding of the click?
>

​The binding of what click?  mouse-1, mouse-2, RET, some other key?  Look
at the doc in "(elisp)Clickable Text" and you will see there are many ways
to activate such text as explained there.  If we want clickable text
actions to be runnable programmatically (no user clicks), then there needs
to be a single function that can determine what action a user click would
have performed and returns that action or performs it.  In my original
message, I noted that push-button does this for buttons, so the issue is
the need for one for non-button clickable text.  Does that clarify the
issue?

Bob

[-- Attachment #2: Type: text/html, Size: 1626 bytes --]

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

* Re: Suggestion to add clickable text activation function to Emacs
  2017-09-29 16:43   ` Robert Weiner
@ 2017-09-29 18:01     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-09-29 18:01 UTC (permalink / raw
  To: rswgnu; +Cc: emacs-devel

> From: Robert Weiner <rsw@gnu.org>
> Date: Fri, 29 Sep 2017 12:43:03 -0400
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
>  Maybe I'm missing something, but how will this be different from
>  calling the binding of the click?
> 
> ​The binding of what click? mouse-1, mouse-2, RET, some other key?

Whatever key or mouse button that you are interesting in, I suppose.

> Look at the doc in "(elisp)Clickable
> Text" and you will see there are many ways to activate such text as explained there. If we want clickable text
> actions to be runnable programmatically (no user clicks), then there needs to be a single function that can
> determine what action a user click would have performed and returns that action or performs it. In my original
> message, I noted that push-button does this for buttons, so the issue is the need for one for non-button
> clickable text. Does that clarify the issue?

No, not really.  The normal APIs to find a binding of a click or a
keypress should give you the function which would be performed.  But
you most probably already know that.  So I guess I don't see clearly
the use case and its context.  Could you perhaps describe such a use
case where you'd need the function you think you lack?

Thanks.



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

end of thread, other threads:[~2017-09-29 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 17:42 Suggestion to add clickable text activation function to Emacs Robert Weiner
2017-09-29 16:27 ` Eli Zaretskii
2017-09-29 16:43   ` Robert Weiner
2017-09-29 18:01     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.