From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking Date: Tue, 17 Nov 2020 09:07:28 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000075048605b44c57f7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28615"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42887@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 13:09:43 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keznq-0007KN-KG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 13:09:42 +0100 Original-Received: from localhost ([::1]:54072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keznp-0000XR-Mr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 07:09:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezmI-0007wa-NK for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 07:08:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kezmD-0007wL-MX for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 07:08:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kezmD-00011R-I6 for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 07:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Nov 2020 12:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42887 X-GNU-PR-Package: emacs Original-Received: via spool by 42887-submit@debbugs.gnu.org id=B42887.16056148693909 (code B ref 42887); Tue, 17 Nov 2020 12:08:01 +0000 Original-Received: (at 42887) by debbugs.gnu.org; 17 Nov 2020 12:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:58615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kezm0-00010z-W7 for submit@debbugs.gnu.org; Tue, 17 Nov 2020 07:07:49 -0500 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:56007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kezlz-00010j-9A for 42887@debbugs.gnu.org; Tue, 17 Nov 2020 07:07:47 -0500 Original-Received: by mail-wm1-f54.google.com with SMTP id c9so2997146wml.5 for <42887@debbugs.gnu.org>; Tue, 17 Nov 2020 04:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A3FXdF5Fo3DC0k2Hc90SWDDARMuMnr5vlcjLgjoOa48=; b=CLEr52i8w3t/lbk43yURL7i9Y+XnXkhMAKWoJsg7pfmX5gtjKyaD1Jf6a0b+x1HAai 973SgfFKq68feOk7MVQiMsI1N19zHFn+UOkwnt9GwWdFrJ2/dJgK1IXoyS9n0Bhcp5oy JJV3s5Va9xIq9pTCgtrKOB4VPf02Vpr9JfQcGnIfTOJDEIIu/lxCUmr1kKcl9TFDwHQE OvGM12QbJeJG/5xe5J9aEzDIdgIKbhM+cT6owvMnLoVeyJdFQwC39cmYmtp73kDIZB6O 0HKlOI8L2D9WlM2e2QcJX+NpuQhV9RhRiEa+JVsyRQhwWbgQGt7UYKrQZwQedmvEaQic Lhaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A3FXdF5Fo3DC0k2Hc90SWDDARMuMnr5vlcjLgjoOa48=; b=cJhqU4Rj7B6XPmxSM8e+UEBhpEfnxIR3H4fz8Fd+WrI6oLARDHUNXgRBQIval/88d4 FYOwzQq6S31cJhQUMPVTKPbvRwLq+Ez3qwZFx1y1kkFrevaskVNMrdgNj3mzNtNs04Wi z/l9riB5NWqyVfHH8S1Sbgj+bB3/2HZrxjzozK8k8pWRZTolqerokDzRjlEntzlZqr+b 6V/GRyIGw38AM2q/CZs5lDBAto1jrWT9Gu/8di1PC9o1/eiCOPzq9+wK36CRbCewDTkU DzNkT5E4wi/eg5DCgbHY+o4I3rLqPmFMdT1lCcphkJtJkWY5eSTaBwuyqW5XtCCIp78e clEw== X-Gm-Message-State: AOAM531vNOrEf9qhAgw/d7lWRIpocWcjHmpf7lx3IKP9DtFMBqHC9xa1 DQiRbeNtgvZmX8wERXxzCFo1ZkhDwF9gAMQ3R+uy8n54IjET9A== X-Google-Smtp-Source: ABdhPJyauNW34dhCvdDaSLpRHqc7URq/8SGHtJZ1JXTpQTsF0VyGJ2DXKIqgR2frJNA9ooQygPLWnTNdmOP4KOPey30= X-Received: by 2002:a1c:bac1:: with SMTP id k184mr3921380wmf.76.1605614861352; Tue, 17 Nov 2020 04:07:41 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193539 Archived-At: --00000000000075048605b44c57f7 Content-Type: text/plain; charset="UTF-8" Stefan Kangas writes: > Mauro Aranda writes: > >> Stefan Kangas writes: >> >>> Mauro Aranda 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. --00000000000075048605b44c57f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Stefan Kangas <ste= fan@marxist.se> writes:

> Mauro Aranda <maurooaranda@gmail.com> writes:
>>> Stefan Kangas <stefan@ma= rxist.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.=C2=A0 I can wait several seconds
>= ;>> between clicks, and as long as I don't move the mouse cursor = the option
>>> won't expand.
>>
>> I thin= k I misunderstood your recipe.=C2=A0 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 c= licks unless I move the mouse cursor
> between clicks.=C2=A0 The dela= y does not matter (except if I click too fast I
> see double-click ev= ents).

Then I definitely can't reproduce this.=C2=A0 Does it hap= pen with mouse-1 and
mouse-2? I think you didn't mention that in you= r recipe.

> So I had a quick look, and the defun `custom-toggle-h= ide-variable' is
> called on the first click.=C2=A0 The option th= en correctly expands.
>
> But that function is not called on su= bsequent clicks.=C2=A0 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.=C2=A0 It should be called if
widget-button-= -check-and-call-button detects a mouse-1 or mouse-2 event
at that widget= .=C2=A0 AFAIK, there are 2 reasons why it doesn't
call the :action f= unction: 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 e= nded is the same button where the mouse click started.
I.e., this evalua= tes 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.<= br>Maybe you can test what's the return value of
widget-button--chec= k-and-call-button.
--00000000000075048605b44c57f7--