unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: 14635@debbugs.gnu.org
Subject: bug#14635: 24.3.50; Regression in Customize: no revert changes
Date: Fri, 30 Oct 2020 10:35:33 -0300	[thread overview]
Message-ID: <CABczVwcWkt5L++G2aWoQAjOn97d-ZU8fw1q11+sw6qHggM0unw@mail.gmail.com> (raw)
In-Reply-To: <329c5dbd-dfc7-406e-9957-71f3b94409b0@default>

[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]

Drew Adams <drew.adams@oracle.com> 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?

[-- Attachment #2: Type: text/html, Size: 1866 bytes --]

  parent reply	other threads:[~2020-10-30 13:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-16  9:18 bug#14635: 24.3.50; Regression in Customize: no revert changes Drew Adams
2013-06-16 10:30 ` Juanma Barranquero
2020-10-30 13:35 ` Mauro Aranda [this message]
2020-10-30 13:43   ` Eli Zaretskii
2020-10-30 14:03     ` Mauro Aranda
2020-10-30 14:16       ` Eli Zaretskii
2020-10-30 14:23         ` Mauro Aranda
2020-10-31 14:56           ` Mauro Aranda
2022-02-05 23:39             ` Lars Ingebrigtsen

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=CABczVwcWkt5L++G2aWoQAjOn97d-ZU8fw1q11+sw6qHggM0unw@mail.gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=14635@debbugs.gnu.org \
    --cc=drew.adams@oracle.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).