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#14635: 24.3.50; Regression in Customize: no revert changes Date: Fri, 30 Oct 2020 10:35:33 -0300 Message-ID: References: <329c5dbd-dfc7-406e-9957-71f3b94409b0@default> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000045ba4e05b2e379dd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15745"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 14635@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 14:36:41 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 1kYUa8-0003zC-On for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 14:36:40 +0100 Original-Received: from localhost ([::1]:36432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYUa7-0002Dx-Qv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 09:36:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYUZX-0001mj-Ox for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:36:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYUZW-0001NM-0m for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYUZV-00083Y-Uv for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:36:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <329c5dbd-dfc7-406e-9957-71f3b94409b0@default> Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14635 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 14635-submit@debbugs.gnu.org id=B14635.160406495330946 (code B ref 14635); Fri, 30 Oct 2020 13:36:01 +0000 Original-Received: (at 14635) by debbugs.gnu.org; 30 Oct 2020 13:35:53 +0000 Original-Received: from localhost ([127.0.0.1]:56687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYUZM-000833-LH for submit@debbugs.gnu.org; Fri, 30 Oct 2020 09:35:52 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:44926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYUZL-00082r-9n for 14635@debbugs.gnu.org; Fri, 30 Oct 2020 09:35:51 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id b3so578887wrx.11 for <14635@debbugs.gnu.org>; Fri, 30 Oct 2020 06:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=bKesBNlIjpeMM4anEID59oxeEMX6l/wNGrErSC22GRw=; b=G5pRjY03RlvUjY09v2qM94T4drhi1N3VoC0GbvDDvwVWLLEdML4BNAHBb/Q5ik1t42 pT8MIECNoGSH2jsVDs1SzY9ay+e0P7En7f3OrYRp/dyF3qYzP38yTQ1r6U+Fjj1Mbp3G G5nYMIDEb1TuZk6CFSsTJArUDOm2wHl5wcOc9qc64OoU3cCsR5qbsWqe4CgqO7os+cbc 39hG3OD7oigJegeFmm8GLX70E3WB0WUGNIcPQaoCvFkxqXT2JALVnzL2dl43LpBnlwPV +JGjWgqVG9iJFV3hW/lSy/hbNX0eCkdq95qxwKsKk0mXSecBOylfroLxEfS6xo5wgMbI Fq1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=bKesBNlIjpeMM4anEID59oxeEMX6l/wNGrErSC22GRw=; b=t76M0knjma1qxg8QI2iBHTjUyvJXvEct7StiY0p8y/Tg89jd57tcPd5h7wDgIFX+A/ q7ppTDcawBsmMjXjnW7jnVU8Y+oyaEiwFzBKwo1FIsVCgOZq+n5liTTuyCuG4knHlVSx n6ybR00ZokACpVc0jDb3VC9QQuKIrhxQ/2RQqcZCvJ4u3uqDP131FEu/Zhx19xU0S6Np kYbRklbjJ/3U6XcFcr3bfCSULa2QXOpGXcpTD6tLqNLQsHsFKEgk3IJVL3gJni2yT0w5 9QuQfUSN6BvupFBf/Uq7ni8l8oiwvraLW1GwMOEu+t7C024M/UNstE1qWmIef6m4Dece tyqQ== X-Gm-Message-State: AOAM532b2RTX5X82t43feRX4rWutm759oCO7ldjJWTpnMWmJ4oZAO0Nm 72hlugM5CX6f+KeB4S20KfNoOiMoQWietD9KNEc= X-Google-Smtp-Source: ABdhPJxIkLijlDywBIkxw+fLOrhZoC78griTuFWyfABR/vcXuwUwFyvqL6uowc3W6pB4a2lDig74afp0dhNEJDzZqEo= X-Received: by 2002:a5d:69d1:: with SMTP id s17mr2002790wrw.77.1604064945484; Fri, 30 Oct 2020 06:35:45 -0700 (PDT) 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:192100 Archived-At: --00000000000045ba4e05b2e379dd Content-Type: text/plain; charset="UTF-8" Drew Adams writes: > emacs -Q > M-x customize-face default > > Make some changes. Then choose Set for current session from the State > button. > > Then try to revert your changes using button `Revert...' > `Revert this > session's customizations'. There is no effect: no change in the > appearance of the buffer. And trying to revert or undo edits using the > State button is also impossible: `Revert this session's customizations' > is now dimmed out. This is with emacs -Q. > > The change of state to revert to no changes seems completely broken (a > regression). > I can reproduce this issue on master. IIUC, this bug is very similar, if not a duplicate, to Bug#13476. But here, we are dealing with the default face, so perhaps it is trickier. For the default face, face-spec-reset-face only sets all attributes to default values if (display-graphic-p frame) returns nil. So on a graphical display, it never resets :family, :foundry, :width, :height, :weight, :slant, :foreground and :background. So, if customizing the foreground color: M-x customize-face RET default Move to Foreground and change it to green C-c C-c to set it for the session Click State and select: Revert this session's customizations The default face is still green. And: (face-attribute 'default :foreground) ==> "green" On a TTY the above recipe works just fine, because we do pass default values here. What would be the right way for face-spec-reset-face to reset all the attributes of the default face to the default values, in a graphic display? --00000000000045ba4e05b2e379dd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Drew Adams <dr= ew.adams@oracle.com> writes:

> emacs -Q
> M-x custom= ize-face default
>
> Make some changes.=C2=A0 Then choose Set f= or current session from the State
> button.
>
> Then try = to revert your changes using button `Revert...' > `Revert this
&g= t; session's customizations'.=C2=A0 There is no effect: no change i= n the
> appearance of the buffer.=C2=A0 And trying to revert or undo = edits using the
> State button is also impossible: `Revert this sessi= on's customizations'
> is now dimmed out.=C2=A0 This is with = emacs -Q.
>
> The change of state to revert to no changes seems= completely broken (a
> regression).
>

I can reproduce t= his issue on master.

IIUC, this bug is very similar, if not a duplic= ate, to Bug#13476.=C2=A0 But
here, we are dealing with the default face,= so perhaps it is trickier.

For the default face, face-spec-reset-fa= ce only sets all attributes to
default values if (display-graphic-p fram= e) returns nil.=C2=A0 So on a
graphical display, it never resets :family= , :foundry, :width, :height,
:weight, :slant, :foreground and :backgroun= d.

So, if customizing the foreground color:
M-x customize-face RE= T default
Move to Foreground and change it to green
C-c C-c to set it= for the session
Click State and select: Revert this session's custo= mizations

The default face is still green.=C2=A0 And:
(face-attri= bute 'default :foreground) =3D=3D> "green"

On a TTY= the above recipe works just fine, because we do pass default
values her= e.


What would be the right way for face-spec-reset-face to reset= all the
attributes of the default face to the default values, in a grap= hic
display?
--00000000000045ba4e05b2e379dd--