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#46355: 27.1; custom.el `widget-apply: =?UTF-8?Q?Symbol=E2=80=99s?= function definition is void: nil' Date: Sun, 07 Feb 2021 09:03:33 -0300 Message-ID: <601fd719.1c69fb81.f8f51.e817@mx.google.com> References: <877dnku85b.fsf@cock.li> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27574"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) Cc: 46355@debbugs.gnu.org To: zdm Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 07 13:04:16 2021 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 1l8inY-00072O-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 13:04:16 +0100 Original-Received: from localhost ([::1]:55780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8inW-0003Pt-RX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 07:04:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8inK-0003Pb-K6 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 07:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8inK-0006Ah-Bo for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 07:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8inK-0006c9-8V for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 07:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2021 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46355 X-GNU-PR-Package: emacs Original-Received: via spool by 46355-submit@debbugs.gnu.org id=B46355.161269942525402 (code B ref 46355); Sun, 07 Feb 2021 12:04:02 +0000 Original-Received: (at 46355) by debbugs.gnu.org; 7 Feb 2021 12:03:45 +0000 Original-Received: from localhost ([127.0.0.1]:46998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8in3-0006be-G0 for submit@debbugs.gnu.org; Sun, 07 Feb 2021 07:03:45 -0500 Original-Received: from mail-qv1-f42.google.com ([209.85.219.42]:46762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8in2-0006bQ-0a for 46355@debbugs.gnu.org; Sun, 07 Feb 2021 07:03:44 -0500 Original-Received: by mail-qv1-f42.google.com with SMTP id a1so5705676qvd.13 for <46355@debbugs.gnu.org>; Sun, 07 Feb 2021 04:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:references:date:in-reply-to :user-agent:mime-version:content-transfer-encoding; bh=Vbo1aUWDyCByq9Uzns3olOsBkfogEPOdvlKSEYJlZKg=; b=TyNbFhMq1nAEBLBtUAEzhqh7TKhSXCZVPNpMRtRAaCRtAvSF8YI2jc/yTd+LNvjcnm EYn87sxftmaEeCsQnOefYI02CL6jGLOtZEsSMa9lrpx3TsXe0xIaSOJfZw9vawXdTooz gw3ltcTkHZXA7XyJFX0T/Isna/qTrvJf10XbNqL5M/weVdBFaRcfhqsRTS2pH3Mg4rWR hPpBtlY+7+Vj9eTMhmoIebVNIid4w+dHBQjKkIiu+rkPIHjZeH2SXReXrbnQcGGxe11m WUjKOmy6SD26Woh6+EoSm0leTceCz8CYe7VDKpN46krJ/RzgQJBoaZ0MmSROAHN9x0G5 weCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:references:date :in-reply-to:user-agent:mime-version:content-transfer-encoding; bh=Vbo1aUWDyCByq9Uzns3olOsBkfogEPOdvlKSEYJlZKg=; b=XcSN7OjrgGhKU7KPWFwKO0X7fj52UxnLSt4bKCKFr9EefOI6St9Uo457xFjmeRZ4um dUIyDTJZOeP1tDQuuBFzSx8PHS+D7LlTAgUPYCwBIQ5awgkdMT69GKAfftsTSN13aAZN aKn6qVAolD6SHy2HBxW0JF7iqufZm7hcPf5lZ4y/WH5VfAJUd07VoVH7PLJdEvtAA+Zj O1tzcy+Nl1p6JHUtqkeiIlJNSVTr5SkpzToYirN3+W+L+Sgl5r4kn8M74/B5VyNNwpek 9o6EHBt2YrHFSc1lmCfIsFdMi2PBUCDOUubtyaJX0eRIunKSazQ0jB82J+LGRmgLiNBx cDkQ== X-Gm-Message-State: AOAM532n1Qh7V8oRufITGXhHTNJCEMEPo+U+SQ1XOFRnzMkzaQTVb9rf iFlF5ZE/xodjg8UcFulxEQh1+18efSg44g== X-Google-Smtp-Source: ABdhPJxJ/Wm4qnTtx/0hp5y68hnBzRTIYOmIr41ktanRfCFX9MY2jJKUZUMek7M21uqjsaXQbdk6bw== X-Received: by 2002:a0c:c1cb:: with SMTP id v11mr8584268qvh.59.1612699418034; Sun, 07 Feb 2021 04:03:38 -0800 (PST) Original-Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id f14sm14157669qkl.76.2021.02.07.04.03.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Feb 2021 04:03:37 -0800 (PST) X-Google-Original-Message-ID: <878s80xey2.fsf@maurooaranda@gmail.com> In-Reply-To: <877dnku85b.fsf@cock.li> (zdm@cock.li's message of "Sat, 06 Feb 2021 15:46:24 -0700") 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:199477 Archived-At: zdm writes: > On Emacs 27.1 using the =E2=80=98Apply and Save=E2=80=99 button in a =E2= =80=98M-x > customize-face=E2=80=99 (or =E2=80=98M-x > customize-apropos-faces=E2=80=99) buffer with more than one face to custo= mize > causes an error > complaining of: > > | widget-apply: Symbol=E2=80=99s function definition is void: nil > > Step 1: > | M-x customize-apropos-faces RET vc RET > Step 2: > | Press the =E2=80=98Apply and Save=E2=80=99 button and =E2=80=98yes=E2= =80=99 to the dialog box > > The error will occur in the echo area. Thanks for the bug report. This sounds like Bug#40853. I can reproduce this in Emacs 27.1, but not in the development branch, which has this fix: commit 5c39f6f1165a33f5714eedd3a413f786dffbb5a2 Author: Mauro Aranda Date: Fri Aug 14 16:40:40 2020 +0200 Make sure we only act on edited widgets in Custom-save =20=20=20=20 * lisp/cus-edit.el (Custom-save): Only act on edited widgets in the buffer. If we attempt to redraw all widgets, we confuse custom-variable-modified-p, or we end up drawing State buttons for all options, including the hidden ones (bug#42801). Would it be possible to you to build Emacs from the master branch and try to see if you can reproduce it? Alternatively, maybe you can try to redefine Custom-save as below in a session, and see if the bug is still reproducible. You should evaluate the following after Step 1, and before Step 2. (defun Custom-save (&rest _ignore) "Set all edited settings, then save all settings that have been set. If a setting was edited and set before, this saves it. If a setting was merely edited before, this sets it then saves it." (interactive) (let (edited-widgets) (when (custom-command-apply (lambda (child) (when (memq (widget-get child :custom-state) '(modified set changed rogue)) (push child edited-widgets) (widget-apply child :custom-mark-to-save))) "Save all settings in this buffer? " t) ;; Save changes to buffer. (custom-save-all) ;; Redraw and recalculate the state when necessary. (dolist (widget edited-widgets) (widget-apply widget :custom-state-set-and-redraw))))) That is how the function looks after the fix for Bug#40853 and Bug#42801.