* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
@ 2020-08-16 14:02 Stefan Kangas
2020-08-16 14:51 ` Eli Zaretskii
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Stefan Kangas @ 2020-08-16 14:02 UTC (permalink / raw)
To: 42887
Clicking with the mouse to show/hide the options in a custimize group
doesn't handle repeated clicks well. Steps to reproduce:
0. emacs -Q
1. M-x customize-group RET mouse RET
2. Click the arrow next to an option to expand it
3. [wait a second without moving the mouse cursor]
4. Click again
Result: the option does not expand
Expected result: the option expands
In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
of 2020-08-10 built on joffe
Repository revision: 52418648a47b48538c998b1b0a3be8110fff3fdf
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid
Configured using:
'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
'CFLAGS=-O0 -g3'
PKG_CONFIG_PATH=/home/skangas/usr/lib/pkgconfig:/home/skangas/usr/lib/pkgconfig:'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
JSON PDUMPER LCMS2
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
@ 2020-08-16 14:51 ` Eli Zaretskii
2020-08-17 18:25 ` Stefan Kangas
2020-09-05 12:53 ` Mauro Aranda
` (3 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2020-08-16 14:51 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 42887
> From: Stefan Kangas <stefan@marxist.se>
> Date: Sun, 16 Aug 2020 07:02:22 -0700
>
> Clicking with the mouse to show/hide the options in a custimize group
> doesn't handle repeated clicks well. Steps to reproduce:
>
> 0. emacs -Q
> 1. M-x customize-group RET mouse RET
> 2. Click the arrow next to an option to expand it
> 3. [wait a second without moving the mouse cursor]
> 4. Click again
>
> Result: the option does not expand
>
> Expected result: the option expands
Not reproducible here. I guess this, too, is toolkit-dependent?
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
2020-08-16 14:51 ` Eli Zaretskii
@ 2020-09-05 12:53 ` Mauro Aranda
2020-11-13 23:20 ` Stefan Kangas
2020-11-14 4:27 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Mauro Aranda @ 2020-09-05 12:53 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 42887
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
Stefan Kangas <stefan@marxist.se> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Not reproducible here. I guess this, too, is toolkit-dependent?
>
> I can reproduce this also using no toolkit, Lucid and motif.
I can't reproduce this either. I used two builds: no-toolkit and GTK3.
Only when I click "too fast" the option doesn't expand, but if I move
the mouse, Emacs highlights a region, so I'm guessing that runs another
command and not the whole widget-button-click command. Does that happen
to you as well?
[-- Attachment #2: Type: text/html, Size: 743 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-09-05 12:53 ` Mauro Aranda
@ 2020-11-13 23:20 ` Stefan Kangas
2020-11-17 11:25 ` Mauro Aranda
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2020-11-13 23:20 UTC (permalink / raw)
To: Mauro Aranda; +Cc: 42887
Mauro Aranda <maurooaranda@gmail.com> writes:
> Only when I click "too fast" the option doesn't expand,
That's different from what I'm seeing. I can wait several seconds
between clicks, and as long as I don't move the mouse cursor the option
won't expand.
> but if I move the mouse, Emacs highlights a region, so I'm guessing
> that runs another command and not the whole widget-button-click
> command. Does that happen to you as well?
After repeated clicking without moving the mouse, I can sometimes get it
to select a region. I'm not sure if this is the same as what you're
seeing.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-11-13 23:20 ` Stefan Kangas
@ 2020-11-17 11:25 ` Mauro Aranda
2020-11-17 11:48 ` Stefan Kangas
0 siblings, 1 reply; 17+ messages in thread
From: Mauro Aranda @ 2020-11-17 11:25 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 42887
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
Stefan Kangas <stefan@marxist.se> writes:
> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> Only when I click "too fast" the option doesn't expand,
>
> That's different from what I'm seeing. I can wait several seconds
> between clicks, and as long as I don't move the mouse cursor the option
> won't expand.
I think I misunderstood your recipe. Does an option that starts as hidden
never expand for you in the recipe?
[-- Attachment #2: Type: text/html, Size: 631 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-11-17 11:25 ` Mauro Aranda
@ 2020-11-17 11:48 ` Stefan Kangas
2020-11-17 12:07 ` Mauro Aranda
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2020-11-17 11:48 UTC (permalink / raw)
To: Mauro Aranda; +Cc: 42887
Mauro Aranda <maurooaranda@gmail.com> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> Mauro Aranda <maurooaranda@gmail.com> writes:
>>
>>> Only when I click "too fast" the option doesn't expand,
>>
>> That's different from what I'm seeing. I can wait several seconds
>> between clicks, and as long as I don't move the mouse cursor the option
>> won't expand.
>
> I think I misunderstood your recipe. Does an option that starts as hidden
> never expand for you in the recipe?
No, it does expand on the first click.
It will not expand on repeated clicks unless I move the mouse cursor
between clicks. The delay does not matter (except if I click too fast I
see double-click events).
So I had a quick look, and the defun `custom-toggle-hide-variable' is
called on the first click. The option then correctly expands.
But that function is not called on subsequent clicks. After moving the
mouse cursor and clicking, it seems to register again and
`custom-toggle-hide-variable' is called.
This is what I used to test this:
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index d1077d367d..86235f9fc0 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2796,11 +2796,14 @@ custom-variable-value-create
(custom-add-parent-links widget))
(custom-add-see-also widget)))))
+(defvar count 0)
(defun custom-toggle-hide-variable (visibility-widget &rest _ignore)
"Toggle the visibility of a `custom-variable' parent widget.
By default, this signals an error if the parent has unsaved
changes. If the parent has a `simple' :custom-style property,
the present value is saved to its :shown-value property instead."
+ (message "Click %s" count)
+ (setq count (1+ count))
(let ((widget (widget-get visibility-widget :parent)))
(unless (eq (widget-type widget) 'custom-variable)
(error "Invalid widget type"))
^ permalink raw reply related [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-11-17 11:48 ` Stefan Kangas
@ 2020-11-17 12:07 ` Mauro Aranda
0 siblings, 0 replies; 17+ messages in thread
From: Mauro Aranda @ 2020-11-17 12:07 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 42887
[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]
Stefan Kangas <stefan@marxist.se> writes:
> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> Stefan Kangas <stefan@marxist.se> writes:
>>
>>> Mauro Aranda <maurooaranda@gmail.com> writes:
>>>
>>>> Only when I click "too fast" the option doesn't expand,
>>>
>>> That's different from what I'm seeing. I can wait several seconds
>>> between clicks, and as long as I don't move the mouse cursor the option
>>> won't expand.
>>
>> I think I misunderstood your recipe. Does an option that starts as
hidden
>> never expand for you in the recipe?
>
> No, it does expand on the first click.
>
> It will not expand on repeated clicks unless I move the mouse cursor
> between clicks. The delay does not matter (except if I click too fast I
> see double-click events).
Then I definitely can't reproduce this. Does it happen with mouse-1 and
mouse-2? I think you didn't mention that in your recipe.
> So I had a quick look, and the defun `custom-toggle-hide-variable' is
> called on the first click. The option then correctly expands.
>
> But that function is not called on subsequent clicks. After moving the
> mouse cursor and clicking, it seems to register again and
> `custom-toggle-hide-variable' is called.
custom-toggle-hide-variable is the :action function for the widget you
are clicking. It should be called if
widget-button--check-and-call-button detects a mouse-1 or mouse-2 event
at that widget. AFAIK, there are 2 reasons why it doesn't
call the :action function: either it gets a mouse-1 event and then a
mouse-movement event, returning t, or it doesn't think the button where
the mouse click ended is the same button where the mouse click started.
I.e., this evaluates to nil:
(and pos (eq (get-char-property pos 'button) button))
In this case, widget-button--check-and-call-button will return nil.
I suspect the former happens and not the latter, but I can't be sure.
Maybe you can test what's the return value of
widget-button--check-and-call-button.
[-- Attachment #2: Type: text/html, Size: 2534 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
2020-08-16 14:51 ` Eli Zaretskii
2020-09-05 12:53 ` Mauro Aranda
@ 2020-11-14 4:27 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 1:15 ` Lars Ingebrigtsen
2023-09-11 13:34 ` Mauro Aranda
4 siblings, 0 replies; 17+ messages in thread
From: tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-14 4:27 UTC (permalink / raw)
To: stefan; +Cc: 42887, maurooaranda
I reproduced "when I’m clicking too fast the option doesn't expand" in NS port.
I traced the function widget-button--check-and-call-button and I confirmed that
this function returns t if the option doesn't expand.
the function’s (read-event) may be the cause.
--
tsuucat
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
` (2 preceding siblings ...)
2020-11-14 4:27 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-07 1:15 ` Lars Ingebrigtsen
2022-02-07 3:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-26 5:50 ` Stefan Kangas
2023-09-11 13:34 ` Mauro Aranda
4 siblings, 2 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-07 1:15 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 42887
Stefan Kangas <stefan@marxist.se> writes:
> Clicking with the mouse to show/hide the options in a custimize group
> doesn't handle repeated clicks well. Steps to reproduce:
>
> 0. emacs -Q
> 1. M-x customize-group RET mouse RET
> 2. Click the arrow next to an option to expand it
> 3. [wait a second without moving the mouse cursor]
> 4. Click again
>
> Result: the option does not expand
>
> Expected result: the option expands
I'm unable to reproduce this in Emacs 29 on Debian/bullseye. Are you
still seeing this problem?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2022-02-07 1:15 ` Lars Ingebrigtsen
@ 2022-02-07 3:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 3:42 ` Lars Ingebrigtsen
2022-05-26 5:50 ` Stefan Kangas
1 sibling, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-07 3:19 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 42887, Stefan Kangas
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I'm unable to reproduce this in Emacs 29 on Debian/bullseye. Are you
> still seeing this problem?
FWIW, I see a related problem: if I double click on the arrow, the
option doesn't open and then close as one would expect.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2022-02-07 1:15 ` Lars Ingebrigtsen
2022-02-07 3:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-26 5:50 ` Stefan Kangas
2022-05-26 11:03 ` Lars Ingebrigtsen
1 sibling, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2022-05-26 5:50 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 42887
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> Clicking with the mouse to show/hide the options in a custimize group
>> doesn't handle repeated clicks well. Steps to reproduce:
>>
>> 0. emacs -Q
>> 1. M-x customize-group RET mouse RET
>> 2. Click the arrow next to an option to expand it
>> 3. [wait a second without moving the mouse cursor]
>> 4. Click again
>>
>> Result: the option does not expand
>>
>> Expected result: the option expands
>
> I'm unable to reproduce this in Emacs 29 on Debian/bullseye. Are you
> still seeing this problem?
Yes. I just tested this again on master, and I can reproduce this
consistently. It happens on repeated clicks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
` (3 preceding siblings ...)
2022-02-07 1:15 ` Lars Ingebrigtsen
@ 2023-09-11 13:34 ` Mauro Aranda
2023-09-11 18:01 ` Stefan Kangas
4 siblings, 1 reply; 17+ messages in thread
From: Mauro Aranda @ 2023-09-11 13:34 UTC (permalink / raw)
To: Stefan Kangas, 42887
I don't know why I couldn't reproduce it three years ago, but I managed
to do that now, I think.
Could you please check if the following change to
widget-button-release-event-p fixes this for you?
(defun widget-button-release-event-p (event)
"Non-nil if EVENT is a mouse-button-release event object."
(and (eventp event)
(memq (event-basic-type event) '(mouse-1 mouse-2 mouse-3))
(seq-some (lambda (el)
(memq el '(click drag triple double)))
(event-modifiers event))))
Please do try it with mouse-1 and mouse-2 if you can.
(I know that the mark gets set with repeating clicks with mouse-1,
and there's a signal with mouse-2, but I'm focusing on whether this
changes fixes the detection of repeated clicks)
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2023-09-11 13:34 ` Mauro Aranda
@ 2023-09-11 18:01 ` Stefan Kangas
2023-09-11 19:20 ` Mauro Aranda
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2023-09-11 18:01 UTC (permalink / raw)
To: Mauro Aranda, 42887
Mauro Aranda <maurooaranda@gmail.com> writes:
> I don't know why I couldn't reproduce it three years ago, but I managed
> to do that now, I think.
>
> Could you please check if the following change to
> widget-button-release-event-p fixes this for you?
>
> (defun widget-button-release-event-p (event)
> "Non-nil if EVENT is a mouse-button-release event object."
> (and (eventp event)
> (memq (event-basic-type event) '(mouse-1 mouse-2 mouse-3))
> (seq-some (lambda (el)
> (memq el '(click drag triple double)))
> (event-modifiers event))))
>
>
> Please do try it with mouse-1 and mouse-2 if you can.
>
> (I know that the mark gets set with repeating clicks with mouse-1,
> and there's a signal with mouse-2, but I'm focusing on whether this
> changes fixes the detection of repeated clicks)
Thanks.
I don't currently have convenient access to the machine where I can
reproduce this, and it will be at least another couple of weeks until I
do. Apologies in advance if it takes a while before I can review this.
If someone else can reproduce and this patch fixes it for them, that
works too.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
2023-09-11 18:01 ` Stefan Kangas
@ 2023-09-11 19:20 ` Mauro Aranda
0 siblings, 0 replies; 17+ messages in thread
From: Mauro Aranda @ 2023-09-11 19:20 UTC (permalink / raw)
To: Stefan Kangas, 42887; +Cc: luangruo, Eli Zaretskii, Lars Ingebrigtsen, tsuucat
On 11/9/23 15:01, Stefan Kangas wrote:
> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> I don't know why I couldn't reproduce it three years ago, but I managed
>> to do that now, I think.
>>
>> Could you please check if the following change to
>> widget-button-release-event-p fixes this for you?
>>
>> (defun widget-button-release-event-p (event)
>> "Non-nil if EVENT is a mouse-button-release event object."
>> (and (eventp event)
>> (memq (event-basic-type event) '(mouse-1 mouse-2 mouse-3))
>> (seq-some (lambda (el)
>> (memq el '(click drag triple double)))
>> (event-modifiers event))))
>>
>>
>> Please do try it with mouse-1 and mouse-2 if you can.
>>
>> (I know that the mark gets set with repeating clicks with mouse-1,
>> and there's a signal with mouse-2, but I'm focusing on whether this
>> changes fixes the detection of repeated clicks)
>
> Thanks.
>
> I don't currently have convenient access to the machine where I can
> reproduce this, and it will be at least another couple of weeks until I
> do. Apologies in advance if it takes a while before I can review this.
OK, no problem, of course. There are other bugs to focus in the
meantime :-).
> If someone else can reproduce and this patch fixes it for them, that
> works too.
I see I failed to CC people that participated in this report. Sorry,
doing that now. For reproducing, the recipe given by Stefan is pretty
good, but I would like to add that in my experience is better to make
the repeated clicks as if you wanted to double click, but maybe not so
fast.
Try to not move the mouse, and if the option doesn't toggle, wait.
There might be something in the echo area like:
double-down-mouse-1 double-mouse-1-
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2023-09-11 19:20 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-16 14:02 bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Stefan Kangas
2020-08-16 14:51 ` Eli Zaretskii
2020-08-17 18:25 ` Stefan Kangas
2020-09-05 12:53 ` Mauro Aranda
2020-11-13 23:20 ` Stefan Kangas
2020-11-17 11:25 ` Mauro Aranda
2020-11-17 11:48 ` Stefan Kangas
2020-11-17 12:07 ` Mauro Aranda
2020-11-14 4:27 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 1:15 ` Lars Ingebrigtsen
2022-02-07 3:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 3:42 ` Lars Ingebrigtsen
2022-05-26 5:50 ` Stefan Kangas
2022-05-26 11:03 ` Lars Ingebrigtsen
2023-09-11 13:34 ` Mauro Aranda
2023-09-11 18:01 ` Stefan Kangas
2023-09-11 19:20 ` Mauro Aranda
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).