unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 42887@debbugs.gnu.org
Subject: bug#42887: 28.0.50; Customize Group doesn't show/hide option on repeated clicking
Date: Tue, 17 Nov 2020 03:48:30 -0800	[thread overview]
Message-ID: <CADwFkmntsyEC1qvBEsJwwTJJ8PfG8GzKT=jp1cFzgT6FV1msjg@mail.gmail.com> (raw)
In-Reply-To: <CABczVwciqhLvNRupimYfdYKRCoxSCut=Tt9SzL5fCHe7jW2PrA@mail.gmail.com>

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





  reply	other threads:[~2020-11-17 11:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmntsyEC1qvBEsJwwTJJ8PfG8GzKT=jp1cFzgT6FV1msjg@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=42887@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).