From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64347: 30.0.50; Some customize faces shown as edited with -Q Date: Sun, 09 Jul 2023 15:13:10 +0300 Message-ID: <83lefp9tbd.fsf@gnu.org> References: <87jzvmd17f.fsf@gmx.net> <83cz1etpdm.fsf@gnu.org> <2b6de9de-f33f-0547-eaa0-1f9d24f70115@gmail.com> <28fa0831-bb28-b7c1-1535-3a950f6b2545@gmail.com> <83y1jqdeqm.fsf@gnu.org> <748ccb81-d56c-76aa-d06b-47e4e3807ddb@gmail.com> <83mt05bpwh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9687"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stephen.berman@gmx.net, 64347@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 09 14:14:20 2023 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 1qITIy-0002MS-6W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jul 2023 14:14:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qITIh-0007qg-FP; Sun, 09 Jul 2023 08:14:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qITIg-0007qY-Fs for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 08:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qITIg-0005Ll-7z for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 08:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qITIf-0002B3-SP for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 08:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2023 12:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64347 X-GNU-PR-Package: emacs Original-Received: via spool by 64347-submit@debbugs.gnu.org id=B64347.16889047938298 (code B ref 64347); Sun, 09 Jul 2023 12:14:01 +0000 Original-Received: (at 64347) by debbugs.gnu.org; 9 Jul 2023 12:13:13 +0000 Original-Received: from localhost ([127.0.0.1]:45920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qITHs-00029l-Nt for submit@debbugs.gnu.org; Sun, 09 Jul 2023 08:13:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qITHp-00029X-Bv for 64347@debbugs.gnu.org; Sun, 09 Jul 2023 08:13:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qITHj-00058S-Qe; Sun, 09 Jul 2023 08:13:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=D1XZ5WfeHE6eTVER0lxhC+lqHs5b1CxpL37ntk5gJzU=; b=qcN7nv0SJyjiWeu6kXip fvRUNezC+EoF1MvRBbxAHFyevrKqnFZzJpRW9VC2RjepTXD4MUzSwDLxwiScZwwX5CfNb2g6FyvLK jKn9GUIIG28GN/dtZne6HGZkUjK5rg41kQGuqdjMj5FPuAio0Js5u6hcJEoDTYtKkzLdrfy0g7yXG xo2tQy5VzCCHvOU65pCeShZQ639OrdSC11ydsT3Cb/Kq4hbxrEyg02PwTbYpSD+sc47lSE0IF4xo/ EqQSXlib0o5il+GPAtG+MozJk0JVGv395bmVHTBQzszzWIdKi8Vj29t79eFNDGYAyltcPU5u1Q8v7 jd1SPNCWijCmCw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qITHj-0005ls-9b; Sun, 09 Jul 2023 08:13:03 -0400 In-Reply-To: (message from Mauro Aranda on Sun, 9 Jul 2023 08:44:23 -0300) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264835 Archived-At: > Date: Sun, 9 Jul 2023 08:44:23 -0300 > Cc: 64347@debbugs.gnu.org, stephen.berman@gmx.net > From: Mauro Aranda > > Eli Zaretskii writes: > > > I guess I'm missing something here: why do we need those pre-filter > > and post-filter conversions?  The C code understands both forms of > > :line-width, so there should be no need for Lisp to do any > > conversions, right?  So why do we do that? why not simply leave the > > spec as it was originally? > > Custom needs the pre-filter in order to present a Custom buffer to edit > the face. > Let's say there's a face: > (defface foo >   '((t (:box (:line-width 1 :color "black")))) >   "...") > > And let's say a user wants to customize it via Custom. > M-x customize-face RET foo > should show the user a buffer with all the capabilities to edit it. > Because we have an integer for the :line-width property, the user will > be presented with an integer Widget to edit the value, without giving > the user the opportunity to edit the HWIDTH and VWIDTH separately. > > So the pre-filter takes the (:line-width 1), and converts it into > (:line-width (1 . 1)), and now the Custom buffer will have > a cons Widget.  If we didn't do that conversion, that would be a Bug > report, I'm sure. OK, but why does it have to do that on the original value? It could do that on a copy that serves for the display and editing, in which case the original value could be left intact if the user didn't change it or did change, but didn't click Apply. (If the user does modify the original value, then any conversions are okay, since the variable is really "edited".)