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#51404: Support system dark mode on Windows 10 Date: Sat, 30 Oct 2021 20:39:17 +0300 Message-ID: <83k0huo1iy.fsf@gnu.org> References: <834k93zxyo.fsf@gnu.org> <838ryfyawv.fsf@gnu.org> <83r1c5tyar.fsf@gnu.org> <83a6iqpzrv.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="28260"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51404@debbugs.gnu.org To: Vince Salvino Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 30 20:48:59 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 1mgtPX-0007An-Di for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 20:48:59 +0200 Original-Received: from localhost ([::1]:54430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgtPW-00034R-9w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 14:48:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgsKo-0000Kx-GH for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 13:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgsKo-000800-42 for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 13:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgsKo-0005OH-0m for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Oct 2021 17:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51404-submit@debbugs.gnu.org id=B51404.163561557920675 (code B ref 51404); Sat, 30 Oct 2021 17:40:01 +0000 Original-Received: (at 51404) by debbugs.gnu.org; 30 Oct 2021 17:39:39 +0000 Original-Received: from localhost ([127.0.0.1]:58437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgsKR-0005NP-EZ for submit@debbugs.gnu.org; Sat, 30 Oct 2021 13:39:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgsKP-0005NA-P6 for 51404@debbugs.gnu.org; Sat, 30 Oct 2021 13:39:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgsKI-0007xt-LF; Sat, 30 Oct 2021 13:39:31 -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=MlGH5S5MW70Bd7hSYQ89LC0wpbEDx9vZeEZbgQkFMwQ=; b=ja+NSrbjYRh2KEDDFQk+ oasoC1t77MpZfkEJvMAAKReB9mcCbFAir4/9bN3/zQchW0lr5nFq8DGDfvTPSUSf0PsGEeXTT5ExC +Yn7Ywm63KoFi6MiBZw+toYv0/On1d/Q+5PL2mm0hZIbUJ5oD0qEwaTnmPTKtCaVyMo5jg6F6uAbW REGWWy1Nc0x2K9exfLtALCK27yBmy637r/5KRxRLilWyySwUjUdtLvZFSX69REYRUvi4Q4MxQzogO LCyhQqfMH59T4xsEbZiR2xQpiXBXgx4AxKTC6pJjn5ovAYrbgFPgtq1B1M+kdOiWhS2GlqTVz0Vil kbWPH5TKhtGHzQ==; Original-Received: from [87.69.77.57] (port=3561 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 1mgsKH-0005Z1-Ni; Sat, 30 Oct 2021 13:39:30 -0400 In-Reply-To: (message from Vince Salvino on Sat, 30 Oct 2021 17:13:13 +0000) 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:218636 Archived-At: > From: Vince Salvino > CC: "51404@debbugs.gnu.org" <51404@debbugs.gnu.org> > Date: Sat, 30 Oct 2021 17:13:13 +0000 > >  > define a variable exposed to Lisp using DEFVAR_BOOL; let's call it w32-follow-system-theme > > My thought would be to give the user a bit more control. Rather than saying to follow system theme or not, perhaps they could choose from 3 values: follow theme, light, or dark, e.g.: > > w32-system-theme: > * nil: follow system theme (default) > * light: force light mode (the old behavior) > * dark: force dark mode I'm not sure I understand why 'light' necessarily means the old behavior: we didn't set any theme before this change, we just used the Windows default. So maybe there should be 4 values: nil: never follow the system theme (use Windows default) t: always follow the system theme light: force light theme (currently the same as nil) dark: force dark theme. > Second, could you provide an existing value from early-init that I > could follow as an example? early-init is a file, called literally "early-init.el". If you have such a file in your ~/.emacs.d/ directory, Emacs will load it early on during the startup. > (I never knew early init was a thing, so I am going to research this - it will probably make my personal init customization a lot better too!) The recommendation is to move to early-init.el only stuff that cannot work in the normal init file. That's because early-init is processed when some of the infrastructure is not yet set up, so things could fail there that will work correctly in the init file.