* bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button
@ 2024-04-30 19:18 David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 0:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 5+ messages in thread
From: David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-30 19:18 UTC (permalink / raw)
To: 70682; +Cc: Po Lu
Hello,
I sometimes encounter the below error when I click on a push-button widget.
Here is an example.
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p t)
widget-button--check-and-call-button((down-mouse-1 (#<window 16 on test-widget-button-click> 3 (29 . 11) 20874080 nil 3 (2 . 0) nil (5 . 11) (12 . 26))) (push-button :tag "TEST" :action test-widget-button-press :button-overlay #<overlay from 1 to 7 in test-widget-button-click> :from #<marker (moves after insertion) at 1 in test-widget-button-click> :to #<marker at 7 in test-widget-button-click>))
widget-button-click((down-mouse-1 (#<window 16 on test-widget-button-click> 3 (29 . 11) 20874080 nil 3 (2 . 0) nil (5 . 11) (12 . 26))))
funcall-interactively(widget-button-click (down-mouse-1 (#<window 16 on test-widget-button-click> 3 (29 . 11) 20874080 nil 3 (2 . 0) nil (5 . 11) (12 . 26))))
call-interactively(widget-button-click nil nil)
command-execute(widget-button-click)
It seems the problem is due to this commit:
author Po Lu <luangruo@yahoo.com> 2024-04-16 15:38:53 +0800
commit f5e0fb11dbf4d2cc5d7ceabcec7600556fb12843 (patch)
Fix touch screen hscroll when initiated from widgets
* lisp/wid-edit.el (widget-button--check-and-call-button):
Return to the position of point during the tracking loop if a
touch event is canceled.
The issue is that on some cases the below catch statement (line 1109),
whose value now set the variable newpoint, returns t instead of a valid
buffer position:
(setq newpoint
(catch 'button-press-cancelled
...
The culprit is at line 1156:
(while (not (widget-button-release-event-p event))
(setq event (read--potential-mouse-event))
(when (and mouse-1 (mouse-movement-p event))
(push event unread-command-events)
(setq event oevent)
(throw 'button-press-cancelled t)) <<<<<<<<<
The below simple patch fixed the issue for me:
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 2d82fbe7c89..3b467434d29 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1153,7 +1153,7 @@ widget-button--check-and-call-button
(when (and mouse-1 (mouse-movement-p event))
(push event unread-command-events)
(setq event oevent)
- (throw 'button-press-cancelled t))
+ (throw 'button-press-cancelled nil))
(unless (or (integerp event)
(memq (car event)
'(switch-frame select-window))
Thanks!
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-04-30
Repository revision: b36fd07560fd12c5e819e808a6f0eb9579f77c25
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 39 (KDE Plasma)
Configured using:
'configure --prefix=/home/dponce --with-x-toolkit=gtk3 --with-cairo-xcb
--with-native-compilation=no
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LC_TIME: fr_FR.utf8
value of $LANG: fr_FR.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button
2024-04-30 19:18 bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-01 0:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 7:06 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-01 0:53 UTC (permalink / raw)
To: David Ponce; +Cc: 70682-done
David Ponce <da_vid@orange.fr> writes:
> Hello,
>
> I sometimes encounter the below error when I click on a push-button widget.
> Here is an example.
Thanks, fixed. In future, please don't CC people directly in messages
to the bug tracker, but use the X-Debbugs-Cc header instead, so that the
bug tracker may deliver a properly adjusted message to all recipients.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button
2024-05-01 0:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-01 7:06 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 8:09 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 5+ messages in thread
From: David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-01 7:06 UTC (permalink / raw)
To: Po Lu; +Cc: 70682-done
On 01/05/2024 02:53, Po Lu wrote:
> David Ponce <da_vid@orange.fr> writes:
>
>> Hello,
>>
>> I sometimes encounter the below error when I click on a push-button widget.
>> Here is an example.
>
> Thanks, fixed. In future, please don't CC people directly in messages
> to the bug tracker, but use the X-Debbugs-Cc header instead, so that the
> bug tracker may deliver a properly adjusted message to all recipients.
Sorry, I didn't know about the X-Debbugs-Cc header. Do you know if possible
to use X-Debbugs-Cc header with Thunderbird?
Thank you!
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button
2024-05-01 7:06 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-01 7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 8:09 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-01 7:15 UTC (permalink / raw)
To: David Ponce; +Cc: 70682-done
David Ponce <da_vid@orange.fr> writes:
> Sorry, I didn't know about the X-Debbugs-Cc header. Do you know if possible
> to use X-Debbugs-Cc header with Thunderbird?
I think so, by editing an option in about:config. But not having used
Thunderbird in years, I can't speak as to whether Mozilla have decided
to remove this option in the meantime, nor as to its name.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button
2024-05-01 7:06 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-01 8:09 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 5+ messages in thread
From: David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-01 8:09 UTC (permalink / raw)
To: Po Lu; +Cc: 70682-done
On 01/05/2024 09:06, David Ponce wrote:
> On 01/05/2024 02:53, Po Lu wrote:
>> David Ponce <da_vid@orange.fr> writes:
>>
>>> Hello,
>>>
>>> I sometimes encounter the below error when I click on a push-button widget.
>>> Here is an example.
>>
>> Thanks, fixed. In future, please don't CC people directly in messages
>> to the bug tracker, but use the X-Debbugs-Cc header instead, so that the
>> bug tracker may deliver a properly adjusted message to all recipients.
>
> Sorry, I didn't know about the X-Debbugs-Cc header. Do you know if possible
> to use X-Debbugs-Cc header with Thunderbird?
>
> Thank you!
>
Thank you! I found how to do :-)
Thunderbird > Preferences > General > Config Editor
Search for 'mail.compose.other.header' and select it,
then add the string "X-Debbugs-CC" in the Enter string value dialog box
(separate multiple headers with commas).
When composing a message, select the double arrows (>>) in the address field,
then select the X-Debbugs-CC custom header and enter the CCd email addresses.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-01 8:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30 19:18 bug#70682: 30.0.50; wrong-type-argument error on widget-button--check-and-call-button David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 0:53 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 7:06 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-01 8:09 ` David Ponce via Bug reports for GNU Emacs, the Swiss army knife of text editors
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).