unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 34715@debbugs.gnu.org, 32736@debbugs.gnu.org
Subject: bug#34715: bug#32736: bug#34715: bug#32736: 26; Bind `C-x 5 2' to `clone-frame' by default
Date: Thu, 02 Sep 2021 09:44:24 +0200	[thread overview]
Message-ID: <87k0jzbew7.fsf@gnus.org> (raw)
In-Reply-To: <834kb4qof0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Sep 2021 18:57:23 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> The following is the minimal case for reproduction here:
>> 
>> (let ((default-frame-alist
>>         '((background-color . "red"))))
>>   (make-frame))
>> 
>> This reliably makes all the faces go AWOL on the new frame.  (It doesn't
>> matter what the colour is.)
>
> Shouldn't we copy the parameters alist?  Maybe even deep-copy?

Do you mean in this particular test case or in `clone-frame'?  If it's
the latter, the list we get is fresh (but not very deep).

If it's this particular test case, then I don't understand what you mean.

> And faces are supposed to be frame-local, so maybe faces also need to
> be copied?  Otherwise, you are basically manipulating faces that don't
> "belong" to the frame, no?  And likewise with frame's parameters
> alist, I think.

Anyway, debugging further shows that the problem seems to be in
`frame-set-background-mode', but I've yet to isolate what exactly is
triggering the bug.

	    (dolist (face (face-list))
	      (and (not (get face 'face-override-spec))
[...]

                         (face-spec-match-p face
                                            (face-user-default-spec face)
                                            frame)))
		   (push face locally-modified-faces)))
	    ;; Now change to the new frame parameters
	    (modify-frame-parameters frame params)
	    ;; For all unmodified named faces, choose face specs
	    ;; matching the new frame parameters.
	    (dolist (face (face-list))
	      (unless (memq face locally-modified-faces)
		(face-spec-recalc face frame)))))))))

The face-spec-recalc messes up the face...  but so does the call to
face-spec-match-p, apparently?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-09-02  7:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03  0:47 bug#34715: 26.1; (1) Add `clone-frame', (2) bind it to `C-x 5 2' Drew Adams
2019-03-04 16:12 ` Eli Zaretskii
2019-03-08  9:46 ` Eli Zaretskii
2021-09-01  9:43 ` bug#32736: 26; Bind `C-x 5 2' to `clone-frame' by default Lars Ingebrigtsen
2021-09-01 12:47   ` bug#34715: " Eli Zaretskii
2021-09-01 12:53     ` bug#32736: " Lars Ingebrigtsen
2021-09-01 13:38       ` Eli Zaretskii
2021-09-01 13:40         ` Lars Ingebrigtsen
2021-09-01 13:41           ` Lars Ingebrigtsen
2021-09-01 13:55             ` Lars Ingebrigtsen
2021-09-01 14:11               ` Eli Zaretskii
2021-09-01 14:18                 ` Lars Ingebrigtsen
2021-09-01 14:28                   ` bug#34715: " Lars Ingebrigtsen
2021-09-01 15:57                   ` Eli Zaretskii
2021-09-02  7:44                     ` Lars Ingebrigtsen [this message]
2021-09-02  7:51                       ` Eli Zaretskii
2021-09-02  8:01                         ` bug#34715: " Lars Ingebrigtsen
2021-09-02  8:19                           ` Eli Zaretskii
2021-09-02  8:57                             ` Lars Ingebrigtsen
2021-09-02 12:03                               ` Eli Zaretskii
2021-09-02 16:05                                 ` bug#34715: " Lars Ingebrigtsen
     [not found] <<17bef02b-7dd4-4086-828f-59488a836ac1@default>
     [not found] ` <<83sgw2ehzu.fsf@gnu.org>
2019-03-04 17:25   ` bug#34715: 26.1; (1) Add `clone-frame', (2) bind it to `C-x 5 2' Drew Adams
2019-03-04 18:14     ` Eli Zaretskii
2019-03-30 21:58     ` Juri Linkov

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=87k0jzbew7.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=32736@debbugs.gnu.org \
    --cc=34715@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).