From unknown Sun Aug 10 00:25:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68766 <68766@debbugs.gnu.org> To: bug#68766 <68766@debbugs.gnu.org> Subject: Status: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Reply-To: bug#68766 <68766@debbugs.gnu.org> Date: Sun, 10 Aug 2025 07:25:12 +0000 retitle 68766 29.2; Windows dark/light mode changes does not reflect on Ema= cs Title bar/Scrollbar reassign 68766 emacs submitter 68766 "Rahul M. Juliato" severity 68766 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 21:09:10 2024 Received: (at submit) by debbugs.gnu.org; 28 Jan 2024 02:09:10 +0000 Received: from localhost ([127.0.0.1]:56207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTube-0004y8-5r for submit@debbugs.gnu.org; Sat, 27 Jan 2024 21:09:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTuba-0004xc-At for submit@debbugs.gnu.org; Sat, 27 Jan 2024 21:09:09 -0500 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 1rTubN-00079m-8r for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 21:08:53 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTubL-0003yo-DN for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 21:08:53 -0500 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-29026523507so1564828a91.0 for ; Sat, 27 Jan 2024 18:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706407729; x=1707012529; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=ioZlNdhVFFp1YR+umVhKPytfhVA3rNE8t9IrHnAlzrU=; b=XHiGOzvV2wd5U9M6KpadktyVvXfImpi6w4zFKHUzWRUle7OicNlycmCq7xa8j4t/Nk sd84aymrX6E5m5K3ZY01jrUSqx5JizJQnIDCs7NYmAuy3cLSt9QPEQK+cL+jjRdsHRGV 8BU8HqBsKPf6m/MUz1hM/9mWQmC3LNR3dVb6IdpK+hQqckDiZuVqR5zcx+Cd4qqQDJaY 8UAPQ+0mTzK6WxAynrzWbQNzfdWqYCKxSMIwIh9R0i8PvisjAt8Z5yqkjuWAt9WntnFp ElbDTTAfmBvMVLB8ZegIlnivR/i9AWyNOmJoxuLaPWyI0oi7ALdqFn6JwfNCEPykj8eh Gqsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706407729; x=1707012529; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ioZlNdhVFFp1YR+umVhKPytfhVA3rNE8t9IrHnAlzrU=; b=dcukWpljKpVQbraa4RmMR5jnIvcnIQeGVZxxC6gnAaFEpms/rpJTJFrj8FSBlI3anm 3Le2avab9+SsX81ijcdOtUO/yWZ+3/Q/r1+iXfSTUCcvcu1r8r0/EgzzoMzORnURRIL6 3pu3a5hjw24iYBKz6vHyReXfY5bwUeKKpovy4Bk8QRgdnPKk6sTtJxQDMaVSJA937kd0 /0CaxHsdWSKs8H/qHoC95hLpdhkKzJaHWMG0fZgsFhY+J5jVCk5KOuP5Q8xHowsh4BG1 sKvMoC7Qcru8lhwoL91zIvPhHZkY3iSy5NAlPcTm+hNKiUFH6V+9WM+ETX27O8VzqoUV bqCQ== X-Gm-Message-State: AOJu0Yz8oo+Qmrbxd5JZ/nqeNXNF1q4EMQAVU8wxt/LJzRVQUvYzSa2C 8CTh5OWB3vT2Hg/53SQ0FjkAqvlFnLbWhwvIa/+gTTgYVX7BrMFif9W1fm5RtNY= X-Google-Smtp-Source: AGHT+IEDurKL2c8tyKpItUXUAYwXWoRc9cIezwV0znho1MVCvnx2AjXsg+zJ8dkoM0Frpue/Zd0ZXg== X-Received: by 2002:a17:90b:46d3:b0:28b:95f0:b6fa with SMTP id jx19-20020a17090b46d300b0028b95f0b6famr1514070pjb.28.1706407729059; Sat, 27 Jan 2024 18:08:49 -0800 (PST) Received: from debian ([2804:7f0:9181:5bbe:6d6b:5989:d41d:aad8]) by smtp.gmail.com with ESMTPSA id st12-20020a17090b1fcc00b0028ffc524086sm3544353pjb.24.2024.01.27.18.08.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:08:48 -0800 (PST) From: "Rahul M. Juliato" X-Google-Original-From: "Rahul M. Juliato" To: bug-gnu-emacs@gnu.org Subject: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Date: Sat, 27 Jan 2024 23:08:45 -0300 Message-ID: <87il3enr9u.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=rahuljuliato@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello there! I'm the maintainer of ~auto-dark~ for Emacs. Which is an utility package aimed to change Emacs theme when the OS changes it's dark/light mode settings (more here: https://github.com/LionyxML/auto-dark-emacs). Currently I've been contacted by a Windows user that reported me a strange behaviour on Emacs 29 with Windows 10/11. In order to reproduce this behaviour: 1.) Download Emacs from the nearest mirror: https://mirror.us-midwest-1.nexcess.net/gnu/emacs/windows/emacs-29/emacs-29.1_2.zip Unzip it and run ~runemacs.exe~. 2.) Prepare a Powershell Script to Toggle between modes during test Create a file named ~ToggleDarkMode.ps1~ with the following content: #+BEGIN_SRC ps1 $k = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" $v = (Get-ItemProperty -Path $k).SystemUsesLightTheme -bxor 1 Set-ItemProperty -Path $k -Name "SystemUsesLightTheme" -Value $v Set-ItemProperty -Path $k -Name "AppsUseLightTheme" -Value $v #+END_SRC Open PowerShell as system administrator Cd into where you created ~ToggleDarkMode.ps1~ and execute it with: #+BEGIN_SRC shell powershell.exe -noprofile -executionpolicy bypass -file .\ToggleDarkMode.ps1 #+END_SRC Executing this will toggle your Windows looks between dark/light modes. 3.) As shown here in this pictures sequence ~https://imgur.com/a/zSSx2tk~ (If you guys have any Libre imgur alternative, please let me know!) 3.1) We open Emacs + calculator + notepad The only package I have installed is ~auto-dark-mode~, responsible for changing Emacs theme. As the testing Windows machine was on Dark Mode when Emacs opened, both title bar and scrollbar remains as "dark". 3.2) We now run the toggle script (2) again. All Windows apps be come "light", auto-dark changes the theme to a light one, but both the title bar and scrollbar remains "dark". 3.3) I now close Emacs and reopen it Auto-dark changes the theme to "light" and both the title bar and scrollbar becomes "light". 3.2) We now run the toggle script (2) again. All windows apps change to "dark", auto-dark puts Emacs theme to dark, but both title bar and scrollbar remains "light". And you might continue with this and the results is always the same. The problem: It seems Emacs only sets it's title bar and scrollbar colors during initialization, not during run time. I do not know if this is "by design" or "a bug", hence my bug-report. I'd also like to mention that ~auto-dark~ has a hook after changing to both light/dark modes that could be used to run some extra elisp code if needed. Is it possible to change the system title bar/scrollbar colors or "theme" from inside Emacs with Elisp? Could we write some Powershell script and call it from Emacs using ~auto-dark~ hooks? Thanks, Rahul M. Juliato From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 21:40:22 2024 Received: (at 68766) by debbugs.gnu.org; 28 Jan 2024 02:40:22 +0000 Received: from localhost ([127.0.0.1]:56219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTv5q-0005hr-8g for submit@debbugs.gnu.org; Sat, 27 Jan 2024 21:40:22 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:51503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTv5l-0005hZ-2G for 68766@debbugs.gnu.org; Sat, 27 Jan 2024 21:40:20 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-55790581457so1460036a12.3 for <68766@debbugs.gnu.org>; Sat, 27 Jan 2024 18:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706409604; x=1707014404; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=256IcUepVh9GuqaWGWgSVodrLbdSM4lkGHfi7BXa56g=; b=fHCMTKcpw7ghhmwwV89HhAfnmospra2diVpxlasSBnUXWTaupwy52dRyQ04yuXDOuZ 6tRD2g3MSoXoOrlkXcX3jJ5ZhYF0vJ33rR1wXVGVkW6K8s2mr4UoYl2vZVYMrZPrF9LO fHd7iQi6zcAWc3XOUSXGYz0/ZNu1UMS18IyE1mqT3ci64CZ2x5v+tCwzcmdkWlvVyeop ie3SNNKH4gT4TBv1Bm9TcbWCCtR7kdoxuDo3b2GBMfcvopKnkjFi20kMAUtJ9LjYPRTX 62hVhOmPFm0CBqoa5pd+C5W7+bdvx2OFymT1GGl9yHj3lCL/PFLFt/ZWNlL5xa2gCf7S nk7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706409604; x=1707014404; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=256IcUepVh9GuqaWGWgSVodrLbdSM4lkGHfi7BXa56g=; b=BncAhq73zeKTi9ji36DRqL1RkNfkekvB/+2d5ZMoVhN2VWqJpy4VQEnwTtpARlh0z0 bzClL+bOx88ZM5FdrzFgQtOmZ0T7aotA+hipBjTviL3SDEjsM5CNJD7xltKTu6ehO+mV i6SrKlCDJCXwOtMn3RTY9Hu41sEHcf5xOJsoUODSzChbk/d8z8400+OMNM/IygWhmnl4 fGbPbFiL8VighfpOogu+Fw7cfUBErLiJV2mrY7sAQp5lGpPIvp6zKMT74fCKqqHX0Q0B BYxpJQT/Uhe9lQ8q5S9ET+7xM0rmH+LEPf0a6V/d7U4rcmVEtD93WH/t0UVtZlHPn2i8 dJ7A== X-Gm-Message-State: AOJu0YzGl0gLWzbkZ37aoATQsyPvJ+S/yeVxZcb41GsLLpofjKa1/hnT seC6nNdZcn2z1zy2gSVelBCRA78vp9N4xArEKYo2sJUv5Zj8XtrmK48/qmvROdjaX3NNQuHJkql 740QyQKQ4egsRG8nuLLZ9cOaDlcQ= X-Google-Smtp-Source: AGHT+IHLxL6yk7Xq7fMjC/jBbcdDa/CEcuUwU6FhOIGWFUIS3ZNKMqP15347MrM3N1E7VCS28e7qvqiKrp7opCiYWPg= X-Received: by 2002:a05:6402:61a:b0:55c:9237:5fcd with SMTP id n26-20020a056402061a00b0055c92375fcdmr1440715edv.21.1706409603543; Sat, 27 Jan 2024 18:40:03 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 27 Jan 2024 18:40:03 -0800 From: Stefan Kangas In-Reply-To: <87il3enr9u.fsf@gmail.com> References: <87il3enr9u.fsf@gmail.com> MIME-Version: 1.0 Date: Sat, 27 Jan 2024 18:40:03 -0800 Message-ID: Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar To: "Rahul M. Juliato" , 68766@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68766 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Rahul, "Rahul M. Juliato" writes: > I'm the maintainer of ~auto-dark~ for Emacs. Which is an utility package > aimed to change Emacs theme when the OS changes it's dark/light mode > settings (more here: https://github.com/LionyxML/auto-dark-emacs). Nifty mode. Unrelated to your bug, but I was actually thinking about this the other day, and I think we should have support for this available in Emacs out-of-the-box. Users these days expect such functionality to be available. Perhaps we could add auto-dark-mode, or some version of it, to Emacs? Eli, WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 01:38:38 2024 Received: (at 68766) by debbugs.gnu.org; 28 Jan 2024 06:38:38 +0000 Received: from localhost ([127.0.0.1]:56353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTyoP-0004oz-UW for submit@debbugs.gnu.org; Sun, 28 Jan 2024 01:38:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTyoN-0004oh-64 for 68766@debbugs.gnu.org; Sun, 28 Jan 2024 01:38:36 -0500 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 1rTyoA-0006PB-Ai; Sun, 28 Jan 2024 01:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S2g/P5j0PYzT70UiYa8mnl2PtwcmvDaYaVkzxQk6bQs=; b=Wim5HlHgCvQ3 zog/JD9xY0YTZlpM9XQ/IeQtcqoucLI4B6JijAqc+82Z1KJoqdXPxdIxwZ0OBeZpIyaqpOA4v/779 r4CmmeHFNhi8qUMbMUXHhB4Hwl9Xdqrxg4FatatHsSebc8GqQj7yhOmiHlrWBEgLmeoMaxKZAYLc+ zc0qHzF1z8ldc/XyhvKSr71BdwYufP+p7gmU8v9VxBw38R4TSGoeVTEzZWm0RCt8ng5ELi1tkKgAM in76YpSKGlzAjP4vsouC/mSD8L/Rbqq/GpugaJwIto09vdjaBpzi6hdElXtOCyn0CJyiM7Gof8qJ9 GkM2zR/Glbs3lqgM1mzAGA==; Date: Sun, 28 Jan 2024 08:38:20 +0200 Message-Id: <86y1ca55er.fsf@gnu.org> From: Eli Zaretskii To: "Rahul M. Juliato" In-Reply-To: <87il3enr9u.fsf@gmail.com> (rahuljuliato@gmail.com) Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar References: <87il3enr9u.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Rahul M. Juliato" > Date: Sat, 27 Jan 2024 23:08:45 -0300 > > It seems Emacs only sets it's title bar and scrollbar colors during > initialization, not during run time. More accurately, the dark/light theme is examined and affected when Emacs creates a frame. So in the scenario you described, any frames created _after_ running the script should obey the new dark/light setting, but the frames which existed at the time of the change will retain their appearance. > I do not know if this is "by design" or "a bug", hence my bug-report. It's "by design", in the sense that this is how the Dark theme support is implemented in Emacs. If someone submits changes to react to theme change immediately for all the frames, we can consider that for inclusion. > I'd also like to mention that ~auto-dark~ has a hook after changing to > both light/dark modes that could be used to run some extra elisp code if > needed. > > Is it possible to change the system title bar/scrollbar colors or "theme" > from inside Emacs with Elisp? No, it is not currently possible. The code which determines the dark/light mode of a frame runs at frame creation time, so exposing it to Lisp would not be useful. The development version (what will be Emacs 30 in due time) has a user option to opt out of following the system-wide Dark mode, but that option is only useful if set in the init file. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 01:42:38 2024 Received: (at 68766) by debbugs.gnu.org; 28 Jan 2024 06:42:39 +0000 Received: from localhost ([127.0.0.1]:56362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTysI-0004x0-J2 for submit@debbugs.gnu.org; Sun, 28 Jan 2024 01:42:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTysG-0004wk-E9 for 68766@debbugs.gnu.org; Sun, 28 Jan 2024 01:42:36 -0500 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 1rTys3-0006zo-KR; Sun, 28 Jan 2024 01:42:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BDkwf++uqG6J0Drl91BItF4zVNB4WLoXJJ5dZDXxaWE=; b=XNoR0F5zJ3IJ omMY1Q4gv5w7zS+NyAdJwvW/xukx1EVkbC20Tg3/cPd0bZew8Nf7r/bp30vJXeuLJ3AJ6PwlqRyB9 SWINeY47ac8FqwKMMBO8vKAIjs+rw/djo+dUMmc7t+dUlDG1BGmyOVhhQ86qRtzAX//81073nxSNG AiTyDEvpnZvTNJUNvDCE8FiOGJUyHX7+MrEuyxc6R810hxMNr7mxnWr9bw77k/Dxsu6vY1cJwHRoU WK5i8DUe2y1Ei9V7DARUMpbdhnQya5IHJhdhJeYZ+tddVZHGx1hF6bVa4kg2CFI0YcEjabPslOMzz wZklb2PILISjOfLa3WwSwg==; Date: Sun, 28 Jan 2024 08:42:21 +0200 Message-Id: <86v87e5582.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Sat, 27 Jan 2024 18:40:03 -0800) Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar References: <87il3enr9u.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68766 Cc: rahuljuliato@gmail.com, 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Sat, 27 Jan 2024 18:40:03 -0800 > > Hi Rahul, > > "Rahul M. Juliato" writes: > > > I'm the maintainer of ~auto-dark~ for Emacs. Which is an utility package > > aimed to change Emacs theme when the OS changes it's dark/light mode > > settings (more here: https://github.com/LionyxML/auto-dark-emacs). > > Nifty mode. > > Unrelated to your bug, but I was actually thinking about this the other > day, and I think we should have support for this available in Emacs > out-of-the-box. Users these days expect such functionality to be > available. > > Perhaps we could add auto-dark-mode, or some version of it, to Emacs? We already have, sort of, since Emacs 29. See my other response in this thread. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 17:35:13 2024 Received: (at 68766) by debbugs.gnu.org; 29 Jan 2024 22:35:13 +0000 Received: from localhost ([127.0.0.1]:33655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUaDh-0007vt-6Y for submit@debbugs.gnu.org; Mon, 29 Jan 2024 17:35:13 -0500 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:52552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUaDd-0007vW-WF for 68766@debbugs.gnu.org; Mon, 29 Jan 2024 17:35:11 -0500 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2d043160cd1so20639261fa.1 for <68766@debbugs.gnu.org>; Mon, 29 Jan 2024 14:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706567695; x=1707172495; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=TMyWBusx5mgmmcpoJn2rkL5UktIvCquLmodkcCI3oBQ=; b=JvPDpB5xPcr0wUKXazd0XInmu1cJ15GgWsRTsXWlrvOAfk7RQPOUor/jUSD8BPSy4v hP4NkvrqLOaBc4wT8JNCkptOsUz8qIw2i1m8F/+WK5A0lv8xO0D1Al928A9mSyCm9l5B YI/Vh0hUudnr05byVuPUaMQk9wn4I7KEY85Qt8ttvxg7fKLVE/zA7lNM5FY/rCnx04MD 13zXkE5KMEuTvp+y5EMU7UFeuoFUWk9uVakQRv8VKQZu6DxHlu6uXqYQ5TUJOfhXCw5c Q7mmzzCQcXCBDZ6QPUPSowSYC1beph21Y1VR5lwd96oaVeqvTz6WvyrS86Dx4sheueMS /YpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706567695; x=1707172495; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TMyWBusx5mgmmcpoJn2rkL5UktIvCquLmodkcCI3oBQ=; b=jJo3JxyOrQP1p/F0FAJOaCvU4YAcTQfpxcrRcYRgAT6tTVMkH83Oz1OJZRmPVQKrIz dCwOJNQlwg/+gZShb8fXaO+gdpzgVBcbsXVfNlouqE+znUfpFC78HaaAStk8nOzwGa7V PjrTzIcdUJBw3jspmPSYz1Q/XTPPDXbYgKeEO4/rk3CKaLuFUtfuoo7+Jjn1gF5HlBRA B8baLUFgFClPvx4+TtDAetoXCA7A6T3VdGLAyWCBisiGbYG/yJPRG9jxS6irnBLCLid2 wfBO2EhdNWWCnYTXDHhoQ6PuUJwe3PJl0Rcow0dtCN6gj+y7i/a5yDXqjyglSVlv2Hof luIQ== X-Gm-Message-State: AOJu0YyiqzSf/WcgJYBDXL13zfMcZ5NieBfsQ2pMpaJQefRv5uvK3uQz eq5RfAQNZbdVVCEQG7YWmAP4riiJzVkjupssHh49Y+KbXnorQDpiaS6PoDbBcOl+D3Tqjv7N3hU breq+QPUk4OE3Aez+uDJiAMrY7TU= X-Google-Smtp-Source: AGHT+IGA4NMgrB9z3N1wVN78m+36UKNQeWXEN0GM28XwLyEt0jLVd6yF6BQ+ovmdYfah8EWjZu+QfDb/UpAM/QSrwcA= X-Received: by 2002:a2e:6a12:0:b0:2cf:1598:fc26 with SMTP id f18-20020a2e6a12000000b002cf1598fc26mr4402348ljc.22.1706567695060; Mon, 29 Jan 2024 14:34:55 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 29 Jan 2024 17:34:54 -0500 From: Stefan Kangas In-Reply-To: <86y1ca55er.fsf@gnu.org> References: <87il3enr9u.fsf@gmail.com> <86y1ca55er.fsf@gnu.org> MIME-Version: 1.0 Date: Mon, 29 Jan 2024 17:34:54 -0500 Message-ID: Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar To: Eli Zaretskii , "Rahul M. Juliato" Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > It's "by design", in the sense that this is how the Dark theme support > is implemented in Emacs. If someone submits changes to react to theme > change immediately for all the frames, we can consider that for > inclusion. I think that would be a useful feature, indeed. AFAIU, the point of light/dark mode for many users is that they want to use different settings depending on the time of day. This needs the Emacs frame to react to it when the time switches (as most programs in desktop environments like Gnome, or even macOS, do). For example, Emacs on macOS already reacts automatically to light/dark mode settings. I believe this is provided by the toolkit itself, without any changes in Emacs (or I missed them going in). --- On a side note, I still don't think we have support for changing the theme as well, do we? This is the feature that auto-dark-mode provides. In addition to changing the toolbar settings, I'd propose the new user options `theme-dark' and `theme-light' indicating themes to switch to when the desktop environment tells us that it's time. This would be possible if the above new feature could also expose these events to Lisp somehow. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 02:37:52 2024 Received: (at 68766) by debbugs.gnu.org; 30 Jan 2024 07:37:52 +0000 Received: from localhost ([127.0.0.1]:34178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUigq-0005Ve-Ho for submit@debbugs.gnu.org; Tue, 30 Jan 2024 02:37:52 -0500 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:50443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUigp-0005VS-15 for 68766@debbugs.gnu.org; Tue, 30 Jan 2024 02:37:51 -0500 Received: by mail-oi1-x244.google.com with SMTP id 5614622812f47-3be8308b3d3so563934b6e.1 for <68766@debbugs.gnu.org>; Mon, 29 Jan 2024 23:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706600256; x=1707205056; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=smITfMVabwIOgt8qZpw1bNG58qcnjcsnDXVSh9mD/bo=; b=HHw6WGwZl+hBmgJiSXXQs5rvO1OVaDdaeZoih3HYD9zys9qv9QklG7kXGpbCkVyb0c ObnN8gumqUN1T1M10rUyEsWCHDHJ/ntFQF3YLAZZ7E2hH+2oq/DtgbT7hAacUfN7tsV8 +ffWBDJT8KhNRAb6elaXvz2ddUhg0bo739XqLPRRhowmgOa33JrUWx/vV9vTT0a7ebAI nZ8j16engELyBF4Rm9bcVmZ6u1qGrjM3BIVDsOxTNUwRxuVpDMxSDrLPsLRU0teq8P94 WzWiOidZKi2kMwMV6eZsII5+HY8ywxgDuBLZHAjpgp7XC8bfTise4R/kKkMUf1MXxoQW Zoew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706600256; x=1707205056; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=smITfMVabwIOgt8qZpw1bNG58qcnjcsnDXVSh9mD/bo=; b=ex+EIWarXnkPak6YJOzOBDG0GCqFy85zuIHmgFvs5eCsjArn0ot0Ik2E/bpE5NWD2j zHg6/iGvtZn52qE/yqVtwLb1h3DnFWcG+O1B/Sjw/FVaB9yD6RgseebhiwITA1kRx+VV tiHFbIgbjC1ioI0ZjvImDOJUqDefwcFDqgtXIEGGHIxNk7LaaqvOHn11LH1QmYrFeVCD bI6lBvV7JWYjcyZOctoi6N710bKLudmKjgt3v69Vp0E+xyq5m9I/jcVCogNDyAnJRStW FFcWjyl5VwLifv8HTQY439OFZBqeWR2/OU8MP0eJg2u6DJQRAht9T1KgOmc4ux98FupW Kc8A== X-Gm-Message-State: AOJu0Yxs28HwKpsLav8ionw8MjSu8C5/J9iR99wE+FqHHxq+AaieXiu6 ZN0jIDHUy+zYjNRY2X3dIKHNRx6ID5FDxPj43ylDor6z7nVZ+tYI X-Google-Smtp-Source: AGHT+IEvQHl8H43azCo+wa0HqJj4QnG6E9JWQ6VrrWB5obhIX9sEcU1IJVgTIUGUv9IK2MhvJCjy/g== X-Received: by 2002:a05:6358:c90:b0:176:4135:fa3b with SMTP id o16-20020a0563580c9000b001764135fa3bmr6258472rwj.31.1706600256394; Mon, 29 Jan 2024 23:37:36 -0800 (PST) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id a8-20020a62d408000000b006dbdac1595esm7629253pfh.141.2024.01.29.23.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 23:37:35 -0800 (PST) From: Visuwesh To: Stefan Kangas Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar In-Reply-To: (Stefan Kangas's message of "Mon, 29 Jan 2024 17:34:54 -0500") References: <87il3enr9u.fsf@gmail.com> <86y1ca55er.fsf@gnu.org> Date: Tue, 30 Jan 2024 13:07:32 +0530 Message-ID: <87plxjgtkz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68766 Cc: Eli Zaretskii , "Rahul M. Juliato" , 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9C= =E0=AE=A9=E0=AE=B5=E0=AE=B0=E0=AE=BF 29, 2024] Stefan Kangas wrote: > On a side note, I still don't think we have support for changing the > theme as well, do we? This is the feature that auto-dark-mode provides. > In addition to changing the toolbar settings, I'd propose the new user > options `theme-dark' and `theme-light' indicating themes to switch to > when the desktop environment tells us that it's time. I wish we could reuse the frame-background-mode facility [1]. But currently AFAIK, none of the themes exploit the 'background' face display characteristic [2] to set the colours for light and dark backgrounds in the same theme. Perhaps some work can be done in this direction? 1. There's even a commented out dark-mode command in frame.el. 2. (info "(elisp) Defining Faces") and the example definition therein. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 06:58:14 2024 Received: (at submit) by debbugs.gnu.org; 30 Jan 2024 11:58:15 +0000 Received: from localhost ([127.0.0.1]:34483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUmko-00076W-Ju for submit@debbugs.gnu.org; Tue, 30 Jan 2024 06:58:14 -0500 Received: from lists.gnu.org ([2001:470:142::17]:40074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUmkm-00076H-JG for submit@debbugs.gnu.org; Tue, 30 Jan 2024 06:58:12 -0500 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 1rUmkY-0001MR-9v for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 06:57:58 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUmkW-0001om-CM for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 06:57:57 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rUmkT-0000cM-Fp for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 12:57:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Rudolf Schlatte Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Date: Tue, 30 Jan 2024 12:57:45 +0100 Message-ID: References: <87il3enr9u.fsf@gmail.com> <86y1ca55er.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:fIBlpKP8PrAfnbMPCa8AtjMHYcY= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Stefan Kangas writes: > Eli Zaretskii writes: > >> It's "by design", in the sense that this is how the Dark theme support >> is implemented in Emacs. If someone submits changes to react to theme >> change immediately for all the frames, we can consider that for >> inclusion. > > I think that would be a useful feature, indeed. > > AFAIU, the point of light/dark mode for many users is that they want to > use different settings depending on the time of day. This needs the > Emacs frame to react to it when the time switches (as most programs in > desktop environments like Gnome, or even macOS, do). This is what I have in my init file, conditionalized on (eq window-system 'mac). It's not the nicest API, but maybe serves as an inspiration for a better-designed, more general hook. (add-hook 'mac-effective-appearance-change-hook #'(lambda () (pcase (plist-get (mac-application-state) :appearance) ("NSAppearanceNameDarkAqua" (load-theme 'ef-night t)) ("NSAppearanceNameAqua" (load-theme 'ef-frost t))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 08:16:09 2024 Received: (at 68766) by debbugs.gnu.org; 30 Jan 2024 13:16:09 +0000 Received: from localhost ([127.0.0.1]:34571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUnyC-0003SB-Ut for submit@debbugs.gnu.org; Tue, 30 Jan 2024 08:16:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUnyA-0003Ri-JO for 68766@debbugs.gnu.org; Tue, 30 Jan 2024 08:16:07 -0500 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 1rUnxv-0002Vz-GZ; Tue, 30 Jan 2024 08:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ybddSojpFjvUAQgVdTEFOccN6o4hLZMGfI9GtJh7FNM=; b=pv6JwqOHYxtV S3jqUtkd/8qbAzIQQbBtz6/2xWrOsXUe51F+59PyZ5WRh4WZ4WaW41qw4czKDZVNrV5K0WZ/c1WMj H/XuyT5i5jyInXEl0kpvXWR4o2m9iUKtCZW2DLQvpMYc0J9RMXB9p4XrK8Kc1pVISqkIStl/FtFc2 n2NfRz1MwJHzDA8jSGacVV1TSXO+K4Q5EDrUiuVuoPatMGP/9AoIb13mJa7q00IhX7dbj7uAGnCt/ SQRg4SdmcDCBP7isILL0jwEt7eVMLK4LbdVO/Yng3CQVJfiIz0iUVpwZk5SxqBKyIlorVf+D1IKHj J+fg/W5KGJSgvITD5YSKgA==; Date: Tue, 30 Jan 2024 15:15:04 +0200 Message-Id: <86fryf2c9z.fsf@gnu.org> From: Eli Zaretskii To: Rudolf Schlatte In-Reply-To: (message from Rudolf Schlatte on Tue, 30 Jan 2024 12:57:45 +0100) Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar References: <87il3enr9u.fsf@gmail.com> <86y1ca55er.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Rudolf Schlatte > Date: Tue, 30 Jan 2024 12:57:45 +0100 > > Stefan Kangas writes: > > > Eli Zaretskii writes: > > > >> It's "by design", in the sense that this is how the Dark theme support > >> is implemented in Emacs. If someone submits changes to react to theme > >> change immediately for all the frames, we can consider that for > >> inclusion. > > > > I think that would be a useful feature, indeed. > > > > AFAIU, the point of light/dark mode for many users is that they want to > > use different settings depending on the time of day. This needs the > > Emacs frame to react to it when the time switches (as most programs in > > desktop environments like Gnome, or even macOS, do). > > This is what I have in my init file, conditionalized on (eq > window-system 'mac). It's not the nicest API, but maybe serves as an > inspiration for a better-designed, more general hook. > > (add-hook 'mac-effective-appearance-change-hook > #'(lambda () (pcase (plist-get (mac-application-state) :appearance) > ("NSAppearanceNameDarkAqua" (load-theme 'ef-night t)) > ("NSAppearanceNameAqua" (load-theme 'ef-frost t))))) Thanks, but the original report was about MS-Windows, not macOS. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 14:53:07 2024 Received: (at 68766) by debbugs.gnu.org; 30 Jan 2024 19:53:07 +0000 Received: from localhost ([127.0.0.1]:36902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUuAM-0003qX-PQ for submit@debbugs.gnu.org; Tue, 30 Jan 2024 14:53:07 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:52539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUuAK-0003q1-As for 68766@debbugs.gnu.org; Tue, 30 Jan 2024 14:53:04 -0500 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1d8e7df6abcso15557005ad.1 for <68766@debbugs.gnu.org>; Tue, 30 Jan 2024 11:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706644369; x=1707249169; darn=debbugs.gnu.org; h=user-agent:message-id:date:references:in-reply-to:subject:cc:to :mime-version:from:from:to:cc:subject:date:message-id:reply-to; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=SzIgz8esK4PSjvlKYkh1gUkI+Jm5iQtrBNhmlbmzHChns7XN9Q7hFyXTpPfkDbKagH sSijkqM6dwvpgHi8X0MplYt3+UhaSw6T4PzyrEW8uiQdVw9OjNAuPwcY/wtugDdb7O4P zK3nG/TWABz6Yo/ZZ6DPNV8TBfVHoBq+xO3iDI2RjH3/POncg8lPXVqR2Nxj+3lHskT5 26bppz8r/fT1NL4MXRVoPEaRyCX0paloW/wL1nQv7JbVYB29SWLFbGU2Xeda+ejyOuAm 1peAa3ImR1EGIyS/c1PO2HdPf1vX1YvC0R5s8eR29R5WBZkAsWTfHIby3FE+mh1W3wzv JLJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706644369; x=1707249169; h=user-agent:message-id:date:references:in-reply-to:subject:cc:to :mime-version:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uhpTA/Fo4s1ZX9GFkJ2JAQjwWrYkWA9jscVeoXLrkM3B/TKArUFluGF0bcOGiOZ0jN c1fesMrYq+acA9Wc6HVpdc9sQoho09x0BvpySbSyuzGavcYer3Tf41fp3sWW9E6C87es RHlZ9idcoucOY9RAPQDY7wvqc394agSvvl2PccyeVMHE4rmbnR6AbZhzDqjm9EhubCrC VU5JcdChM36s6paJ+cBUX4h32Jyc5nRhtkt8G9FZW2K7N4Hz7rsUQ5yPt9SKBMLntqsr k9y2d6qD7I0MJuogvJvIhWlKvUZUEPk/Y6ZQ2aYUN7MtJDevyvTwFFIEnRXVyQOd8pxR SqcQ== X-Gm-Message-State: AOJu0YwAI6lXCO+jxH/MeBzxx0Hm6DOcg+kn8kou6MLQkuCPRBqDNyzm KPETXx2hFbywKNqhnD3n5+MIATTVKGPFAeUUu4xtdLDtIjnc6oGRolux0w58 X-Google-Smtp-Source: AGHT+IGw1fvDznqGlMKZV/qjAWgphPu78L0iDVi2wAgtrc1hjzoxtOCTBisHcNI6LJSr0EhnH4xFLw== X-Received: by 2002:a17:902:e849:b0:1d9:1b55:a1f with SMTP id t9-20020a170902e84900b001d91b550a1fmr1707222plg.64.1706644368933; Tue, 30 Jan 2024 11:52:48 -0800 (PST) Received: from debian ([2804:7f0:9181:5bbe:6d6b:5989:d41d:aad8]) by smtp.gmail.com with ESMTPSA id w8-20020a170902a70800b001d911dd145esm1450406plq.219.2024.01.30.11.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 11:52:48 -0800 (PST) From: "Rahul M. Juliato" X-Google-Original-From: "Rahul M. Juliato" MIME-Version: 1.0 Content-Type: text/plain To: Eli Zaretskii Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar In-Reply-To: <86v87e5582.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 Jan 2024 08:42:21 +0200") References: <87il3enr9u.fsf@gmail.com> <86v87e5582.fsf@gnu.org> Regarding the side discussion Stefan and Eli were commenting on (and if I am polluting this thread, please tell me where we can take this conversation). I'd be more than happy if `auto-dark-mode` or some version of it gets added to Emacs or some other more "official" package archive than MELPA. I am also happy to help on any other matter I can contribute. Just to be clear of what the package does: - User sets a variable with "dark-mode" theme name; - The same for "light-mode" - Starts the minor mode either manually or on boot (auto-dark-mode) - Emacs changes between these themes whenever system changes its dark/light mode internal state - Also works with Doom Emacs and Spacemacs Systems supported by the detection mechanism: - macos: using `emacs-plus` (faster detection method) or any other emacs build falling back to osascript (a little slower detection method) - gnu/linux: trough dbus with Gnome or gnome modules installed booting another WM, such as Sway or i3 - android: using `Termux` - windows: through powershell or winreg I am currently working on: - nil themes: if the user wants to keep the original Emacs appearance, and/or set both themes to nil, and use only the detection mechanism with auto-dark post detection hooks to do something else. (Done, committed it today). - macos: emacs-mac build trough a faster detection method since someone pointed me there's a similar function to execute applescript than i've used for `emacs-plus` build. - docs: I plan to work shortly on a walk-trough install guide, some development tips and a FAQ If you'd like to keep auto-dark as is today, I think we could add another detection mechanism option such as *emacs-internal-auto-dark*, that may be fed by some internally calculated status into a global elisp variable in which we could use some event/or polling function to keep track of it during the execution of the minor-mode. The tricky part here would be assuring that all graphical toolkits in all OSes can feed the OS system status to Emacs. On either Linux and macOS it seems to be "automatically done"; Windows, as the bug originally described might be harder. Also the source code can be found here: https://github.com/LionyxML/auto-dark-emacs Thank you for the opportunity to share it with you and discuss this matter. Rahul M. Juliato Date: Tue, 30 Jan 2024 16:52:16 -0300 Message-ID: <878r46oaz3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 30 14:57:46 2024 Received: (at 68766) by debbugs.gnu.org; 30 Jan 2024 19:57:47 +0000 Received: from localhost ([127.0.0.1]:36906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUuEs-0003x7-Fw for submit@debbugs.gnu.org; Tue, 30 Jan 2024 14:57:46 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:44336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUuEq-0003ws-Qd for 68766@debbugs.gnu.org; Tue, 30 Jan 2024 14:57:45 -0500 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6daf694b439so2077325b3a.1 for <68766@debbugs.gnu.org>; Tue, 30 Jan 2024 11:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706644649; x=1707249449; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=xhPbnPScCfAG3vBHWhOQE7dFAtlasqxvX+twdt/b0DU=; b=TYAK0AxoP6Ife81ShHwKFSQ6LnVwhzj2JaXpYMpxIdhK0iqoSn//Ld8WC8f91mAR1r X4MqVXeVpm9g25vuh9kKUhg5GD4kEGUHtA6mFUrZ8yiDkzkwU8jFYZFQR9awy+kc+NvF 4uWeElDnRrYWbVZG12heZ/6xMBhlNmgTyniLsNTbO/5lukm1QQQ9U+7u+cKDMmoCyewB C7o5Ki0Ee7a6jiPlY6qzkV9k8s2GT1B7e/3OFQqXAwzuKHBK+dZBt6zIaT6FoKyIpNKC 7ibEBFgCoR9mAgQtyekhlFagpob2PZOUXKgHoC+kWrS0RbEQY6pZEY26VayfXvguPfKz XlMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706644649; x=1707249449; h=mime-version:user-agent:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xhPbnPScCfAG3vBHWhOQE7dFAtlasqxvX+twdt/b0DU=; b=LODPyVAXtcKPPD7IBGf1xCwnnfjhECBIbwDSzhv06PVPFcAfkUWYylRCLGqZRJFodu Bp1wzS0lc4yw22aOy53w5EuYWCCsdy9DokiFJPPuLWD2uuM+5l8fj31s8Ibm4Q5S+S8t 1iv7kAMfQexkKw4BwY3uqQpcaE6fPzsOukprn3/F4DVaDQ637Bf5ORtZ49Zh9DCMERpd F5lFdWRLq+4+4gOY1GM16imYO8rQfW2k4h7TYGonS1wkrLY4RWSMpZqnvif1Tq7H4YRD i+u8adx05GKd2aeAw4W7p5OWzKbDVFJSJZWjuE+0EASHRyOY74fJYO9srwm3EdlfCCEA gVWQ== X-Gm-Message-State: AOJu0Yx6jAGSKQXcCP4aMZn9dQs+s4MbAVN8pZX/dJnZ1qXmYLGYHI2B MJVq3BfO2SUMHFoyxyyREqu3IX/GvcPMhQ4YK5KAoUzXlQWbspyA1YmlMmEL X-Google-Smtp-Source: AGHT+IGtJwGNc4OMLwH4k/DCQrm96deADnd8SncEIlLWrNQxrTy7U3wnu+dSiS/0sLlplmm3MOAb1g== X-Received: by 2002:aa7:91ce:0:b0:6de:a1b:a122 with SMTP id z14-20020aa791ce000000b006de0a1ba122mr189798pfa.12.1706644649567; Tue, 30 Jan 2024 11:57:29 -0800 (PST) Received: from debian ([2804:7f0:9181:5bbe:6d6b:5989:d41d:aad8]) by smtp.gmail.com with ESMTPSA id i8-20020a056a00004800b006ddc40fd1easm8547584pfk.173.2024.01.30.11.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 11:57:29 -0800 (PST) From: "Rahul M. Juliato" X-Google-Original-From: "Rahul M. Juliato" To: Eli Zaretskii Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Date: Tue, 30 Jan 2024 16:57:26 -0300 Message-ID: <874jeuoaqh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello there again! Regarding the side discussion Stefan and Eli were commenting on (and if I am polluting this thread, please tell me where we can take this conversation). I'd be more than happy if `auto-dark-mode` or some version of it gets added to Emacs or some other more "official" package archive than MELPA. I am also happy to help on any other matter I can contribute. Just to be clear of what the package does: - User sets a variable with "dark-mode" theme name; - The same for "light-mode" - Starts the minor mode either manually or on boot (auto-dark-mode) - Emacs changes between these themes whenever system changes its dark/light mode internal state - Also works with Doom Emacs and Spacemacs Systems supported by the detection mechanism: - macos: using `emacs-plus` (faster detection method) or any other emacs build falling back to osascript (a little slower detection method) - gnu/linux: trough dbus with Gnome or gnome modules installed booting another WM, such as Sway or i3 - android: using `Termux` - windows: through powershell or winreg I am currently working on: - nil themes: if the user wants to keep the original Emacs appearance, and/or set both themes to nil, and use only the detection mechanism with auto-dark post detection hooks to do something else. (Done, committed it today). - macos: emacs-mac build trough a faster detection method since someone pointed me there's a similar function to execute applescript than i've used for `emacs-plus` build. - docs: I plan to work shortly on a walk-trough install guide, some development tips and a FAQ If you'd like to keep auto-dark as is today, I think we could add another detection mechanism option such as *emacs-internal-auto-dark*, that may be fed by some internally calculated status into a global elisp variable in which we could use some event/or polling function to keep track of it during the execution of the minor-mode. The tricky part here would be assuring that all graphical toolkits in all OSes can feed the OS system status to Emacs. On either Linux and macOS it seems to be "automatically done"; Windows, as the bug originally described might be harder. Also the source code can be found here: https://github.com/LionyxML/auto-dark-emacs Thank you for the opportunity to share it with you and discuss this matter. Rahul M. Juliato From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 03 04:57:23 2024 Received: (at 68766) by debbugs.gnu.org; 3 Feb 2024 09:57:23 +0000 Received: from localhost ([127.0.0.1]:45892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWCm3-0002x8-4j for submit@debbugs.gnu.org; Sat, 03 Feb 2024 04:57:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWCm1-0002ww-UF for 68766@debbugs.gnu.org; Sat, 03 Feb 2024 04:57:22 -0500 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 1rWCll-0002ix-C6; Sat, 03 Feb 2024 04:57:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HqFq9tcZqRQ8czjy4VP42oe5q3DFhN0GeE8kJXOd0hE=; b=E8cQRoGBamAI R/QOh5CrzgU/m9HHnibZEwXcVhb9OKH1Ix+I3rpbGBvkapNvFyW2nr8WuF5s7ilpEY9qWfud93C3Q o2mInE4Br8PZy+czIzsSmthS/5J+XTvB6byZQlWuUpNNXx0eru1n44rjSe01j/FD6jfO5Ds+gnA/N c+BWp/cM0nFzI4x4mFV/eXzzxhlDRdr5zbD95FsjJvZrW+le8MnEI89oxbyR7EPpW4LzUIKOYYR+y VY1HAPv/n/OqXQhGGJRypXhbbGq9CkNVdbxFwfwBkddTNurAHi/jA/l4gqXNdCACu0mGtj9wGkd5w oe73gGCpKni7LsiH0+k9ew==; Date: Sat, 03 Feb 2024 11:57:00 +0200 Message-Id: <8634u950r7.fsf@gnu.org> From: Eli Zaretskii To: "Rahul M. Juliato" In-Reply-To: <874jeuoaqh.fsf@gmail.com> (rahuljuliato@gmail.com) Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar References: <874jeuoaqh.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68766 Cc: 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Rahul M. Juliato" > Cc: 68766@debbugs.gnu.org > Date: Tue, 30 Jan 2024 16:57:26 -0300 > > Hello there again! > > > Regarding the side discussion Stefan and Eli were commenting on (and if I am > polluting this thread, please tell me where we can take this conversation). > > > I'd be more than happy if `auto-dark-mode` or some version > of it gets added to Emacs or some other more "official" package archive than > MELPA. I am also happy to help on any other matter I can contribute. > > > Just to be clear of what the package does: > > - User sets a variable with "dark-mode" theme name; > > - The same for "light-mode" > > - Starts the minor mode either manually or on boot (auto-dark-mode) > > - Emacs changes between these themes whenever system changes its dark/light > mode internal state > > - Also works with Doom Emacs and Spacemacs > > > Systems supported by the detection mechanism: > > - macos: using `emacs-plus` (faster detection method) or any other emacs build > falling back to osascript (a little slower detection method) > > - gnu/linux: trough dbus with Gnome or gnome modules installed booting another > WM, such as Sway or i3 > > - android: using `Termux` > > - windows: through powershell or winreg Regarding the Windows solution: aren't there better alternatives than using Powershell or Registry? I'd prefer doing this programmatically in C using some suitable APIs, if possible. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 18 20:17:06 2024 Received: (at 68766) by debbugs.gnu.org; 19 Feb 2024 01:17:06 +0000 Received: from localhost ([127.0.0.1]:40009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbsHK-000538-Go for submit@debbugs.gnu.org; Sun, 18 Feb 2024 20:17:06 -0500 Received: from mail-pg1-f176.google.com ([209.85.215.176]:60827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbsHE-00052V-T5 for 68766@debbugs.gnu.org; Sun, 18 Feb 2024 20:17:04 -0500 Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-5cfd95130c6so2287811a12.1 for <68766@debbugs.gnu.org>; Sun, 18 Feb 2024 17:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708305334; x=1708910134; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=INFiOBbNsSrR8WI7gEUP6EqC9t1kBLgs57KzBe1OdRE=; b=BqHUuiylaLEv8uwQ0IOwFEJND6HoDRaUv9W2ff8SSRaS06Qv+2yAU1TpiudOuXe1J/ nBp9/QfqsuQc8oYLA+khXnigMn5y2Ldh1Gc5dSQGNOZAByaIAekqcZoQLsjPrpfLtdDq 1u/n6Kp8yGv5gOGvqJ3dgqtq2R8jS0ekBLjEPfmtDt/FW6sYSr7BuIR/YejrfX8Ae6Kx srIi4z6HVAIkDnPy6G4tTzf1EgwkdcHskR1gXwY4A/9NIK/BY60pHENmkMULaIPcnvUY YiZdJciuEQGOMlwT8fvMrJk1gNY1e9GNrCV6EUfyZDVfNKua/QVtk6wxImCrFyZ5xqND 1XMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708305334; x=1708910134; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=INFiOBbNsSrR8WI7gEUP6EqC9t1kBLgs57KzBe1OdRE=; b=DnLejckG6XESaF+02Dpv4fV4NyfGRBMV1n+rdd5JFM8uDRjQIpBZbpnHuR8t4B9VsY +QYJnXvpWkM8ylay6BgtP95xr95PBnPlHzJN/nUCoI1fLptC+kovHkb6245YuQPJDqrr aPUABwVowOqE6SsRCYCjBgcnLQO3gWaAj5IZDcAeHwjht/HNId2xTvnrpTe7F5NFFZSB /9iNUs43b65tgqPqQrK+WiORjJveLFMrduUcpiWQBiUx+/hM7JsZ3VWRaKVUYn0eYlsQ OAPN2zXipo8akCnm6q81oXFEhsycE/KCUD8D3yLqpTQrFywY3/a2xgsom8nB1fCqOlJB IwbQ== X-Forwarded-Encrypted: i=1; AJvYcCU2fne334hhH9epyY/RlGA1zYXtJ1PyTG/Lrq7DoU3RC+/Nvf9tEj1bBf5f8btZNsp3ZBOMfuB2vNdSc8njUkqBwTdDEXk= X-Gm-Message-State: AOJu0YwvIwQotiP4Bf/vL0hO9BNMhZfkLlqNKpLwu7AP2O9cJdZzdgL/ urO3ClU5t3VGteaTm1KHcnucF1P3Ze9Pxc/CF5AnnYzvQ0TqCJJBdcXmp9IhsL4= X-Google-Smtp-Source: AGHT+IHhE/zYraTIP5uWvkA1odaRDhWKcO05i5Tf9szgeNhxhlR0j/weZpF39SCK5hEtHllLXEZIvQ== X-Received: by 2002:a17:90a:fe93:b0:299:72d7:5b9a with SMTP id co19-20020a17090afe9300b0029972d75b9amr1350261pjb.24.1708305333750; Sun, 18 Feb 2024 17:15:33 -0800 (PST) Received: from debian ([2804:7f0:9183:fd00:a73b:ff57:9210:1011]) by smtp.gmail.com with ESMTPSA id pd6-20020a17090b1dc600b0029930881068sm3985912pjb.49.2024.02.18.17.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 17:15:33 -0800 (PST) From: "Rahul M. Juliato" X-Google-Original-From: "Rahul M. Juliato" To: Eli Zaretskii Subject: Re: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar In-Reply-To: <8634u950r7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Feb 2024 11:57:00 +0200") References: <874jeuoaqh.fsf@gmail.com> <8634u950r7.fsf@gnu.org> Date: Sun, 18 Feb 2024 22:15:30 -0300 Message-ID: <87v86l2r0t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 68766 Cc: "Rahul M. Juliato" , 68766@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) I am sorry, I haven't figured out a way to make it from the C code yet.