From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Sun, 11 Sep 2022 11:42:33 +0000 Message-ID: <87a676jfx2.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57639@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 11 13:43:12 2022 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 1oXLMl-0009rj-AI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Sep 2022 13:43:11 +0200 Original-Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXLMk-0000Kb-4j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Sep 2022 07:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXLMc-0000KH-U3 for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2022 07:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXLMc-0004Qo-FP for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2022 07:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXLMc-00064S-7X for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2022 07:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 11:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166289656323304 (code B ref 57639); Sun, 11 Sep 2022 11:43:02 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 11:42:43 +0000 Original-Received: from localhost ([127.0.0.1]:40994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXLMI-00063o-Sw for submit@debbugs.gnu.org; Sun, 11 Sep 2022 07:42:43 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:51737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXLMH-00063Y-5O for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 07:42:41 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A1EFA240103 for <57639@debbugs.gnu.org>; Sun, 11 Sep 2022 13:42:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662896555; bh=uZy6w8SPHRiXm36XtgBaC0Lf19Rw2N/nmqOOwOhoE90=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=e8owUIRIjYOedtnsInVC2lsJSqQqlAXZ1BMEtPSvnc6SJ/gZ8U8IsSZn2RzryPMgP kZUDQFJ9/OgWrd0tt28557ruZIYBh/7alhZDk3NFzDcfq+IerCrvLIsDKPLv4n3sNu Mzp7jCeQa9+oafWWNdOyW1hOtFLfCgtGpxFhSVf0FXdulH9NF3hjiHHRkP5I8bjiCU GUPQ5euVmzC1x+drXxDob/TCHWZ8MfDKYkVwmAKuFTLucBusaFNycy3AlOJni4y9X9 ifUGFyH6V9QVpxrp0fTmyk+JrkKSyfVN7hvR2Oa0DQ8Gx7pXU4CPIZpdmaLR6GZmDH C9GsQMHQKF3Hg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MQSWt6jNVz6tmF; Sun, 11 Sep 2022 13:42:34 +0200 (CEST) In-Reply-To: <87fsgygo7c.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 11 Sep 2022 13:11:51 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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:242157 Archived-At: Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> So we are thinking about something like a symbol property >> `theme-variants' that each theme symbol may have attached. This symbol >> could point to a list representing a set of alternatives. Let's say the >> set might contain the theme itself (for the sake of convenience), so it >> is remq'ed before we check if the set has more than one alternative. If >> it does we use a modified `load-theme'-like prompt, otherwise we toggle. >> I think it would also make sense to silently remove non-existent themes >> automatically, in case a variant theme is not part of the same package. > > I think that sounds correct, but I'm not 100% sure. =F0=9F=98=80 Ok, I'll implement this then. >>> And in addition, this tagging could be used for automatic dark/light OS >>> changes, so it's at least three birds with one stone. >> >> OK, but that is a long-term plan, or do the means already exist for >> detecting these kinds of changes? > > Code exists for both Windows and Macos in the bug tracker somewhere, but > haven't been integrated yet because nobody has sat down to make a > consistent interface across all the platforms. What about GNU/Linux desktops? >> Also, how to be distinguish between what is light and dark, and what do >> we do when a theme has multiple variants? > > I'm not sure what you mean -- the proposal is to make the themes say > whether they consider themselves to be light or dark. And I don't think > a theme would have multiple dark variants. Stefans Gruvbox example had multiple dark and light variants. E.g. Would the new command toggle from `gruvbox-dark-soft' to `gruvbox-dark-light' or prompt the user to select from all the gruvbox themes? Lars Ingebrigtsen writes: > Lars Ingebrigtsen writes: > >> I'm not sure what you mean -- the proposal is to make the themes say >> whether they consider themselves to be light or dark. And I don't think >> a theme would have multiple dark variants. > > But now I see that you've pushed `toggle-theme'... *sigh* I'm very sorry about that, I've reverted those commits, since they were accidentally pushed!