From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas 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 03:48:30 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24578"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42887@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 12:50:56 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 1kezVe-00069O-8N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 12:50:54 +0100 Original-Received: from localhost ([::1]:50650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezVd-0003Zt-BK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 06:50:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezTq-0002De-AI for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 06:49:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kezTp-0000jR-VJ for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 06:49:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kezTp-0000UY-RO for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 06:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Nov 2020 11:49: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.16056137231863 (code B ref 42887); Tue, 17 Nov 2020 11:49:01 +0000 Original-Received: (at 42887) by debbugs.gnu.org; 17 Nov 2020 11:48:43 +0000 Original-Received: from localhost ([127.0.0.1]:58503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kezTW-0000Tz-Qu for submit@debbugs.gnu.org; Tue, 17 Nov 2020 06:48:43 -0500 Original-Received: from mail-ed1-f54.google.com ([209.85.208.54]:41952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kezTR-0000Tg-DE for 42887@debbugs.gnu.org; Tue, 17 Nov 2020 06:48:41 -0500 Original-Received: by mail-ed1-f54.google.com with SMTP id t9so22104925edq.8 for <42887@debbugs.gnu.org>; Tue, 17 Nov 2020 03:48:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=etjdiAxHwFokeJYZw7SQKPh5H1ch0Hifzo15UNC/pXM=; b=HqGT8MUblHc1VhFhmGsV8TP2RcCQiZwfLfYKTsUZTX7jRfh/HtxaVAiIZbtxEOfxCb vTKT+oMhjp3Ymjlw9bZpIcAoFAPC3eV6YmaRtAvFoiKj3oZEwGeUdSaB+07owqvtMSqZ pGlWhDau0vZ38bORs5DC7ktdNNFHr2yvNjQQOivxjGpdsArZxyhR3bspbfLCyE3Rpzkt UysVY4nuz0k2ZBhi1kXvlfYyt8BHDkIBg9WoYABI6mDGpiuMEeEw07+vWNXMwh2+KpLJ ZsuAK8/2AzwZK32AXZqrIy6b+NEhp75Wm9iX3D3df4xJqf+ZEsPtRuV+q1yP2XAdGj05 Qqgw== X-Gm-Message-State: AOAM531K8U/g11r5UppB8nWN/mA+1j5REzd5RG2NB5xcLhRCIRibDsgz 1OwchghmTCsq3Q/23CzyLO6kAqFld7ZPKwO6RjA= X-Google-Smtp-Source: ABdhPJyetQTbq9OcmGS45poaGsck7abStq9w9Fqk6A7/OigUct9X0HP2hsw6jUsxKl69s/E2ZEeQ2gxsfx6CdQ5k6vI= X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr20871091edb.100.1605613711678; Tue, 17 Nov 2020 03:48:31 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 17 Nov 2020 03:48:30 -0800 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:193538 Archived-At: 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). 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"))