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: Wed, 07 Sep 2022 08:33:08 +0000 Message-ID: <87pmg7lh2z.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57639@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 07 10:52:40 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 1oVqnW-00020J-UF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Sep 2022 10:52:39 +0200 Original-Received: from localhost ([::1]:45396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVqnV-0006KG-PH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Sep 2022 04:52:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVqVW-0005GF-8P for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 04:34:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVqVV-0000VO-Uw for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 04:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVqVV-000235-Qa for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 04:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 08:34:01 +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.16625396007820 (code B ref 57639); Wed, 07 Sep 2022 08:34:01 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 08:33:20 +0000 Original-Received: from localhost ([127.0.0.1]:53350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVqUq-000223-53 for submit@debbugs.gnu.org; Wed, 07 Sep 2022 04:33:20 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:32795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVqUn-00021o-8n for 57639@debbugs.gnu.org; Wed, 07 Sep 2022 04:33:18 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0BB4A240103 for <57639@debbugs.gnu.org>; Wed, 7 Sep 2022 10:33:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662539591; bh=kJv1T1oF2KeGDSaTSH2gnW8LEltd3J6LM8jKBAkHDys=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=KjMmSy9GWjyZyoIiI6/iNKfVNjIchbOdV+vfyPkPB5yVSX2Trvz7K/zmoXCOWEoKL bjAQIdCtoAv0DWrbTZn501hL7xyn7pBgblO99OMK/IL6cPDKRuBQtql6Cjrw6zi4ie ZYTietxCbo24bWCYcXecZ742706GK7FsMIZpglicaKqGJhN/Y/Ez7UlZrA/x6oa7/R QtCfDGRp8B0c/IkO0rcx1E7z2WoOADlICVxZjafz7B+86FTwlEPHEpDL26G3HxA8KP GyNH892cXFe2XuJOSzbpTImjrjWC0Z9HjzAJnfxuKgi33enAwsZVJzDGTxlbe8IPDJ 7pvrNPeqk7afg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MMwW94Sv1z9rxQ; Wed, 7 Sep 2022 10:33:08 +0200 (CEST) In-Reply-To: (Stefan Kangas's message of "Wed, 7 Sep 2022 04:06:36 -0400") 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:241729 Archived-At: Stefan Kangas writes: > Philip Kaludercic writes: > >> Find below a patch for a command that a lot of custom themes >> re-implement, whenever there exists a light and dark variant. > > Could/should this be generalized to more than two variants? In principle the current implementation doesn't insist on there only being two variants. Each theme defines its dual, and these don't have to be symmetrical. > The gruvbox theme, for example, has these variants: > > gruvbox-dark-hard > gruvbox-dark-medium > gruvbox-dark-soft > gruvbox-light-hard > gruvbox-light-medium > gruvbox-light-soft > > But I'm not sure what a reasonable user interface would look like. E.g. in this case one could do: (put 'gruvbox-dark-hard 'theme-dual 'gruvbox-dark-medium) (put 'gruvbox-dark-medium 'theme-dual 'gruvbox-dark-soft) (put 'gruvbox-dark-soft 'theme-dual 'gruvbox-light-hard) (put 'gruvbox-light-hard 'theme-dual 'gruvbox-light-medium) (put 'gruvbox-light-medium 'theme-dual 'gruvbox-light-soft) (put 'gruvbox-light-soft 'theme-dual 'gruvbox-dark-hard) But wouldn't just associating gruvbox-dark-hard with gruvbox-light-hard, etc. be just as good?