unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Making `xwidget-event' a special event
       [not found] <87wnl4mjd4.fsf.ref@yahoo.com>
@ 2021-11-19 12:15 ` Po Lu
  2021-11-19 12:47   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu @ 2021-11-19 12:15 UTC (permalink / raw)
  To: emacs-devel

I would like to make `xwidget-event' and `xwidget-display-event' special
events.

This is because `xwidget-event' should never be grouped into key
sequences or echo, or the xwidget.el machinery could be confused.

For instance, if the user hits `C-x' and then immediately afterwards a
"load-finished" xwidget event is sent, xwidget-webkit will not receive
the "load-finished" xwidget event, which causes it to keep displaying a
loading indicator regardless of whether or not the load has actually
completed.

Users are supposed to use the `callback' property of the xwidget to
handle xwidget events anyway.  This hasn't been documented though, and
this deficiency in the documentation also exists in Emacs 28, so perhaps
the documentation there needs to be updated as well?

It also doesn't make sense to put an xwidget-event in a keyboard macro
or in unread-command-events.

Does this look OK?  If so, I'll make this change ASAP.

(Also, where would this change be best documented?)

Thanks.



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

* Re: Making `xwidget-event' a special event
  2021-11-19 12:15 ` Making `xwidget-event' a special event Po Lu
@ 2021-11-19 12:47   ` Eli Zaretskii
  2021-11-19 13:06     ` Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-11-19 12:47 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Date: Fri, 19 Nov 2021 20:15:51 +0800
> 
> I would like to make `xwidget-event' and `xwidget-display-event' special
> events.
> 
> This is because `xwidget-event' should never be grouped into key
> sequences or echo, or the xwidget.el machinery could be confused.
> 
> For instance, if the user hits `C-x' and then immediately afterwards a
> "load-finished" xwidget event is sent, xwidget-webkit will not receive
> the "load-finished" xwidget event, which causes it to keep displaying a
> loading indicator regardless of whether or not the load has actually
> completed.

Are we sure all the idiosyncrasies of processing special events will
never run afoul of what Lisp programs and users want to do with the
xwidget events?



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

* Re: Making `xwidget-event' a special event
  2021-11-19 12:47   ` Eli Zaretskii
@ 2021-11-19 13:06     ` Po Lu
  2021-11-19 13:19       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu @ 2021-11-19 13:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> This is because `xwidget-event' should never be grouped into key
>> sequences or echo, or the xwidget.el machinery could be confused.
>> 
>> For instance, if the user hits `C-x' and then immediately afterwards a
>> "load-finished" xwidget event is sent, xwidget-webkit will not receive
>> the "load-finished" xwidget event, which causes it to keep displaying a
>> loading indicator regardless of whether or not the load has actually
>> completed.

> Are we sure all the idiosyncrasies of processing special events will
> never run afoul of what Lisp programs and users want to do with the
> xwidget events?

Could you please explain the important idiosyncrasies, so I can
determine if that is the case?

Thanks in advance!



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

* Re: Making `xwidget-event' a special event
  2021-11-19 13:06     ` Po Lu
@ 2021-11-19 13:19       ` Eli Zaretskii
  2021-11-19 13:21         ` Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-11-19 13:19 UTC (permalink / raw)
  To: Po Lu, Stefan Monnier; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 19 Nov 2021 21:06:34 +0800
> 
> > Are we sure all the idiosyncrasies of processing special events will
> > never run afoul of what Lisp programs and users want to do with the
> > xwidget events?
> 
> Could you please explain the important idiosyncrasies, so I can
> determine if that is the case?

They are documented in "Special Events" in the ELisp manual.  Maybe
Stefan could add to that if the manual isn't comprehensive enough.



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

* Re: Making `xwidget-event' a special event
  2021-11-19 13:19       ` Eli Zaretskii
@ 2021-11-19 13:21         ` Po Lu
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu @ 2021-11-19 13:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> They are documented in "Special Events" in the ELisp manual.  Maybe
> Stefan could add to that if the manual isn't comprehensive enough.

They seem fine, so if Stefan doesn't have anything to add I'll make the
change.  Thanks.



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

end of thread, other threads:[~2021-11-19 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87wnl4mjd4.fsf.ref@yahoo.com>
2021-11-19 12:15 ` Making `xwidget-event' a special event Po Lu
2021-11-19 12:47   ` Eli Zaretskii
2021-11-19 13:06     ` Po Lu
2021-11-19 13:19       ` Eli Zaretskii
2021-11-19 13:21         ` Po Lu

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