From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 07:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 57639@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166253519032709 (code B ref -1); Wed, 07 Sep 2022 07:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Sep 2022 07:19:50 +0000 Received: from localhost ([127.0.0.1]:53243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVpLi-0008VT-12 for submit@debbugs.gnu.org; Wed, 07 Sep 2022 03:19:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:59402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVpLf-0008VE-FG for submit@debbugs.gnu.org; Wed, 07 Sep 2022 03:19:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVpLa-00004w-CV for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 03:19:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVpLX-000639-Lz for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 03:19:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 16E8824002A for ; Wed, 7 Sep 2022 09:19:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662535177; bh=pZbeE2viNzs3FrR+80kOAyAzmB1HZjj2cYOO4rFTB0o=; h=From:To:Subject:Autocrypt:Date:From; b=mUxSt2LWxr5K+KGX5FgtRF1vauHd+9uAJV+hen20iU7CDz3Dw73/XNDFaO6PMIOSw dsQreAiRbVbi0hyhV1R+P3d4xHvQVNBzAbn1MYxeFEQarOtkQZdMwu12q635CDYrqg TVvCOF2aM2f2T9WT56afyurjm7aJ0sAHB/PgX1SHu7CUyrxT7iup+JrKvEU2TY+LQA 34zUxQC7qu3jmBO3g9Ubss2XLNhvT0tZtAAUN4lJscuOfFaTu5g36Q7ZhtmnCHiL5c 2xmw6zUZI79kx8Bq1YVWvmAHnKCewqhl3rVA8VY5niL8JTm9N+O0OnwoNI2ZowZqV5 kX5UPJXYrCSlA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MMttJ3P7Bz6tm9 for ; Wed, 7 Sep 2022 09:19:36 +0200 (CEST) From: Philip Kaludercic 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 Date: Wed, 07 Sep 2022 07:19:30 +0000 Message-ID: <875yhzmz25.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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.3 (-) 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.3 (--) --=-=-= Content-Type: text/plain Tags: patch Find below a patch for a command that a lot of custom themes re-implement, whenever there exists a light and dark variant. In GNU Emacs 29.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-03 built on rhea Repository revision: 2763a516a048c2cbabb10a5bbe22dc3bbde561f3 Repository branch: master System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --with-pgtk --with-native-compilation --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-new-command-toggle-theme.patch >From 2f27885460095a247421431faca14bf35fae3995 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 6 Sep 2022 20:53:35 +0200 Subject: [PATCH 1/2] Add new command 'toggle-theme' * doc/emacs/custom.texi (Custom Themes): Mention it. * etc/themes/leuven-dark-theme.el (leuven-dark): Add dual theme. * etc/themes/leuven-theme.el (leuven): Add dual theme. * etc/themes/tango-dark-theme.el (tango-dark): Add dual theme. * etc/themes/tango-theme.el (tango): Add dual theme. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add dual theme. * etc/themes/tsdh-light-theme.el (tsdh-light): Add dual theme. * lisp/cus-theme.el (describe-theme-1): Say if a theme has a dual. * lisp/custom.el (toggle-theme): Add new command. --- doc/emacs/custom.texi | 5 +++++ etc/themes/leuven-dark-theme.el | 4 +++- etc/themes/leuven-theme.el | 4 +++- etc/themes/tango-dark-theme.el | 2 ++ etc/themes/tango-theme.el | 2 ++ etc/themes/tsdh-dark-theme.el | 2 ++ etc/themes/tsdh-light-theme.el | 2 ++ lisp/cus-theme.el | 2 ++ lisp/custom.el | 19 +++++++++++++++++++ 9 files changed, 40 insertions(+), 2 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..3dabba9d2f 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,11 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex toggle-theme + Some themes have dual variants (most often these are light and dark +pairs). You can switch between these by typing @kbd{M-x +toggle-theme}. Note that this only works if only one theme is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..cef40782c1 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220906.2016 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1083,6 +1083,8 @@ leuven-dark (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven-dark 'dual-theme 'leuven) ;see `toggle-theme' + (provide-theme 'leuven-dark) ;; This is for the sake of Emacs. diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..73ac96d28d 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220906.2016 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1065,6 +1065,8 @@ leuven (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven 'dual-theme 'leuven-dark) ;see `toggle-theme' + (provide-theme 'leuven) ;; This is for the sake of Emacs. diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..f9f2692ac5 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -190,6 +190,8 @@ tango-dark `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango-dark 'dual-theme 'tango) ;see `toggle-theme' + (provide-theme 'tango-dark) ;;; tango-dark-theme.el ends here diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..8d1686f05e 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -173,6 +173,8 @@ tango `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango 'dual-theme 'tango-dark) ;see `toggle-theme' + (provide-theme 'tango) ;;; tango-theme.el ends here diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..ad54eb3df0 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -142,6 +142,8 @@ tsdh-dark '(widget-field ((t (:box (:line-width 2 :color "grey75" :style pressed-button))))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-dark 'dual-theme 'tsdh-light) ;see `toggle-theme' + (provide-theme 'tsdh-dark) ;;; tsdh-dark-theme.el ends here diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..64c048f7e5 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -104,6 +104,8 @@ tsdh-light '(show-paren-mismatch ((t (:background "deep pink" :weight bold)))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-light 'dual-theme 'tsdh-dark) ;see `toggle-theme' + (provide-theme 'tsdh-light) ;;; tsdh-light-theme.el ends here diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 69ec837db8..04d9ed0004 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -515,6 +515,8 @@ describe-theme-1 (end-of-file nil))))) (and (eq (car-safe sexp) 'deftheme) (setq doc (nth 2 sexp))))))) + (when-let ((dual (get theme 'dual-theme))) + (princ (format " The dual theme is `%s'" dual))) (princ "\n\nDocumentation:\n") (princ (if (stringp doc) (substitute-command-keys doc) diff --git a/lisp/custom.el b/lisp/custom.el index 96dfb37d86..ec15267c62 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1374,6 +1374,25 @@ load-theme (enable-theme theme)) t) +(defun toggle-theme (&optional no-confirm no-enable) + "Toggle the current active theme by enabling its dual pair. +The current theme will be immediately disabled before the dual +theme has been enabled. If THEME is not active an error will be +raised. If theme is nil For NO-CONFIRM and NO-ENABLE, see +`load-theme'." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car custom-enabled-themes)) + (dual (get theme 'dual-theme))) + (unless dual + (error "`%s' has no dual theme to toggle between" theme)) + (disable-theme theme) + (load-theme dual no-confirm no-enable))) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.2 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 08:07: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 To: Philip Kaludercic , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16625380045130 (code B ref 57639); Wed, 07 Sep 2022 08:07:02 +0000 Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 08:06:44 +0000 Received: from localhost ([127.0.0.1]:53309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVq56-0001Kg-Ix for submit@debbugs.gnu.org; Wed, 07 Sep 2022 04:06:44 -0400 Received: from mail-oa1-f47.google.com ([209.85.160.47]:41774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVq54-0001KS-Np for 57639@debbugs.gnu.org; Wed, 07 Sep 2022 04:06:43 -0400 Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-12803ac8113so864269fac.8 for <57639@debbugs.gnu.org>; Wed, 07 Sep 2022 01:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date; bh=uSsdqkmAazNw+ZSq/dg/w2yEiiNgePXjj2hEw7XpN3U=; b=T1QE0rVc1MBFK/1o5VpcJkfg+zmFnImWPF0C/8TCK2ekk47TQpqZf66RcQcd/VJs4R vmoqfOQGYc3wjUOE/VB/m31Tbzgp01MiGJodCCp/c+MMQ1OR9UFL12A3B8VFTe4133ve aDQO0TFT69/R/NtaGxzxIktfBzOLEvIcs2p3m6c1nd9XgrPneg85wxhyZM4lxpPJYLrB fpEnEcHo7gLTub0bkh6INjhRS+H4ICP7ZpRoxi8GRmG55W9Uugc5O0m7nk6GRFej8vGG k3ZLCeOvj631svBOjCBilPkxOLgdO7EVogwzamfnspYq8GPrP/4yxNomppF0bGyE+/FV 65Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date; bh=uSsdqkmAazNw+ZSq/dg/w2yEiiNgePXjj2hEw7XpN3U=; b=MNDAsU8dJ38Vge7pPYLIZoVcMxyuMYG5SWNjmfWWxQnlY/0XYyfjq6ENADa1bZcVbX CV/qZDJZnzLxU2mcwhIL9l4B01WlOwylyUuqVcr6JmsYmIZ+TXh11+htkBq6bVk87Uo3 s4b09YjirQKHi1H2r9U6u19XbH/pvFMkJLncobt8rU2kjf2D+l7+VprXA90J+AxXtR1A t3M9l1u9Z7v0AhHp8g9uFF2+6ihq5vpNaaWZ1ekjiRGBaMlAf1kDomsZkwP/HI28nf8E L+nXb/0Y12BJMxBS3xGbpBvzz6OAPZjxjGPQHBJmwKUmpO/NzZtpgQu22+sUJKFoAxsq vAcQ== X-Gm-Message-State: ACgBeo2uG6NacaBdYPiray2BheYITL7mS3sWrNqlKs70q9ad+JedXs4N BuRTsdu4aRN5W7GS4D81HJyq0KMV58MEceCJFZ0= X-Google-Smtp-Source: AA6agR5nSnBlXa/B1obL2ZOu5acv3BNYAd4l+f+MyQ2qMwpWk5BqyE9wNHNPy3+SdCoz4OkNGoNTlQraRycK9MR1Omw= X-Received: by 2002:a05:6870:5581:b0:11e:300:8189 with SMTP id n1-20020a056870558100b0011e03008189mr13854317oao.199.1662537997177; Wed, 07 Sep 2022 01:06:37 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 7 Sep 2022 04:06:36 -0400 From: Stefan Kangas In-Reply-To: <875yhzmz25.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> X-Hashcash: 1:20:220907:philipk@posteo.net::6ZbC6bxsRpmQy4eG:20AQ MIME-Version: 1.0 Date: Wed, 7 Sep 2022 04:06:36 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) 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 (-) 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? 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. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' 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 To: Stefan Kangas Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16625396007820 (code B ref 57639); Wed, 07 Sep 2022 08:34:01 +0000 Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 08:33:20 +0000 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 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 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== 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) From: Philip Kaludercic In-Reply-To: (Stefan Kangas's message of "Wed, 7 Sep 2022 04:06:36 -0400") References: <875yhzmz25.fsf@posteo.net> 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 Date: Wed, 07 Sep 2022 08:33:08 +0000 Message-ID: <87pmg7lh2z.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) 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? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 08:53: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16625407309787 (code B ref 57639); Wed, 07 Sep 2022 08:53:02 +0000 Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 08:52:10 +0000 Received: from localhost ([127.0.0.1]:53370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVqn4-0002Xm-60 for submit@debbugs.gnu.org; Wed, 07 Sep 2022 04:52:10 -0400 Received: from mail-oa1-f48.google.com ([209.85.160.48]:36367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVqmy-0002XE-I7 for 57639@debbugs.gnu.org; Wed, 07 Sep 2022 04:52:08 -0400 Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-127ba06d03fso10806954fac.3 for <57639@debbugs.gnu.org>; Wed, 07 Sep 2022 01:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date; bh=l9OYPgFr4lBWl0vnL3406ZN/abkITBi68zd9it19wNs=; b=h2Q+emaYcAH85FwS6SadBkRbhAcADFRdFVQ4vnztEJ5PUc+MjoCgYuWrdXr+lHqerZ 1zqTiL/6rIm0Ii+woZKw2L26kMOoBwUwKGXyZ7xBM2fAiW/wBRWGYaW6C2fttz1pyUDc UM7ooUuO3ojuKsBLJCHd8+bAzxbPCzF0f1kcVev+mn2HRGIou6Gz6nm8RHcMgbsE4QDr bZELo2OoCCdkR3mNJztlE5aPrOm3vA5fzwcTJquwmmWQf8xH8riL8BJO8lvG4VJag8// yhb7r8U/IwPi2bp2T89LQLdyUtKnx+wcoQD8nRKsSUmRlCPkX1trqDPy1qq+34CtXtnk ES0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date; bh=l9OYPgFr4lBWl0vnL3406ZN/abkITBi68zd9it19wNs=; b=aAYQsngnX4WIHeFqQW4h8V6xZICQb5I4RuDE1AS1AA15bGFsiuBAGtL8DjqdIdS/32 GxkpY/te90iHWZTQUKDbAFjK0UskdGlphtfebEDGsmSMZiplxED6yWUFcpp1cGVQwj2D JgrI6zlvem+g0R7lixKOiCGlwwj4zaFr52OvOc87k38nJJUgzm7Fck1Oq41+OqoJjjhl 45CDkaHnLs2Vil66YTeA/T/5CPCKSlPM8B3dP005mkT/kA+Hp6s6xZgEvl9Paidqs1zW oXtP+eVIavVJF627vg8G5G89A/WOI804YDg4bsH5wKY1+tEDgUW2g1L3ly855cXDhdn6 PV+Q== X-Gm-Message-State: ACgBeo29f9A7yQ1J5CNj6YmJaK2FUA8sPk0mmBh4WbSIwrtEDmWP2Ypd sXgZ7VVFZYA1I/b3pvrG2KhPdjeylge7+23Ezw0= X-Google-Smtp-Source: AA6agR6upVovHCzGNrs/oHuY13vZ/kwaRMH2i6NJgT28LkxHCE0z+aoKkGNfSbM/vypzIblXloCvxN+btdrCJ+LOvDw= X-Received: by 2002:a05:6808:1688:b0:345:ea9a:2954 with SMTP id bb8-20020a056808168800b00345ea9a2954mr11596325oib.199.1662540718914; Wed, 07 Sep 2022 01:51:58 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 7 Sep 2022 01:51:58 -0700 From: Stefan Kangas In-Reply-To: <87pmg7lh2z.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <87pmg7lh2z.fsf@posteo.net> X-Hashcash: 1:20:220907:philipk@posteo.net::XzHDKP5LuJacItZ/:6abB MIME-Version: 1.0 Date: Wed, 7 Sep 2022 01:51:58 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) 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 (-) Philip Kaludercic writes: > 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. That sounds good, thanks for clarifying. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 13:04: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166255581520114 (code B ref 57639); Wed, 07 Sep 2022 13:04:02 +0000 Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 13:03:35 +0000 Received: from localhost ([127.0.0.1]:54008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVuiN-0005EL-3I for submit@debbugs.gnu.org; Wed, 07 Sep 2022 09:03:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVuiK-0005E4-FE for 57639@debbugs.gnu.org; Wed, 07 Sep 2022 09:03:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B91TsdjELM2aq/DV6POJmnipJWs9Ok3Swr7ou0+pIUY=; b=WU8oTbgsmjtP99NhO/zh/9PaDD UOsP8tyQQz9opG65rf9EVfR9c1aaHsxB6STc/C3e694BmK3WVfwqtzA9Bw2rDc12CZH1DCeJ4a5Ry x+TlaNDwL/qogr3tzViZ/5R+XqLiYSq9ZTqLJr+MjyhM8nBjvjCs7b75TYKkUdVjMPP8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVuiC-000702-87; Wed, 07 Sep 2022 15:03:26 +0200 From: Lars Ingebrigtsen In-Reply-To: <875yhzmz25.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 07 Sep 2022 07:19:30 +0000") References: <875yhzmz25.fsf@posteo.net> X-Now-Playing: The Senior Allstars - =?UTF-8?Q?=E2=80=98Slipping?= Into =?UTF-8?Q?Darkness=E2=80=99's?= _Late Night Tales: Version Excursions (Selected By Don Letts)_: "Originally recorded by WAR " Date: Wed, 07 Sep 2022 15:03:23 +0200 Message-ID: <875yhzmj50.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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. I think it would also be nice if the themes themselves explicitly defined themselves as being light/dark, really. That way, when Emacs finally grows a "react to the OS dark mode settings", Emacs could [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) 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. I think it would also be nice if the themes themselves explicitly defined themselves as being light/dark, really. That way, when Emacs finally grows a "react to the OS dark mode settings", Emacs could also flip to the correct theme (if we have a dual theme). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 13:32: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166255748831081 (code B ref 57639); Wed, 07 Sep 2022 13:32:02 +0000 Received: (at 57639) by debbugs.gnu.org; 7 Sep 2022 13:31:28 +0000 Received: from localhost ([127.0.0.1]:54075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVv9L-00085F-Qq for submit@debbugs.gnu.org; Wed, 07 Sep 2022 09:31:28 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVv9K-000850-Ep for 57639@debbugs.gnu.org; Wed, 07 Sep 2022 09:31:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1A361240026 for <57639@debbugs.gnu.org>; Wed, 7 Sep 2022 15:31:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662557480; bh=HIU+75GVxcrye2ziwVLc/9xykkmn/yHY23XjIeYmaok=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=CtRaYuib/psSMe6nbUMoX9Fur+N8ix1hs2zXfGWqqQTTgTjUXQUYSIcg1ajIPFaP+ DapAO21Lvav6mo/XNCDIQtAHG8jFMEaXvHf6p2Szmq1BjHyobGPI9/DeYiOZSJXGFJ prUTFxRD0Y1uZCQ+VjczLVq6fQ6Qk5nyOGrzgjmB8yDtJTx6J30SnZ0gHKEQk1GqDH TsFi3UT+hIFTfqnZwpje9yl7IGVOpWoEW9LTYUimlMmCEORJhV50gAxzJdS3E0wS4E LgFh1j/xzgOkR5SI4tP+tdqCqq6M3WQOEL+38/I5GB79avONiIGlJbkdN6EQU56M+d FJxNLyLxv9dQQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MN37C1Qf8z9rxV; Wed, 7 Sep 2022 15:31:18 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <875yhzmj50.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 07 Sep 2022 15:03:23 +0200") References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> 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 Date: Wed, 07 Sep 2022 13:31:18 +0000 Message-ID: <875yhzl3a1.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen 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. > > I think it would also be nice if the themes themselves explicitly > defined themselves as being light/dark, really. That way, when Emacs > finally grows a "react to the OS dark mode settings", Emacs could also > flip to the correct theme (if we have a dual theme). Do you think it would be better to less general, and instead of talking about "dual" themes always assume we want to toggle between a light and a dark variant? If not, this sounds like a separate feature (say that could be handled by a different property `theme-variant'). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Sep 2022 11:47: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166263758720632 (code B ref 57639); Thu, 08 Sep 2022 11:47:01 +0000 Received: (at 57639) by debbugs.gnu.org; 8 Sep 2022 11:46:27 +0000 Received: from localhost ([127.0.0.1]:57393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWFzH-0005Mi-84 for submit@debbugs.gnu.org; Thu, 08 Sep 2022 07:46:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWFzE-0005MR-TK for 57639@debbugs.gnu.org; Thu, 08 Sep 2022 07:46:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4iRkLWcUfaYv+cuQ4Nq+LDShkUuU8figk7ySd3Tb1So=; b=SZWz5rCOoOJYvDG2Fco4Qgq8dO +MqAZB7oCgbJCdrN8FHf5x7je5IUQZCoB+/1SCJaHpvc/e/60K19MnfRafI3KsOq7zyQ2Cm6g4y02 bz3fArusDIkyw291BTPllnPe58O9a4y04zttpIMUSo7Y17wUTUB3vNpgInG9Qt3uXN8k=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWFz6-0001lv-3t; Thu, 08 Sep 2022 13:46:18 +0200 From: Lars Ingebrigtsen In-Reply-To: <875yhzl3a1.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 07 Sep 2022 13:31:18 +0000") References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUuIwtVOyFpZlQG BgJIMgZWTRBnVx1xbyt5gzmJczGFek2fklG6spOsl0T///9GbpeoAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+YJCAsjLERJ7MIAAAGVSURBVDjL1dO9TsMwEAdwoxbmFgl2eAKkvgBIyQMg1V4QA0POCkwM sRv1AcLHxEDLqXSBibIhgWhNJD7WsCKhknfBLthJQWxd+E/R/XJ2Yp0JIXN1m0X3VK+Rxh+ZGazN BshPWCOEVD2dEpia5+KAkKl6AVU6yW+YBwAuwaT5A6RN4GuoWFgA4YB6vl8CLpMviOhUB5etgwNT x4hSv1mxvznPpUxaiGg6KLu+WF0pNhcyNiAgoO3R4MbtcSyT3qFS6kjdertTkNwfDTQM1ZDuZdmz Bb1vS/Y0XCkVlAFAQ4zHajhOo60HB0xQJvlZt6dG6vXO36nXvr+KyUA3hdDWi6VvbJ/UGhYmJ8i4 HEh83x4/PDmgTNdhWba7aX6eZQU0eRQusRBjzPOPAmjkC9E/3Qyxg6mRRwsB7Uo8qQNy1C1jC1V9 QF3ADoQI8TRQ1jEAKOK0DPqsk7j/DhCLEPt5L3v5Hrt14gd6nU4oIBz289yCGSyPVr9mZ2MZ+PWl A10lRYr7YQZR6/qkXGmUwb058zv47+ATvbpQrpuNH0IAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjIt MDktMDhUMTE6MzU6NDQrMDA6MDDAyxK/AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA5LTA4VDEx OjM1OjQ0KzAwOjAwsZaqAwAAAABJRU5ErkJggg== X-Now-Playing: David Grubbs & Nikus Veliotis's _The Harmless Dust_: "The Harmless Dust, Pt. Two" Date: Thu, 08 Sep 2022 13:46:15 +0200 Message-ID: <87fsh25bso.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > Do you think it would be better to less general, and instead of talking > about "dual" themes always assume we want to toggle between a light and > a dark variant? If not, this sounds like a separat [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Do you think it would be better to less general, and instead of talking > about "dual" themes always assume we want to toggle between a light and > a dark variant? If not, this sounds like a separate feature (say that > could be handled by a different property `theme-variant'). Well, if we had marking for "theme with variant", then we'd know which themes are "the same", but with a variant. So your command could instead be `theme-choose-variant', but since there's only two variants here, it'd toggle. If there were more, the user would be prompted for which variant to use, which would cover gruvbox, which Stefan mentioned. And in addition, this tagging could be used for automatic dark/light OS changes, so it's at least three birds with one stone. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 08:28: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166288482418682 (code B ref 57639); Sun, 11 Sep 2022 08:28:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 08:27:04 +0000 Received: from localhost ([127.0.0.1]:40707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXIIy-0004rG-7D for submit@debbugs.gnu.org; Sun, 11 Sep 2022 04:27:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXIIv-0004qk-RH for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 04:27:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 13726240026 for <57639@debbugs.gnu.org>; Sun, 11 Sep 2022 10:26:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662884816; bh=FjIU4DXC0sb6KKOuzDkTQhLzIAXtg2zTLWHgPvEMess=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=qei7IgwNlkFhBBXLETRZtr2D/3ERH9JhPpMZkIuM97WQQ7pv38G1KcKgOOr9FiRZ/ PAmrTEXkME8ruwZl7J/cuY5XlXz0HAGaSIiPGsRUrHvqcPciAx6flklzVRKTSHMq0m +6V7JkE/fpqkCEiKr5dSm3kgNMVbRoZhKAemo9R0Ks1VRGANKFWAX3az0DtOza81kv ZlTIP8m+I/aW5IgycWR8QSp/SNRV6w5JJy2U20C5jlBtnfsanq+Q5nkFIWaOKo1Rg2 FTsDQ/SAIiwrzgRKU4LRcPAlphumIK/8EGQCvRBmO8jhsoGPGfEpNlaFk4Iw+65lS3 YBdNcdva6ephg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MQNB63s5Fz6tn9; Sun, 11 Sep 2022 10:26:54 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87fsh25bso.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 08 Sep 2022 13:46:15 +0200") References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> 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 Date: Sun, 11 Sep 2022 08:26:53 +0000 Message-ID: <871qsil3jm.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Do you think it would be better to less general, and instead of talking >> about "dual" themes always assume we want to toggle between a light and >> a dark variant? If not, this sounds like a separate feature (say that >> could be handled by a different property `theme-variant'). > > Well, if we had marking for "theme with variant", then we'd know which > themes are "the same", but with a variant. > > So your command could instead be `theme-choose-variant', but since > there's only two variants here, it'd toggle. If there were more, the > user would be prompted for which variant to use, which would cover > gruvbox, which Stefan mentioned. 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 it would make sense to alias the name, since most themes, if they do have variants just come with dark and light where "toggle" is a more intuitive term. > 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? Also, how to be distinguish between what is light and dark, and what do we do when a theme has multiple variants? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 11:13: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166289472311234 (code B ref 57639); Sun, 11 Sep 2022 11:13:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 11:12:03 +0000 Received: from localhost ([127.0.0.1]:40885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXKsc-0002v7-Kl for submit@debbugs.gnu.org; Sun, 11 Sep 2022 07:12:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXKsa-0002uY-Ji for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 07:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SaA+r/sKJLZGoUseTxqzWQ2uvSqf7rEQ4I3jeFpmCoY=; b=uTaqA5VYWF112ZyoGxYX3TS3yi X4M5tGcMXGvUolbjfaXVlxEOrzOCKQ61Q4PmT50SfsDyKus1u6vyERguIFH3HynaRjW1QfCKEDGeE uT3u7TFBLt2uypfpJQRDd+iV80/Bm+Qr5Cm9AIhXIufZiM1nIyBbiMsmBtIYniOVNeR0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXKsS-0003cS-Bc; Sun, 11 Sep 2022 13:11:54 +0200 From: Lars Ingebrigtsen In-Reply-To: <871qsil3jm.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 11 Sep 2022 08:26:53 +0000") References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> X-Now-Playing: Insides's _Euphoria_: "Relentless" Date: Sun, 11 Sep 2022 13:11:51 +0200 Message-ID: <87fsgygo7c.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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 s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) 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 >> 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. > 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. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 11:23: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166289537012553 (code B ref 57639); Sun, 11 Sep 2022 11:23:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 11:22:50 +0000 Received: from localhost ([127.0.0.1]:40924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXL34-0003GP-Bs for submit@debbugs.gnu.org; Sun, 11 Sep 2022 07:22:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXL32-0003GA-Ls for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 07:22:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DP3UdaVVmYlQNe97P4u5j5bK9bNS7FlUp7B9GPpZR0Y=; b=jw8BpN5LXtGqZmvp5XNv9fX0Qc l7MekrO4BsGaVezIcJXOK8Arw3Yxm2c3N4CvjRt4W4ICnVn/JGHvdKQQP/ST4CrJRL10E0NpIYYsg YJ4R9qM3nUwuBI7iolrnK47ELJ/5zOOSN391Pj15Z3li0O/oFqHQeowtiTApUtz7yIsI=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXL2u-0003lj-Ko; Sun, 11 Sep 2022 13:22:42 +0200 From: Lars Ingebrigtsen In-Reply-To: <87fsgygo7c.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 11 Sep 2022 13:11:51 +0200") 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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVsWl2JbHWSd4iZ lKutrcrDvdZ8fo3///93xNKjAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YJCwo0L8u0/DcAAAG6SURB VDjLZZNfbsMgDMbNJvU5wAUGuUDAbM+ToLvAmvdKlXL/I8w2f0o6S1US//Lhz44LUENTeO8RC8d+ 2yW7aF3BiqmU684Bi1l1iBFN0JTHsreAYK0LEdEGGwl8DoDeaefjujrDilQGiE5p/SwyaiCGnje1 +n4GfihOgF52/8CH5JlM4EpAN8AXAly7CFA1g+hkJAKudFSADpBANUWeATcgCQG/vD1nUgEIKOXH dMWNwQeQxPhUrrfYG//FBEmAJlAKYp9IsJDuA2Qcn+PXi4J9IaeD6iRDCqIw7DdtYFNrHTC7OkRu JIPGMXYqGV0DJDGNQCpUEdkoFcFvULYSSJmtSLBmAWXEG/CLE/giKyZREhAHyI3olR5mIBKaNh2G J0WVpE0Zrz1IZ50JybyxhudhpO/USclaLxp6PFBYNZ/RD/COm5nK3QaAA8DUapl/cAqFI2A7k7ou 0ge8iCzmCibJXf6NXYGTMbk3vMWawL2DNkMjX5QaG2cdh5C6AHBMZ/HDsHt5zOVlMhXA8Tg5plVa KyD9uUmZTKTr5XhpUq30t+Sby1T/OGRjLTYzT8vkRbUa4mV02X39AX+VsqWy2GUYAAAAJXRFWHRk YXRlOmNyZWF0ZQAyMDIyLTA5LTExVDEwOjUyOjQ3KzAwOjAwfAHFAAAAACV0RVh0ZGF0ZTptb2Rp ZnkAMjAyMi0wOS0xMVQxMDo1Mjo0NyswMDowMA1cfbwAAAAASUVORK5CYII= X-Now-Playing: Insides's _Euphoria_: "Yes" Date: Sun, 11 Sep 2022 13:22:40 +0200 Message-ID: <87zgf6f94v.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) 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* From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' 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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166289656323304 (code B ref 57639); Sun, 11 Sep 2022 11:43:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 11:42:43 +0000 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 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 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== 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) From: Philip Kaludercic In-Reply-To: <87fsgygo7c.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 11 Sep 2022 13:11:51 +0200") 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> 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 Date: Sun, 11 Sep 2022 11:42:33 +0000 Message-ID: <87a676jfx2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 (---) 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! From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 11:55: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.1662897251689 (code B ref 57639); Sun, 11 Sep 2022 11:55:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 11:54:11 +0000 Received: from localhost ([127.0.0.1]:41038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXLXO-0000B2-Uo for submit@debbugs.gnu.org; Sun, 11 Sep 2022 07:54:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXLXN-0000An-Kv for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 07:54:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1Y6pj0z6yg5F8fdndoyoz5ldd/VtZJYSPrcGb8hQSG8=; b=F4yUEGje1akA7Nwt27awh1QOj2 x/Efx55h3mWqp1ufRIpss50KiaO1YlRVlB7w4gSa3o4gEGus5TLBqF8Mu1I58RwacqFXUd3sW9LUU 0Q9ruF6FasCbq+/md8i9JZhziEalgE70PPo4Zg88IRsQ8wZ7c7SXbgij1+pYLipKcMT0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXLXF-00042l-GW; Sun, 11 Sep 2022 13:54:03 +0200 From: Lars Ingebrigtsen In-Reply-To: <87a676jfx2.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 11 Sep 2022 11:42:33 +0000") 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> <87a676jfx2.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWpnZGWh3hwUU9R NjyKbGFHNDj////PEsqRAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YJCws0CG98I2sAAAGwSURBVDjL XZNdrhshDIXhKgsYIxZwYybvt1Dei+sNdBD730rNzwQIUqKRP8wx5lipvsB4RHQ4VqIRV9ogkkTO Fj8XYE8WxokJWf55AgCQn3wkAG0ngKMCzWnsW4AGkHMCqm1pqNtEN5RfH+BQGtG7EPOxA1AmoMRL +bcDthRavOQNqGTl4g2U7w3UpvgOrk2+luRfoYKyyZsKXG7gZz2LWvt6xnqWZkm4Qf4ALmBs6mtd wEwV9JQfvQAiF/0A1wRWxF3xMX+qC3ChXK/S1eENHtKPUPIN5qvYBkocgCaQO+QJvt5FnYRZMrp2 uW6gkwCc4NvMTv2VrscbqFv8gcF5QgGx9+pdFQUvFn0N9WsCI8B410H+PcFX8GSC6woh4ALQsMOu EJebi6fsaSnmmGsD5lMZd8ogUA13p8x7JKpAavgElp6MwfMOHijbWS7z1NbVxoQFyIjxsxXoRGic ZMMpYZuOt8VG00046Ux8PyjAnUDhrCO7ebaZjaQJyH9W9zdpqbGCaQ0FoyZ5DvS8nHQMI8j0eYQd 6ONgwPpQSa1AxlX8jOJmhE0bIHGdmLhlaPUfUnGIzGLe2Y4AAAAldEVYdGRhdGU6Y3JlYXRlADIw MjItMDktMTFUMTE6NTI6MDgrMDA6MDDTlWKWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA5LTEx VDExOjUyOjA4KzAwOjAwosjaKgAAAABJRU5ErkJggg== X-Now-Playing: Earwig's _Under My Skin I Am Laughing_: "Every Day Shines" Date: Sun, 11 Sep 2022 13:54:01 +0200 Message-ID: <87bkrmdt46.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >> 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. > > W [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: >> 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? I thought we already had support for this under Gtk? But I may be misremembering. > 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? Yes, but if you have the soft gruvbox active, you don't want to switch to the hard one when changing between dark/light, so there's no ambiguity. >> 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! *phew* Thanks. =F0=9F=98=80 From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2022 18:49: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16629220879409 (code B ref 57639); Sun, 11 Sep 2022 18:49:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Sep 2022 18:48:07 +0000 Received: from localhost ([127.0.0.1]:43514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXRzy-0002Rg-Q7 for submit@debbugs.gnu.org; Sun, 11 Sep 2022 14:48:07 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXRzv-0002R1-9e for 57639@debbugs.gnu.org; Sun, 11 Sep 2022 14:48:05 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 29C26240105 for <57639@debbugs.gnu.org>; Sun, 11 Sep 2022 20:47:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662922077; bh=UrVLAVKhSM84dg7BuA3dXlfEvNGua7IaTNwCuSZSRkg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=DzAQKJtNEwUSBhchU+gDZ7XfTlrZnMtibnCDAFpLf//zv1oO5pmd6w8UXGmXd7z0L uEgPYyYyhxDeOC5QNHu+a5bqBY8ALOXWhPB08ofjZUHsHvcftb/zn0z8vnTIGOHZqt h+6zJIPVhwFvQwsPd0udYn8MUWnsIaTSA2mWjb1moi3cANQ6XEAbQjUnCnUEIrKelT kcoWEzzqzka8l/5h2D8sv29WWfmmOO7XCPMv0+osV7ZnLjsdtFW3EHLFiKStEGGgd2 N4l7H26eMaop+SL9mLK3CT2ABcP8uBl7TC9MkMWOt2OwDUTqHW0b53VppHanBIatMp CR4wvI1IReILw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MQdyf0N5zz6tpF; Sun, 11 Sep 2022 20:47:51 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87bkrmdt46.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 11 Sep 2022 13:54:01 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> 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 Date: Sun, 11 Sep 2022 18:47:40 +0000 Message-ID: <8735cxpx2r.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>> 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? > > I thought we already had support for this under Gtk? But I may be > misremembering. Am I reading it correctly that `style_changed_cb' in gtkutils.c would be a place to start looking for this functionality? >> 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? > > Yes, but if you have the soft gruvbox active, you don't want to switch > to the hard one when changing between dark/light, so there's no ambiguity. So would gruvbox-soft-dark have all the other themes as variants or only gruvbox-soft-dark?=20=20 >>> 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! > > *phew* Thanks. =F0=9F=98=80 Here is an updated version: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-new-command-theme-choose-variant.patch >From 1c9f1d92d0ecc4c7b94772e3a15ebf5e577a7f3d Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 6 Sep 2022 20:53:35 +0200 Subject: [PATCH] Add new command 'theme-choose-variant' * doc/emacs/custom.texi (Custom Themes): Mention it. * etc/themes/leuven-dark-theme.el (leuven-dark): Add dual theme. * etc/themes/leuven-theme.el (leuven): Add dual theme. * etc/themes/tango-dark-theme.el (tango-dark): Add dual theme. * etc/themes/tango-theme.el (tango): Add dual theme. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add dual theme. * etc/themes/tsdh-light-theme.el (tsdh-light): Add dual theme. * lisp/cus-theme.el (describe-theme-1): Say if a theme has a dual. * lisp/custom.el (theme-choose-variant): Add new command. (toggle-theme): Add an alias. (Bug#57639) --- doc/emacs/custom.texi | 8 ++++++++ etc/themes/leuven-dark-theme.el | 4 +++- etc/themes/leuven-theme.el | 4 +++- etc/themes/tango-dark-theme.el | 2 ++ etc/themes/tango-theme.el | 2 ++ etc/themes/tsdh-dark-theme.el | 2 ++ etc/themes/tsdh-light-theme.el | 2 ++ lisp/cus-theme.el | 5 +++++ lisp/custom.el | 27 +++++++++++++++++++++++++++ 9 files changed, 54 insertions(+), 2 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f86c7e2dd9 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,14 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant + Some themes have variants (most often these are light and dark +pairs). You can switch between these by typing @kbd{M-x +theme-choose-variant}. Note that this only works if only one theme is +active. If a theme has only one alternative, it will toggle +automatically. If there are more of them, it will query which one to +use. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..dfcd64a11c 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220911.1858 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1083,6 +1083,8 @@ leuven-dark (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven-dark 'theme-variants 'leuven) ;see `toggle-theme' + (provide-theme 'leuven-dark) ;; This is for the sake of Emacs. diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..66a65bc0b3 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220911.1858 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1065,6 +1065,8 @@ leuven (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven 'theme-variants 'leuven-dark) ;see `toggle-theme' + (provide-theme 'leuven) ;; This is for the sake of Emacs. diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..81b7cbde13 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -190,6 +190,8 @@ tango-dark `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango-dark 'theme-variants 'tango) ;see `toggle-theme' + (provide-theme 'tango-dark) ;;; tango-dark-theme.el ends here diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..7f53a5cce2 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -173,6 +173,8 @@ tango `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango 'theme-variants 'tango-dark) ;see `toggle-theme' + (provide-theme 'tango) ;;; tango-theme.el ends here diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..aef8cae3e0 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -142,6 +142,8 @@ tsdh-dark '(widget-field ((t (:box (:line-width 2 :color "grey75" :style pressed-button))))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-dark 'theme-variants 'tsdh-light) ;see `toggle-theme' + (provide-theme 'tsdh-dark) ;;; tsdh-dark-theme.el ends here diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..d0f11f272b 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -104,6 +104,8 @@ tsdh-light '(show-paren-mismatch ((t (:background "deep pink" :weight bold)))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-light 'theme-variants 'tsdh-dark) ;see `toggle-theme' + (provide-theme 'tsdh-light) ;;; tsdh-light-theme.el ends here diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 90680ff68f..dcd562c6af 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -515,6 +515,11 @@ describe-theme-1 (end-of-file nil))))) (and (eq (car-safe sexp) 'deftheme) (setq doc (nth 2 sexp))))))) + (when-let ((variants (get theme 'theme-variants))) + (princ (concat " Variants of this theme are " + (mapconcat + (lambda (th) (concat "`" th "'")) + variants ", ")))) (princ "\n\nDocumentation:\n") (princ (if (stringp doc) (substitute-command-keys doc) diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..58f8d05ec6 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1372,6 +1372,33 @@ load-theme (enable-theme theme)) t) +(defun theme-choose-variant (&optional no-confirm no-enable) + "Toggle the current active theme by enabling its dual pair. +The current theme will be immediately disabled before the dual +theme has been enabled. If THEME is not active an error will be +raised. If theme is nil For NO-CONFIRM and NO-ENABLE, see +`load-theme'." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let ((theme (car custom-enabled-themes)) variants) + (dolist (variant (ensure-list (get theme 'theme-variants))) + (when (and (custom-theme-p theme) (not (eq variant theme))) + (push variant variants))) + (let ((choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable)))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 10:11: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 To: Philip Kaludercic Cc: Po Lu , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166297743618265 (code B ref 57639); Mon, 12 Sep 2022 10:11:01 +0000 Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 10:10:36 +0000 Received: from localhost ([127.0.0.1]:44151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXgOi-0004kW-AK for submit@debbugs.gnu.org; Mon, 12 Sep 2022 06:10:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXgOg-0004kJ-Sq for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 06:10:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8Xc/vXO90cOHRbCNZSf4Lc5skEaUHqESPKMoiAvWTNo=; b=q4dJAeuIywH4yw1kYW8XtSu7oN bD/nqN9LSVyYZMeMDhkEOu3MKPjhbCyQguGxVs8MxTatWxmyUd07cwjjqKhupuREQBO0Hqd/PA9Jx oMjtnAYUOXWNuGvcU7mdVx/FS+thucieDn4ZZnRbUufafjo0ivjd0qkgwsWYRDxCJM7I=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXgOT-00057U-Qu; Mon, 12 Sep 2022 12:10:28 +0200 From: Lars Ingebrigtsen In-Reply-To: <8735cxpx2r.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 11 Sep 2022 18:47:40 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUoKi0JBgdNVVvA ys91gor////Gs4NHAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YJDAk7Foy47hAAAAGfSURBVDjLlZPt lYQgDEUDTgHBsQBAG1iTAhig/5o2BMePmfXHokfRa/KSB4JBC+CMO42Zs3HQ5xewBLmAuxl3AMG6 IBQdGs0oE31eYJUnMJuM6XpyG8D8KYAO/J043gHzH/AIqH3s9ewgWdMiUM8dNVU02nlE3zxA/NQA 6FJfQJJ+1IAAmnD6ajN2d/G7aNh86+PE4XhRndszek2FXRrOACA04I/W9lSrfqAFXnwDCh049Jf1 ByJvIDWQ4ykCBRBHBZQ/wVpfMrWFLxpLXl2RCJsHldtBlIIHphow0iUih4d5UqFso79aEsYwUqXV grh/8QrmhSvxsmLJFxAXX6U2StNWsDaqPsDAlYNBWtUC2NbDvuzUWjDIqzSP0C66S0SycElm5Gpl 69tqDuMG6T88OVtAX0tooHv9FMfCzMnCIxZ1YPsNRqnKlOoh8kzcfqz3GhSiUDj6mdsnbgyw7Zwm QpJKzCERH1Nf2p5LcmhAqypBOnLRz8SF3hHHwkgE6WCb7BkU2gbDGbj9PbFvILx39VK3XDWHFD3s IVaBHB38AvdFaWXTEet7AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA5LTEyVDA5OjU5OjIyKzAw OjAwI+RHuwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOS0xMlQwOTo1OToyMiswMDowMFK5/wcA AAAASUVORK5CYII= X-Now-Playing: David Lynch's _Ghost of Love_: "Imaginary Girl" Date: Mon, 12 Sep 2022 12:10:19 +0200 Message-ID: <871qsgc390.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >> I thought we already had support for this under Gtk? But I may be >> misremembering. > > Am I reading it correctly that `style_changed_cb' in gtkutils.c would be > a place to start looking for this [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: >> I thought we already had support for this under Gtk? But I may be >> misremembering. > > Am I reading it correctly that `style_changed_cb' in gtkutils.c would be > a place to start looking for this functionality? Ah, yes, I think that's the one... Po Lu probably know more about this; added to the CCs. > So would gruvbox-soft-dark have all the other themes as variants or only > gruvbox-soft-dark?=20=20 Well, I was saying that the term "variants" isn't really what we need here, but tagging themes for features. So gruvbox-soft-dark would say (theme-featues :name 'gruvbox :mode 'dark :softness 'soft) or... feature names that make more sense. =F0=9F=98=80 Then the `theme-change-feature' if you have a gruvbox theme enabled would give you three other themes to choose from. If there's just the dark/light difference, then there's only one other theme to choose from, and no prompting would be needed. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 11:07: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 To: Lars Ingebrigtsen Cc: Po Lu , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166298081817485 (code B ref 57639); Mon, 12 Sep 2022 11:07:02 +0000 Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 11:06:58 +0000 Received: from localhost ([127.0.0.1]:44291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhHG-0004Xx-2u for submit@debbugs.gnu.org; Mon, 12 Sep 2022 07:06:58 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhHD-0004Xi-1m for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 07:06:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9E2D7240101 for <57639@debbugs.gnu.org>; Mon, 12 Sep 2022 13:06:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662980808; bh=rfV3Jyrj5+O1ugIM+6JwsYOxJhUE7FGNDvYQQ+Q1Aiw=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=VskzHmt85ZQDI1mhj+COyP7nCRbj+NP3hfO0ZusnwPCAlPLKCrypWQtpO19yS1k0+ frESUsqVq8K+eHdoTosnr30cPUPpZddd2EgXOZMwR3C/jtaMzbv1IQcpdsOGkXE35v YmQS/YOy+6Mj7MkztB5bLildlgtVrgV8Gwt16hjIQMUqXJH9uHclS/lJij/WUfLxsc TD2nX26fZLIyRReYR/wZPYMBNDhnssD9HqXiLfuVdXCIhUPaoLAiZGon2B6DwKlwl5 d3P33t2lXF0ZvVMOOqIl5eCV9l136FnHKCfDCuyIEPRoYzXpe9XR+uYRHAHDCMdJ+r 0zg1uVZfVCCSA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MR3h61wwXz6tqh; Mon, 12 Sep 2022 13:06:46 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qsgc390.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 12 Sep 2022 12:10:19 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> 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 Date: Mon, 12 Sep 2022 11:06:45 +0000 Message-ID: <875yhsrgvu.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>> I thought we already had support for this under Gtk? But I may be >>> misremembering. >> >> Am I reading it correctly that `style_changed_cb' in gtkutils.c would be >> a place to start looking for this functionality? > > Ah, yes, I think that's the one... Po Lu probably know more about this; > added to the CCs. > >> So would gruvbox-soft-dark have all the other themes as variants or only >> gruvbox-soft-dark?=20=20 > > Well, I was saying that the term "variants" isn't really what we need > here, but tagging themes for features. > > So gruvbox-soft-dark would say > > (theme-featues :name 'gruvbox :mode 'dark :softness 'soft) > > or... feature names that make more sense. =F0=9F=98=80 > > Then the `theme-change-feature' if you have a gruvbox theme enabled > would give you three other themes to choose from. > > If there's just the dark/light difference, then there's only one other > theme to choose from, and no prompting would be needed. OK, now I understand what confused me. It certainly sounds interesting, I just wonder what "features" there really are, or should it be kept open-ended (i.e. any theme can specify any number of attributes)? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 11:13: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 To: Philip Kaludercic Cc: Po Lu , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166298116618059 (code B ref 57639); Mon, 12 Sep 2022 11:13:02 +0000 Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 11:12:46 +0000 Received: from localhost ([127.0.0.1]:44306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhMr-0004hD-N4 for submit@debbugs.gnu.org; Mon, 12 Sep 2022 07:12:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhMi-0004gq-TK for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 07:12:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b2mKg0nZzDWq4yIU0cp3D6hx/Jgis84KPgI0dpChVxU=; b=bM0SQEnXAz1CZxmuBENsHalavk shIAyzUSmCJuS81QMJ8Z8uPMQIMUmHL+WuQLAmgeajDR0mW73ZVqMZlRDEs5MX6Rw9EPl5TfjZ0R/ jFkX4opV+LFlcNQn+1V2TrDJFPgT7Hb6McKZYQ9PX8YbOSCXKk2RyTdbeS9nCPC+mBbw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXhMa-0005XD-Ds; Mon, 12 Sep 2022 13:12:30 +0200 From: Lars Ingebrigtsen In-Reply-To: <875yhsrgvu.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 12 Sep 2022 11:06:45 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <875yhsrgvu.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWZpZCJY0JsUiCT Zhw9LCDBkBr///+7s9DFAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YJDAsMEPZYP38AAAGySURBVDjL dZNbcuswCIaVM11A7aTvNZD3VtTvNaEr8Gj/WzmALnGmqTIjx3xcfiGc0l9rBoDXZ+CLVJ8D/Qs8 RpymM/vKDxHVBoAAlPIovjM3AHfQM3RAGoAE8Og+IkjlzI8kAJqwW7WGIFARSvFOij0Hr3s2oVoB kFnA31VwLdSB/9G6O+L9CMQCxJ7vsikcgECW4O/TSfUOlgmIrNL2T6bLAUDK2YIEpllnDJkVyOLp YMENhH5KKTv1GqH140Vm60Jx0kD9nV7CoQFrQ57M0UyvF3Vl1wDZACw+EnLxs5iG60iV1QR9fV48 yjxyi0ADQjfIsx3dO5sPEeaJPJOQxdxgRIDVBMx2k94ugHUUd2BlAKKPGoC9A+LXq7HZ/fdUwPXe FbOL3Ur5Bbz903kArkBcNvPyFiB3gF7q06cr/G12fVRzjAe7D69h5xxz5QDrWK2RyAG04g6w2Y0E qKlsx253VQOAlSjPABKWI0DLTFEDDnY2QHqLgbv7x6eV/DaptbTbIxVtEmAtjytRjbiG787jJBXA 2nOPwITfiXrnDvYSqpCblLbGOczTB9wvt3/W/B/gyeFbKNUiOAAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMi0wOS0xMlQxMToxMjoxNiswMDowMNYR3iUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDkt MTJUMTE6MTI6MTYrMDA6MDCnTGaZAAAAAElFTkSuQmCC X-Now-Playing: Django Django's _Django Django (Remaster)_: "Zumm Zumm" Date: Mon, 12 Sep 2022 13:12:27 +0200 Message-ID: <87leqo978k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > OK, now I understand what confused me. It certainly sounds interesting, > I just wonder what "features" there really are, or should it be kept > open-ended (i.e. any theme can specify any number of [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > OK, now I understand what confused me. It certainly sounds interesting, > I just wonder what "features" there really are, or should it be kept > open-ended (i.e. any theme can specify any number of attributes)? Yes, it's open-ended. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 13:13: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 To: Lars Ingebrigtsen Cc: Philip Kaludercic , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166298832823745 (code B ref 57639); Mon, 12 Sep 2022 13:13:01 +0000 Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 13:12:08 +0000 Received: from localhost ([127.0.0.1]:44584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXjEO-0006Au-4Y for submit@debbugs.gnu.org; Mon, 12 Sep 2022 09:12:08 -0400 Received: from sonic317-32.consmr.mail.ne1.yahoo.com ([66.163.184.43]:39690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXjEJ-0006AM-4d for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 09:12:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1662988316; bh=TFUvESNbNedaL/hDzC8xHSWi5MhUPQ0VgJUOj6xJ/Jo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=p2BnD9Hs+h0vxIuDZEQdCrepTbR84ySe+LS4yCoQZ3qjqWbRx959cXSpcbSkjUIc2znRgBb4pzNmgF5EXdFufxEodCi5hn2H9eombtRlQ8CP8TlIUXnsoWra+So40jaAo8boJivI+8x9f6iV4SvDnfNm0frur+8Zz5fMO6P4uXSVPsZoMqqPZgORAJyPsIk5VB5aZO0+lRircRdxCmWPjkl8BDbTLG8wwIMlxr/cwEjc6CGXdWGRHbaYoA/c/Hevdfk1ZxmsA42ceuaVhsiia6vUXLVlAs2v6CyNc2NkL2LRQhQehhvb5Vxcxe9KgCBREnBaqICRM6EfzDMLLA0eGw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1662988316; bh=b2z8rU3GXtpneljW+50qxWiOsSyJpr2FvI+iOxL8hli=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=QDzINrOR0CqbX4LQGBvAy/LowBEzZpNLqRd6/8F/l6w3Ik9qz2S9v907ydHbhxulMGPGIEg2prq1tznk6x9Rg24oRlFRmy8w/oLlZIGPqcw9zTKGsTmsWuR2YkhbGiBoGvfAf9knS8ZywooLhaf8WOvDLkSmA5vhZtXKvP4PQgClvHz2WGLgQ4SzvJL867VArqGSEAqOwFqmOsKu7Ii9Lnva6cN9M/IPoXl63sLA/yXb3PALEKnhIW87qXgiri08g8z9+HLFBhwAEkiWrBuabV1bdfmfS8xmwpeVVX8w4SSf0xaNMbxtrIUBVRwQiP++gGU8fyIOiI6SAmIi4aFvQA== X-YMail-OSG: 0BUI_AMVM1kEN0fuGO.LpAakjI6auGUmkmdGXJ13qiG4x4E9MuOumDD8FCAkESJ Hm8o.R0BltnoVWhGZUdRxDQ_nx08TOPseciBce9.ZfFhTBTDDNvsGqI4Jd3WMKzYhwNsML_35r0N _jNGsm1Mps5J3jEQpxR9dGFWXj1ZPvESN1O0OcBGhV_22ZrVxFK.FHR.XxkWn9DXqU44ADMoJ3oP oD5hEIdOMOkEAQpgjX_uRwq71oCW1N2fyC5Zmm7WtpmeJibyIbiyxLtt9EiaLoTqy7FcYGd2n8bj F3kfUKb.qT7sP7z_E2T6NJ5pt4r1PQxGbbXHu7iUa.TVxmkGQK9oxPGw8VlYLzLf2QC1suXSz4xU bDAzK88575ZwOVAkrhn54tUlilS4MvQHrytEA9RNq4P06GJo6_yyvMgydaV0giEGonyurMo5FVMQ VQeJg0bFKocX_z5wstJdL8Om7rIYMNxvqwiYKm7g5YEgl0lsZV9Y5gR639KV3KM3rvAxvYXMqEyU B7tyXYBV0vw8y58sHXvypUFa8Nx4Txq3g84D7YXqyxr5JUCKdPuasdX96iLVVz6aSwnJo0xJDCRv 7RBbfsGnOUmZhfB9fm4c0EUzzaigsR.O684GP7aeRnjJmBkwvaPDk6eh7KIMSDrOvWtz40cJCQJ0 QlOWxjCDgETFJ9BfwFuMTVdvtDsFPzipamVV.JHGf8sGqTFjs0j401uC2ChpeEFqDNbvBIP11H8E nfReamMt.7biv_xdI71k8GJnpGCbnyeyXGMm4co4tqqB3lDXeg0UpI03E8pwJjtlb.9p9tCn1Oqu qdaPKtm71yk2miPMd4pqMk5oatNO2aItqxQTHrB6_6Vb.6OHzh66u1tzVHDPeAGz1KtGOEBAHHYz qUGI0wlCXthjX7ZJVoB9gvmX0DrxPmRMsdiQ0VarNXuqzUSHzXatW2mkQUybi8x9DfPfFbihON_R WG1P.BQ.SfJQRoDYJkL5tPVPvzv5xqQF34JIUWz9YgbRL81TKXCcx.2QWT1kX02dlQitf3CnB8iT UqRW8TzFpXcO5oA05ns.HiirNuz45BOZY7gqB71PWuW_StbR2Vb_1lUo9V6lSdcy_EUPP7o1prIy Rk3hQonlFYodwb7dM1iA.c71IfkMhnPFyhJL4uFerghfVU9fKUt7_HsK..J50bwhcKzqRKBIK9Ip sENn6bpycSF2CZJ7e.mTZiwPK9kzEtPjgLQizh_Kbz3zGCROCJdMGXxxzzTigllff1xwR.Acnyo0 C_4gw1m0XnszFMQUlerG1Nsi3pihEqQiW55UaPCCXUNAUlDlJ8G3r5MTEFbqRw66i3A91HyRaOiU r8d0GGoO1GxZIoGfWnll2BGTOQO4rPSsSlwZ9UrIJn.UTTFlOWv2CijR9pHwOZ65NJWkZwYECZVE F_7v4IA9QCfQ8r3I7NlN6eItZctgV6QxHn1hgIqDQv10fxhtxXFRdxgHvgdZ6BNYS9oryETz65cF YQw2wu7s8dr4NKLRef4bKUfQWfqlMVhBmBDX4FYG7bEL.LPhre7zubuJpBjPGOieL_s8A_NUi.F0 AqWzq7o.IGClaOtMyc.LnJMH_N_srhOUBw0GOZndpxxZvn4bg0OPo32u8ZkGcMvhtKGnC3ydnmLd CYcfrQ6Ni0vNY3mPakF0Tnp2J7AQLWbLiIZii0Y8bGI3cjJxT.Gsa9LglAfdYHfzLuwMgiwyj8Jy o6Z0Se9ZSdFHMznq11DDtXmFOCpDvlfEBKTiEXTZZebu987Tuv2Nz9ZJ7vDAhdnxHnKgXPxpf._q _x2JVf0n.SSOvKs6E0VNRTtDyyqOnLF4sZgAndPmnkskUfokr5y6Uyoil.vvRtPzqlxE9dlnhBxF rPSRvjiysirLuzuyVcBTFR7uPbyNxd7uX.Nha2gRpP7D3ryzzEHa4so77UfnP_6bQT5_nLKbiNEU zpI7snOi_Cs2DS5YnzOFYVAPoiHWwvEQ.IDhwf7IzFQenlsd8Agl9s5SH6FdtaprUXu1Sf_C.xll ylOYRbS20QSX42syIx4WwamIeWhRR.qMks8UnL5dhCS_pMWijcGqH4gA8IYDMB7JJRqOzLi75eRc fS15xZnvJ5iLs_M0CXWNphZPBLpEcOl50txcZujGV2OquGW0WrBsIFNIBTPMU8ljs2cO6bvddo4E Mc.GaACyRLYZrfc8qy.dcANLY4LudVih7P14w_4c_5QtFoSYBgtntEBjj1GsgniRijKs40EhDLSl 3O8TsZF8qWIzutmhDMzHQgcKSghNBgaMu7SEltJgs5Oe6eXbnkIfu5p0vbjX8lbjOL0RlaFkRh4Y yP0MMsw-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Mon, 12 Sep 2022 13:11:56 +0000 Received: by hermes--canary-production-sg3-6bb8946c47-n8gf6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID db3308c25e5d1c00bc98b0797275c1fd; Mon, 12 Sep 2022 13:11:53 +0000 (UTC) From: Po Lu 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> Date: Mon, 12 Sep 2022 21:11:48 +0800 In-Reply-To: <871qsgc390.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 12 Sep 2022 12:10:19 +0200") Message-ID: <871qsg4u0b.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20612 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1062 X-Spam-Score: -0.0 (/) 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 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>> I thought we already had support for this under Gtk? But I may be >>> misremembering. >> >> Am I reading it correctly that `style_changed_cb' in gtkutils.c would be >> a place to start looking for this functionality? > > Ah, yes, I think that's the one... Po Lu probably know more about this; > added to the CCs. What exactly is the wanted feature? If it's automatically switching between dark and light themes, then style_changed_cb is probably not the right place. It's mostly vestigial code from when we used to update the region face along with the GTK stylesheet. Instead, TRT used to be to listen for changes to the `gtk-application-prefer-dark-theme' property of the GtkSettings object. However, that has been superseeded by a dbus based interface in recent versions of GNOME. I do not understand the details, but it seems like it could be implemented in Lisp: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 14:53: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 To: 57639@debbugs.gnu.org Cc: luangruo@yahoo.com, larsi@gnus.org, philipk@posteo.net X-Debbugs-Original-To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Po Lu , Lars Ingebrigtsen , Philip Kaludercic , 57639@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16629943414889 (code B ref -1); Mon, 12 Sep 2022 14:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Sep 2022 14:52:21 +0000 Received: from localhost ([127.0.0.1]:47572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXknN-0001Gn-J9 for submit@debbugs.gnu.org; Mon, 12 Sep 2022 10:52:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:36336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXknL-0001Gf-IB for submit@debbugs.gnu.org; Mon, 12 Sep 2022 10:52:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXknK-0004Gg-6K for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 10:52:19 -0400 Received: from mout.gmx.net ([212.227.15.15]:33385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXknD-00052i-EC for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 10:52:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662994318; bh=yVwd85fe0F9Xsa8/9kSPQCq2bC79YshqHx5u72pMvtc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=dV+83GTQhHx4Q6snSu8bzmy1mf/G1ocKbR1wv7vLyEMYXC0k3UvJD7ULhnOG7Yj/3 Y4lwRJpZxNExgEJyzY3827FzFVEGgH/Rddq/SbhEfsCv8NFOi33HsGDEedlKupmME1 3ur7WVejuLcVpX97w6NJuv4iT0OL1GxGfzn8Qlrg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.119.44]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MPXhA-1okLjL3z1u-00MfCv; Mon, 12 Sep 2022 16:51:58 +0200 From: Michael Albinus In-Reply-To: <871qsg4u0b.fsf@yahoo.com> (Po Lu via's message of "Mon, 12 Sep 2022 21:11:48 +0800") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> Date: Mon, 12 Sep 2022 16:51:54 +0200 Message-ID: <87v8psmyr9.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:e2WNErgnxVOc3oLKAv0vuEmueLOgQt7YI0wgAZwpQoVhXJCUQ+S j/65BVEZbkVsRHgPZxNRsZmssblDHQkpsH9sJb/GLAnsnpDNXFmnt28AbHmBSumK0QzGdVI rmMq2pJ9lMKWd80fpAeyLlOk5+XOxn7boZ2jGFyl2n4pHQ5tmWJROacn6Tc3mUz8YNXikQq HJGJ8sB0Mtk4nybJn4UsQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:/3lYxQj1JSA=:QMEJwRMw+RZ5MwaBqfCqSc sleaNbWMawkG7hA1yOmehhtJ3XZPBxnlbnHUPrj8aT7MrmwoQQaroScDNhz0tLEBVs2t1v89N Ug4lUHiObQMapQnX5RK7oOP9UkPeRrjtKM58W8vDbzt1C1VwlJEK0orAtAVz1aSziLjocEtzC q6NWyf4HD5OsZj43P1M9E6+rtgjb+eYn0TsPPCuMQ/Iub2W1dPosEItlM13uiC5lp8DtEwtJg SM86JfZxXJK2p0asQr1sneRmucIWlLxLNJ47ZdikxXW/m2M0+wJA8nU/u/Lg3JyEL/23SgMTa zvzIqKmKYhFH3Ge/ikNNh1GHhxaiickXSjUUyOUj+sRb4j5cLUc8J6EFnC3sNU1TpbAcRqiqD v0n3/z2dRxszEa06nQBrGRh5TND5YUtwK1hqAsrnx32gxLf5ul1/vzcS7O0bSZkUTw9Oksv5o DzZjuxKuQadnI3F6siZiyIOV01S++PnrhGRSN/c5i6+OdVX21m0FQETFAtlX/NLyDDVtJ4j58 rKRdfYKg9WAC4al0XxNWwCTtktkmurORrbNYQ6GC0AVtyINnY1lcTSGjtsI07PNFyeyWtfG9T YJl0ayco1obw9p8ZRbTXrwEpplD6tCh/OZLUORkpoCLVdsPjMxGlKpppVVqBgRkU0sWmJcs8+ JVW6rkwYIfW+ByPrZ06o8Z0LDh16fMk+9SCT3NwBOPtSxknCx8FrnhsGoRDovr0APcCGC/WcH tkzbxmLZpHme9QiN9ga32jfNeHLvP3m0SBO4NaIT7oWkQLJtueOWQPlH6xcAjpsaGdeqIWKkf zlVOMRGqrvJN0OqkA4ebGTZiW6rl0L9miyhWNNo+GfwXDtoS/rMFOu2gifsf3SwYZXLEH89VW /DPZoCZTXI8AZ/OyJwYh4kMw0DWlGvHGNc4Bd5LS3aY3UdvfDXo7wBZ0IFqjvXffjxyMhIcIQ KAKguwkIlhw6iA5Huzx5anZwOLvdKQglI/l3bJJ8nAPrcBrMMBj1239Ko9OuyXHq6NCugTsrg sWtoFDYsrN1qhaftsZTjG2UMS0SASkYZULh/PkELoa9E4vJJgnQX9u3gyJiaa6xI+2JvlAGS4 Ilj1mE+wOJqyN9kzTOeQVlfjc81Lu4Sm7wwE37j07RRvyLAxuuUMsMwl7IJ6xWQhASJnqvTbh mGCobFYt4mQB5kg/pe/Q4Ft0x+ Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.4 (-) 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.4 (--) Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > If it's automatically switching between dark and light themes, then > style_changed_cb is probably not the right place. It's mostly vestigial > code from when we used to update the region face along with the GTK > stylesheet. Instead, TRT used to be to listen for changes to the > `gtk-application-prefer-dark-theme' property of the GtkSettings object. > > However, that has been superseeded by a dbus based interface in recent > versions of GNOME. I do not understand the details, but it seems like > it could be implemented in Lisp: > > https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Definitely. Example D-Bus code is at . And if I understand , this is not restricted to GTK only. Best regards, Michael. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 15:27: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 To: Po Lu Cc: Lars Ingebrigtsen , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16629963988260 (code B ref 57639); Mon, 12 Sep 2022 15:27:01 +0000 Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 15:26:38 +0000 Received: from localhost ([127.0.0.1]:47600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXlKY-000299-1n for submit@debbugs.gnu.org; Mon, 12 Sep 2022 11:26:38 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXlKV-00028x-SP for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 11:26:37 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7CA88240026 for <57639@debbugs.gnu.org>; Mon, 12 Sep 2022 17:26:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662996389; bh=WosNo/hf8eJ4XDukylnSV0p6I5fQl8SMikVE/xbDxtc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=UVr6qVhLaplQ4ydgxoSUP5qOCG7esXp8vClgqW/jSrCjUHXZzbwxgzEvlOHlZZrH6 8jTe+VCTwWiwmKYqu9WEOi8lVPPMgFjIYiszq6lw+7vzgu1oWnfrAMYQ/BNRT9UrNs x+b4WBnP1Kc0zZxQFSuhwdqylyJ3Um6+OuulNpAq311l33KCu9K+911PT/QWNkefSe gOlBMxZl9VSk6tLru7FwzmhLhXYGYkr/yRzYr3SFOG3smpha/Ly1BPImedw9REsJTS VpLybtU/25+JpzCaHVImpmFoCFxaLTAtQq7JnQ1Bi3ROtHOPUsLfWIBXBXCpkUxbg7 59LDKKOWkduwA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MR9Rl4fTxz9rxK; Mon, 12 Sep 2022 17:26:26 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qsg4u0b.fsf@yahoo.com> (Po Lu's message of "Mon, 12 Sep 2022 21:11:48 +0800") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> 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 Date: Mon, 12 Sep 2022 15:26:25 +0000 Message-ID: <87pmg0pqam.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Po Lu writes: > Lars Ingebrigtsen writes: > >> Philip Kaludercic writes: >> >>>> I thought we already had support for this under Gtk? But I may be >>>> misremembering. >>> >>> Am I reading it correctly that `style_changed_cb' in gtkutils.c would be >>> a place to start looking for this functionality? >> >> Ah, yes, I think that's the one... Po Lu probably know more about this; >> added to the CCs. > > What exactly is the wanted feature? > > If it's automatically switching between dark and light themes For now it is just detecting that a switch should be made. > , then > style_changed_cb is probably not the right place. It's mostly vestigial > code from when we used to update the region face along with the GTK > stylesheet. Instead, TRT used to be to listen for changes to the > `gtk-application-prefer-dark-theme' property of the GtkSettings object. > > However, that has been superseeded by a dbus based interface in recent > versions of GNOME. I do not understand the details, but it seems like > it could be implemented in Lisp: > > https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Would this have to be re-implemented for most desktop environments, or do most of them use DBus to signal these changes? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2022 02:27: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166303596611100 (code B ref 57639); Tue, 13 Sep 2022 02:27:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Sep 2022 02:26:06 +0000 Received: from localhost ([127.0.0.1]:48393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXvcj-0002sy-M4 for submit@debbugs.gnu.org; Mon, 12 Sep 2022 22:26:05 -0400 Received: from sonic314-22.consmr.mail.ne1.yahoo.com ([66.163.189.148]:35157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXvcf-0002sS-U8 for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 22:26:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663035954; bh=m/pX5xIbXouRqz9blMRhJmh2X2SCnoLdqe2yzwRMuS4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Sdub+nd0iUOcmzPUi/lv9GEqlzBbbTvIkHZhh4lQN4XOpJ/w+jdxLcxhr1Z/U+KNj297wZGUkH7Zct8fEqMmS79g0mnNtYxTSaLhGkD6Moa68ZWJW8UHQE6Ct+BkGW3cJRMvJMiHWAv1/8rk8zkH4wyTqAs3nkW8d8VSYOwPkTDq3xXZ1zNBhaN8fnLQJDBaPDRTa8lDcjgfyycRtrk1kRAjz89bj5Tur14HQHIv9KXYsV/sM+vjtQa0mCaRYexcF7vRhPjsZPjP1frMOOVI8ebsMx6ryZrGsYFAUBpE3M64RMW5xZzfE1weLXjFux0sCdhyzB6OUQteGp00wXDEig== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663035954; bh=WAlrTlRKa7QVMZnBbpiZx7PDeSLwYgrc5/st0jhJ50m=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=lS9S9MsyLOPtcib4Bq0EdofdyjH+J+iCNrkLqMPJ6Zorzpnqc1kTHLI73gpl//EjOozRNSXS5n0NIijaPeQRsoKh2lBEGSOk0jggq9XsOueO/Itogo15YnnRfE4EKZAcu7sp3pZVcNuqTz/yzNECfqCrt5SQCl8QhHxewAn3dVtO4tttcTNrw7mGcXjEfSOq1teLc0CfPEnfv1HfNi6OZUwj8sEpleuXknYszT4sN/XAYc/CVxYVmBbBvZ2RtRVY5YX6eCyPTKY9OFOOmkSqyFwgoyNJSRNAkelLpMvWgJZPpuKJRWO+9GPm8AR0vkwWAH5HiGIqXKRaE0KAlRLlBw== X-YMail-OSG: PU.l60QVM1lK2Mm9bblCC__3iHuK1VOGCKuHUOCROdwjwdtD1KHqCJ6kb2YAItD Ey8TGbcR7g0GY.2iLmQGTEgbqLkc29RuaY7gTISH8.IYqRdwUA3GdivFYHM.QUWSlbVCdZ61xqmd tYIhnt1GvBL8ozcZvWXOFOXyTvkfA99NZyr1EuxxxCifbnvihGbGgzGmGHhDK0C0YoOWXWLRpApY 55Cpn0OZaglX85_frjuV5aJFp_bCzP2f_vriV6iQn5PTYlSgR7UUb81iskzaShpHxiwlF9PAWe3C W64IEArNkHjbw.5CBdKUMpEzoq4CwS6IStii3oJ1NL36Gex7D78xrLwRI0JsX0KartjKqgx4AAMV 5cdXwUzfX6hkqvnwssd9MHB.WNik_oETSWtSYlTb_LheQOM1QyJK98WTPUodwhX4xcdOx7nxJh50 CB6ysBwgw2kuV4YGxq5k_kbbtW.oWdzq9hYsFeGHnRl5bHHKs7ZMxuZUPxTKxKGLPlQ903tGDfqq uRjnfEnJT5HKgEHRY1ecljAZSVXLX9Av2MU86JNWdkW_WGcs9jF9XOJQZOVwXROvLlESxkcuwtD5 mD8hCMgdzV5ZPlR766NgISfnxU0HVfMFF7jbH1O3ipZmW5IQ3CXqbGNFrKFmwv2ruJrk3s4lsRI7 2lSo.Zybl20w7SJAe6kAS0jh87gx4W0oWT6BZWaSuC5OTS3QnRHqBE7aZoBF8PjllftMN1zDIKqa jWRkWzmxKmpe3sd6R4X0n9Siyt1Em8ipK.a_hPOU4lrojEg.li7DFhCdJWdH.zZBoI0Hl4JS57W7 2S87D12UwRhiTNHOOxNyMXVkusoEznchEL1TDl5tBDT9bbTbWA.QEAk7bxKYk9qXvRbKiOKvx224 NtxpgmsOG4VcbqBBiRoR7YXVpMYAfnB5uADJFhV28tdffGCtLIeQvcRA7Yqqtp8emEx4S1F27Dsz 9.CdetZWVEpaCHY5xCIGu_dFxQX.b8llTxC9fbCfsk5QIYfD7IzLA4FClY17aqN28OoS1llU5aS_ oghrrPKdldgqHINYzLdMBFqV9ESa2veAwwYn8Gcyg91e38S_hOd9qDydQj_P96kOfh9IKFej6eQM bNJW51SeY.zvCeEJONZ.A3sLspXUsjEsAiKWRiJZU3RBWQwTfEhIDtyAV0xwrA5v3AmitN4xugy. LfW.Wxzi9uQXxhHIr1Zl3RhlZJt6L5JndAUE0_EWYmgx0n6QPShAV.RkjSDCNrEzc5RNPyTls4nN BBWckraUSIv0k7dgJIoaT6eS1yj8fyMkd8h_U4y_BvjdrCQ96EbCDbiam6GSW.pTZfEmiUssy7RE mayQWC_uHGatv6iAJIN9PRLclT1qWm7c0PgpEENA4IiYZGWl3dwbmfXoCjuPnvGlR0JsCXDmeHbs LaQkkWeq8RmB5SlijBWChaHz807tP8mCSxH_OzS5lWy236W3XjW2FnGLBLq8GywSgpTlDqGizPTl AYVQX7KVK2CseSfc8MQlDRZU6_7e2GXADUufsRGyPH9SNVyfFWzhjJzx5fiMdusmRhtOD6CeRW5t PLXciyEFXnQTCRi1cNkvX3sE92uDkPXPg.8Bv7SedvOZyTi5uEb.mXReIGmDo_u57uWG6gOZ3TwM NxWsFRYsn5UnW7TYtDU7Jghrpu.cZ7Yw.2z6YwLsQqIOI.USKvzedxbhnxmufVqFH99ugwmnsNyw RVDk422pxb5DqQ1TA0wMEuz75aD9BAsetx1SSlN9hCBMhrhHj3jLSUmU1ZHupmOhSEHsZifaJnwn jZtHn0i7VFqAqC79iii7293Df5nRk_ED24yjU5JotN.TUQhUkrcZcYBN4Agr8W5vGlpFPTcIIkB1 L2mClaBox3XuOnHfO.Qo1Q1_Q3bvfgO2Sc_sV8U3x7ai_bBmqqibi4Kty51nzYS8B4QmS0Qv.Oru j.HHBHYMp0VdeOZzCu9xLpuxLiAt0_k0qAMeVAISzGMkiams4ngi.rxI30Xy1WrfzlJPyl48UgaH n.aFNzjeeO09xl1Jl51.Gb14eSigxMWTRII2zRMriKXLRF_3vmMWP8K.gA_kmCNvhR4HgRAYghQw DLrrkaAKwA040ui1vZ9uN4AxW8tZo27CxkOdGjz8fm2Xa9xx8Nr.BZqZemFJWmIcUN9RKZaRxQMM Kg5nR8fvYZrmr9gObQSYZXA5GihB3OHolU6Haurqetvt5eeD9SgYbEVV9m3zvvI4_3wPGbX6mpVN 420wHGAMCYc1TzfQ41IJj.RNj4GJQLc40I9vhGniJsp2Wa.2GYxQgt0XkUXacubnMpwk5CwXZBPi VwlQrinIVug-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Tue, 13 Sep 2022 02:25:54 +0000 Received: by hermes--canary-production-sg3-6bb8946c47-vfvlf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d901c7ddad471e2237ab485c32354f04; Tue, 13 Sep 2022 02:25:51 +0000 (UTC) From: Po Lu 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> <87pmg0pqam.fsf@posteo.net> Date: Tue, 13 Sep 2022 10:25:45 +0800 In-Reply-To: <87pmg0pqam.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 12 Sep 2022 15:26:25 +0000") Message-ID: <87o7vk2eom.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20612 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 536 X-Spam-Score: -0.0 (/) 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 (-) Philip Kaludercic writes: > For now it is just detecting that a switch should be made. Right... that's easier than trying to determine if a theme is dark or light, but is still currently a mess on the X desktop. > Would this have to be re-implemented for most desktop environments, or > do most of them use DBus to signal these changes? Recent releases of KDE and GNOME do. I know nothing about the others, but they probably do not provide a way to toggle between "dark" and "light" themes in the first place. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2022 11:11: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 To: Po Lu Cc: Philip Kaludercic , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166306743132250 (code B ref 57639); Tue, 13 Sep 2022 11:11:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Sep 2022 11:10:31 +0000 Received: from localhost ([127.0.0.1]:49023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY3oF-0008O5-Iq for submit@debbugs.gnu.org; Tue, 13 Sep 2022 07:10:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY3oC-0008Nl-PB for 57639@debbugs.gnu.org; Tue, 13 Sep 2022 07:10:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=afTCM78XxFnkoNyl7387jKf7G2yGOqyXUXtrZsaqBwo=; b=odKLblhlfPajuX7LuCsLQLpHI+ gQ+z+NmviVJCMcdWxpsmKXNIR8cjq0hmy6SQCAt28gXpaWN7BtSdpd9Fc8UVxQQTtF02PJZIZa0Jl 5YYp5Uwu9oOLtTSUkw9tYkDXDI+z5ixxGsNO9sIg5yEjBARYGC7X0Lglk9/o9wZdIucY=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oY3o3-0001zV-Hs; Tue, 13 Sep 2022 13:10:22 +0200 From: Lars Ingebrigtsen In-Reply-To: <871qsg4u0b.fsf@yahoo.com> (Po Lu's message of "Mon, 12 Sep 2022 21:11:48 +0800") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> X-Now-Playing: Laurel Halo's _Quarantine_: "Thaw" Date: Tue, 13 Sep 2022 13:10:19 +0200 Message-ID: <871qsf5y3o.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Po Lu writes: > However, that has been superseeded by a dbus based interface in recent > versions of GNOME. I do not understand the details, but it seems like > it could be implemented in Lisp: > > https://flatpak. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Po Lu writes: > However, that has been superseeded by a dbus based interface in recent > versions of GNOME. I do not understand the details, but it seems like > it could be implemented in Lisp: > > https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Yeah, doing this via dbus is probably the best solution for GNU/Linux. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2022 12:10: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 To: Michael Albinus Cc: Lars Ingebrigtsen , Philip Kaludercic , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166307097222549 (code B ref 57639); Tue, 13 Sep 2022 12:10:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Sep 2022 12:09:32 +0000 Received: from localhost ([127.0.0.1]:49164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY4jL-0005rd-Pu for submit@debbugs.gnu.org; Tue, 13 Sep 2022 08:09:32 -0400 Received: from sonic316-20.consmr.mail.ne1.yahoo.com ([66.163.187.146]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY4jJ-0005rO-94 for 57639@debbugs.gnu.org; Tue, 13 Sep 2022 08:09:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663070960; bh=Ifv05VDJS/JaBlRMa7Dy27YQVNpnGpahDS6UP6mcREI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=TCSBix0AGOek9g62on4v9hytBNfaKFAupw3QttdcWvZMs8WNQqOMJQiK/CRi3iyfvzWTEj4Nzk0Z3pBuVcwqPxWziF4hZiyPUK0Nb7mNri2ZSsCovqPgszZDTSZMBAp6uAWGs4co2bklrHzwSMOHqLu7IEXhyiIYxrGRbrEX+zIBgy1LbSKOokKlaDsiziOfzk0zyBYeEtwCWfWo1cSpdLJwxaS6TpCbGBRhkCyryCUliHZzi435IkrIKL569R0mjBjpvXPAdTXsSF9h9JIGtqTpdEEHwao/SryCr73CbFOauc72Ale+5jLWka4vN/+BDC+SDZSRfgYqvsHgnZc38Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663070960; bh=JkNBL40ceO2/XP6uNP4Ky6NQDXrLREYUm+fUKEcV9WT=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=tjl/XnBTuh68Ta6wki54Zh4GctAi1/YVjbPrifqsWF2r82BSlhOhCGR/zAPG1WVXsyqesCfGIKa+nIKgHrYBM1zkODI59AB3nwnu8hJdteHq7qxD8v+GDrfo+BBp2NiF2DK78jfRh9OKPd8HswtYhmFTnBDFJBsLG/CIuUTNbbtysgq86QrOGlO3FCDtOp0zCdIkxAC3qS3OWn4pZ8xPBK1BehOqMCoesKMwH9jN0LygtknwVOwKqYsJfBXnj1TOF6bVRlFeewaoX0HFpaJ5vdisvFYJUUvkSVxfeVDQSDDDgBqu+kWR8pchvVrlflNr09RlvNvGgxPkBtXX6k2b9w== X-YMail-OSG: Y13ibQsVM1lrmmAom_Ivov0HVlkQcImR96GeVvPR.uxgQDAN4XVGgkCuXTDkbEp XLV3pqOLgVsFWu7Esfuw70jHsvRDu35YkjVixR_j1pC5g5HTc7wf2B86wKPiBIU4WAAdIgoS7lCQ g0B7PZJdrchH4eZNC2ySE_4eiUfMP6PFxoTfaJwXsa3xjck3ahuSKauZ2iHzlJo1Ts_vHPajN1aH KlgyPXKbmHx2ZaGNmeGYvOT_ugAqTROUOyHevZSbMUspP7IwuBkE2f5BKA56mJ4oKx15sgVTMGeC xORWXck94vYvrNvVGHc_OYz_r1mDj6u50FI0IkfKVM.Y_qfYmaEc.Ru99viZkdG_G9Zl90kSPhD. L9sry2lwI714ujzKNRxe.Ewcp7TvKLrifF7LMmBXCI5w0hPQGhC5PhDdQaa4SSnfeO_rkXhcnMZ0 mKvsk06UCgUqgtzlDyok5r8KLSmLytJwx3TjKioX0jHEzuvAqBbBopk9o0Bj1y.foZuO.0.600dR jZ3mxYCAzGei91N8cgt4KQbcz0MbN4Ix4jqNJk7nWmsuChX_IpgbNpy9l3WSXDqY0n7coX1qIqXc qd5JKHp1fveHqKa.n7.gsaSNt8zyATaZQ7zsx85r.0EPjt_V7PtOVxbLsHd7WvL0aKlRZSoHy8aM zmJqQuj1L5cStH358AOfrpkhCMRmONl5ZMSWoZMDkTRvLW2cULZyAHJw3s_mJkAwG.DWEQP0NM8G _lmiw.Mv7Bq5hwZki70k.vGxBi_9SvK4hp2nwqKhN_tyB6gGftwvOywMsbuU3imZFOGpj6qyiIw2 nnU6114TNhI3QyZJL5Na91FfQC9JFwpZ1DODq7MyK.2XuvUiHDlyCq4FIkBPmY8j.xkPtwPU4RpM wuTYFYVTRWYqh.VjI7tzWcAQhxwjnnEr4l89ZwCZN0rsHIMrc.EuwUzXENl6.01uLb.krAduor1z DXNpU.jjgIX8K0WZ7RAaqU3qbWQLghTJ6NHvTQT31lNLPtxcUJVh3CTNqZ1b6of2ZfN_sIcCJrSv RpwpcW6nfI._7wj9PNsqJjc9.8HKwyeVEnrlfcdv2m6ijzvNx0J.sqNfj4ROqWz9SXehTdpSVDa7 .hAQMyxQ5w5gVFCuk.ihoR0MJSph0Hx9UzwRqC1YfvBbb0CLv9WZZAKR.9SO.ARHQjebt.ZUKLat mV2jGFyweVfWhNSPr_ClgevlDxeBgKuNzXPwLWu9ic7yDmr66iVHT2UIUdwbRu.2BtoAiRFILs3n gNeE9UrAksr7qz6Fsfh1yGVwTMNHZN7FkedhnT.VvkmuJMt6OD2wxZS0QGDykObuqcwHDuz_bAdf V8Q8SePyNvLIctnWuvTy_kiw.MaJRxW2Yt6LgwfoLlce2GkSigd77LjZea2cVEYkMZEbZxG9_UpY mHAEzcybyZUi6z99OsGPwzb7fE31LdrCZt6K2rEuCJvXE_HJK.1q5QhpYWumHmEhtAI6.2M8Xkca aXyQ_0k8qFNpBeSsGvTJ8uQJCD88jJrt1HUYMZYYQxl2k1wzsBIWmlf.qOMMjPiMuemR0cpzfb8A LWHKJZIvoNuZJuDJQw7tXrD.hlt5y.Q.yP19BJLcco2rQ3tztkfFvl9DQq6ZVoOer313bXqgGSax snqM84yzu_WillybNhBeBGsB9ifOdqiOmOKHu7lt5QjdnZCTa.N70kc.PHsE.Av.x2f2IFl44slc FciXGnEBciGyg.EJqvVUlS84gFfXntcTVEGRui9jzJDRtEzojs5fHvAJRuhYrLRuxiLTOBkMvem3 kizJ54uxAHkY.Y7imdGobeLv7YDfBiuIYKfRRe5THLrE8RIQByGPdtJKiW6w1sPIp5sLdiNgLlNv knBwHJ_jlbdenZMOmnKy2SgIo7pTT.PmxK1Jqa0j9w1cti8VI2Wvw6sty1Tc6H9G.ogrTGrBg6q0 rAk.FC_i.ZeYojl6pHOnl1n0ayNJOfd2FAeN5M98VjxXkLeRXNtLWjVGB8VZVVolJF6MCX4Cz08I in6K9cG.8BuBo9N6tD31Ah6dzm.1Ojmt6eIqBbqKmCsMUMO73ZScxEgvBUmG1tXGF1Egb2sUZErU Lo8NnA00QwZPAzB9Ydgr22j9yUSfzPZH8AuI97TeOLAC1isinnvXWLsmpGX3fUxy1hLnVL03QH.L lDIFEzJvGwnyjM1mo5pzSblMIpr8QnF4IM1IKXi3D6pGUMBfU.oqwkqck4CDkeMcjsxXwHwHCCoe JjbLM_6q_rTaL1lVSqcIBoTvbZvN0fKmiFQ2cX8I8qrHgspnNY..N8Jl3bV1RjictcOJFinnovrD Ddhh3OY3R480- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Tue, 13 Sep 2022 12:09:20 +0000 Received: by hermes--canary-production-sg3-6bb8946c47-n8gf6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d8c099768da25e576c3a26ca60d1850c; Tue, 13 Sep 2022 12:09:14 +0000 (UTC) From: Po Lu 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> <87v8psmyr9.fsf@gmx.de> Date: Tue, 13 Sep 2022 20:09:08 +0800 In-Reply-To: <87v8psmyr9.fsf@gmx.de> (Michael Albinus's message of "Mon, 12 Sep 2022 16:51:54 +0200") Message-ID: <87h71b1nob.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20612 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 201 X-Spam-Score: -0.0 (/) 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 (-) Michael Albinus writes: > And if I understand > , > this is not restricted to GTK only. Indeed, it is not. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 11:39: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166315551226916 (code B ref 57639); Wed, 14 Sep 2022 11:39:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Sep 2022 11:38:32 +0000 Received: from localhost ([127.0.0.1]:53965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYQit-000704-UC for submit@debbugs.gnu.org; Wed, 14 Sep 2022 07:38:32 -0400 Received: from mout02.posteo.de ([185.67.36.66]:40141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYQir-0006zq-8Q for 57639@debbugs.gnu.org; Wed, 14 Sep 2022 07:38:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1CC5B240101 for <57639@debbugs.gnu.org>; Wed, 14 Sep 2022 13:38:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663155503; bh=zhoSa9RmFt6YROPKF8P5knUY15/OSW+FfQcOyOC+G9Y=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=myZJNNsbIxgAWd3DiBtIvT0Tf1Yrg7ikyiV4rpRLV3dSuVrx/FcpGGElTb2EaAlvs N2H7hYmLS0fUNocJn28fBLxY9qTA7bTDi+sNeQmr9Zmjdas1gJI9Hl5HmHbAk3bln7 r5UOQUhNtoB//A0FcBQ/S2NZiW8HqntrHr5zgIiEoW2xDYvOiwK/q4r7v2GgF/Svp8 DUj19147WsvfncWiC3H/hMjRG3suOwUiqnRYRbhv6k+4kwDPKb3MLqdZSLcRj3tGi3 tWJGVcWt5HGblpQ4V2kCkd63RTIfWZNgCrr3pMCEp3PcVdikhS/GAIX9TpuamMAxTw HcG/R9zSXHLaQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MSJHf2QZRz9rxH; Wed, 14 Sep 2022 13:38:19 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <8735cxpx2r.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 11 Sep 2022 20:47:40 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> 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 Date: Wed, 14 Sep 2022 11:38:11 +0000 Message-ID: <87k066yyn0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Here is an updated version: Any comments on the updated patch? Is it OK to push it in the current state or is something missing? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 13:04: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166316062211857 (code B ref 57639); Wed, 14 Sep 2022 13:04:01 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Sep 2022 13:03:42 +0000 Received: from localhost ([127.0.0.1]:54111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYS3J-00035B-RS for submit@debbugs.gnu.org; Wed, 14 Sep 2022 09:03:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYS3H-00034y-Rd for 57639@debbugs.gnu.org; Wed, 14 Sep 2022 09:03:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9Z5bykXnC5AmBzeXR7LH0NPhAaD9+0PMS9cG81ivr74=; b=XLUtJrPzqYsBQ3/ByGtHC3EMAD ylSFl8RpDcVvYlY+bO/0FhQAVM+EUSDcbtwJtG4KUsbi9uyODXs9JSFg4wubWVGU8Tf0YguIO/SRI JN9e8TnTGS/70OdjOd/ka1EewcJu7T+xOZAXaGwQPLljt/XU/s7ixVy27YdAie8Flk24=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYS38-0006ex-VJ; Wed, 14 Sep 2022 15:03:33 +0200 From: Lars Ingebrigtsen In-Reply-To: <87k066yyn0.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 14 Sep 2022 11:38:11 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> X-Now-Playing: Joan as Police Woman's _Joanthology (3)_: "Human Condition (Live at the BBC)" Date: Wed, 14 Sep 2022 15:03:28 +0200 Message-ID: <877d269kgv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >> Here is an updated version: > > Any comments on the updated patch? Is it OK to push it in the current > state or is something missing? Well, the current state is with "variants" like Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: >> Here is an updated version: > > Any comments on the updated patch? Is it OK to push it in the current > state or is something missing? Well, the current state is with "variants" like +(put 'tango 'theme-variants 'tango-dark) ;see `toggle-theme' while I wanted to see tagging themes with features instead? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 14:38: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166316625015323 (code B ref 57639); Wed, 14 Sep 2022 14:38:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Sep 2022 14:37:30 +0000 Received: from localhost ([127.0.0.1]:55725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYTW5-0003z4-Ve for submit@debbugs.gnu.org; Wed, 14 Sep 2022 10:37:30 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYTW3-0003yj-68 for 57639@debbugs.gnu.org; Wed, 14 Sep 2022 10:37:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 44AD8240101 for <57639@debbugs.gnu.org>; Wed, 14 Sep 2022 16:37:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663166241; bh=rMbg1j46A6RDK2n88iaistTahMcjRN3R80qUMlPRGAE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=lvUKNGpXcIjCsFCrER1ejfYULQP2mBDPLsNCtum5LwslOYN2JUobAw9dzDe6kefah +KocoQAyvyvCrTfSswyc3tDb3DibBzpPPIXAx4gpAVe9SYbmPxIeIg46zQ6rnjtcpM 8x3ehVXxeUF79jbxIbxqT5s9O47pTNvYtFz8WaKsfwdjY0lLIAG9WDPUsgmJwFDAkQ rWHdJsClZGdFwKNgz3LA37SUQ+qo4N7AETXBZuiPqj+d/DgqmCmdDQ0Y6DSjgxMs8q ETc8cRYLaRAJTPqdg03gpWVDIS9FM232Zh7S/u7w1tTT+GcKpNDqaiiqxs3bX7s4CA 0d+JA12kZW0iw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MSNG83Mc9z6tmq; Wed, 14 Sep 2022 16:37:17 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <877d269kgv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Sep 2022 15:03:28 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> 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 Date: Wed, 14 Sep 2022 14:37:17 +0000 Message-ID: <87bkriyqci.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>> Here is an updated version: >> >> Any comments on the updated patch? Is it OK to push it in the current >> state or is something missing? > > Well, the current state is with "variants" like > > +(put 'tango 'theme-variants 'tango-dark) ;see `toggle-theme' > > while I wanted to see tagging themes with features instead? That was my question, should variants serve as the foundation for tagging or is tagging an alternative for variants? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 15:22: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 To: Philip Kaludercic Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16631688944183 (code B ref 57639); Wed, 14 Sep 2022 15:22:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Sep 2022 15:21:34 +0000 Received: from localhost ([127.0.0.1]:55804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYUCX-00015A-GA for submit@debbugs.gnu.org; Wed, 14 Sep 2022 11:21:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYUCV-00014t-83 for 57639@debbugs.gnu.org; Wed, 14 Sep 2022 11:21:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tP956YPOyyw3J20z72N3k/dbOkR8XawAQjOnbZ//akU=; b=Xs8cgjOohxNa9iXqBewKvpYelF OvDJB5teEfYTenijhyEj1jRHsGIYPULBtrvx5hBHPDghibJKmFmwm7eM2MOsr0RfDBUHh077/sMgY 6tNoPIMw6GX8HY65d8a6sXHr35UxiqE+zyJ26ykDPTNUAk57W3cdxjXb+HFsqWFiE8XA=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYUCN-0007mv-36; Wed, 14 Sep 2022 17:21:13 +0200 From: Lars Ingebrigtsen In-Reply-To: <87bkriyqci.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 14 Sep 2022 14:37:17 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEVXCCuhExf7LAHx EQX///+EbqWtAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YJDg8IKWAxEiQAAAG0SURBVDjLjZSNkeMw CIWF3YCQGlhQA0b039s+kOxk93I3p5mMHL4Ajx+nlEL66ZR/AseZOubAB1/mwJUAT+P/Qg2eCZhv g6+7cgswmvSWZpwEiB5AGly3HSIS6A3iqz+kLA/txnekkeQqrXQjlT7SIWvwKUc4EQO0mfYNB3QC VBrc+YvCjrrh4qXVGR5CVK9rRhKY4XIS6jgN4Kr1arqSq9tZ+IhQ8GC2NiKRukSymckF+REcOifA Zd36bCu5IT6MI4AwtNxAfwB7AdnAlwdOixwjOpI5llz0wTXk6upgqNKkTfagVOW4+ghjxJsd4l8A sbLpYNL7A6hCZQ4QTJhvYJWJjzV2atGBDfjLiM4lgg7U+4AhHaHCPtE4LqGqxA9tyBq5K9VWMkfJ DcPZu0AYD9q+PaB8rzBk2ZhPqMywt+re3eXh0n4vdbmfPd8C9fEGxBs6spqyurkBl3psufnaPMDJ yDG6t/XddZAXrp0+gRNrXP8ERU4UXHesN+A6bRljSfjVK4z8wj4F6OaxcA9wqxZOhnWd8gPYxXlh MVnfAS8P3NLnW69QcI8b3Vx/AEU/nb+Cb7VUjESWM2HrAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIy LTA5LTE0VDE1OjA4OjQxKzAwOjAwHtKitAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOS0xNFQx NTowODo0MSswMDowMG+PGggAAAAASUVORK5CYII= X-Now-Playing: Don Cherry's New Researches featuring =?UTF-8?Q?Nan=C3=A1?= Vasconcelos's _Organic Music Theatre Festival de Chateauvallon 1972 (1)_: "Resa" Date: Wed, 14 Sep 2022 17:21:08 +0200 Message-ID: <874jxa6kyj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > That was my question, should variants serve as the foundation for > tagging or is tagging an alternative for variants? I think feature tagging should be the basis here, because then we can use that tagging in several contexts (which we can't with variants). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (-) Philip Kaludercic writes: > That was my question, should variants serve as the foundation for > tagging or is tagging an alternative for variants? I think feature tagging should be the basis here, because then we can use that tagging in several contexts (which we can't with variants). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 18:14: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 To: Lars Ingebrigtsen Cc: 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.1663438436786 (code B ref 57639); Sat, 17 Sep 2022 18:14:01 +0000 Received: (at 57639) by debbugs.gnu.org; 17 Sep 2022 18:13:56 +0000 Received: from localhost ([127.0.0.1]:47169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZcK8-0000CZ-F4 for submit@debbugs.gnu.org; Sat, 17 Sep 2022 14:13:55 -0400 Received: from mout02.posteo.de ([185.67.36.66]:33317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZcK6-0000CI-4b for 57639@debbugs.gnu.org; Sat, 17 Sep 2022 14:13:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7B5D3240101 for <57639@debbugs.gnu.org>; Sat, 17 Sep 2022 20:13:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663438423; bh=3B5N/ulLehB4AuP8PZNEL2xToEuA1fI/PEHFCH7cuhI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=esEOon9JbUzwuZ3s1R8QFdvtoUOj/K/cO6pogS1ODhj5xKG3ZjcEh9AKJdU8cF455 HU3DG+2lDTzBVZn+8tx9wgVMts0vBiqfgfxggPqLh0SgF84r70+ibwUZFakv8TDTwc l5ETQ/n/SUUT5XbdkcjBbfjPKAeF09lghMjASRzFdpTc22dPly/R5fyO+Gq8B8yw8V pS19YiwtF7xMeRT2xT2rFgVGvMDBIeBeS7TnSHeINSFmIlOabwBsO46iL6rKPF4DBV XHSfSqlp2Ub/EU70iXPjsL4L38LwT6kWqRLxlPzo7Sw3AgGqqELFURXTXpXDJg91Hr xsQ7D0/6z2Akg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVJwQ68rLz6tmP; Sat, 17 Sep 2022 20:13:40 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <874jxa6kyj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Sep 2022 17:21:08 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> 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 Date: Sat, 17 Sep 2022 18:13:39 +0000 Message-ID: <87o7vdg97w.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> That was my question, should variants serve as the foundation for >> tagging or is tagging an alternative for variants? > > I think feature tagging should be the basis here, because then we can > use that tagging in several contexts (which we can't with variants). Ok, I've updated the patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From 0b346c567ffc0bd130b8c4157a9654134055f0e5 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. --- doc/emacs/custom.texi | 8 +++++ doc/lispref/customize.texi | 5 +-- etc/themes/leuven-dark-theme.el | 6 ++-- etc/themes/leuven-theme.el | 6 ++-- etc/themes/tango-dark-theme.el | 4 ++- etc/themes/tango-theme.el | 4 ++- etc/themes/tsdh-dark-theme.el | 4 ++- etc/themes/tsdh-light-theme.el | 4 ++- lisp/custom.el | 61 +++++++++++++++++++++++++++++---- 9 files changed, 86 insertions(+), 16 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f86c7e2dd9 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,14 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant + Some themes have variants (most often these are light and dark +pairs). You can switch between these by typing @kbd{M-x +theme-choose-variant}. Note that this only works if only one theme is +active. If a theme has only one alternative, it will toggle +automatically. If there are more of them, it will query which one to +use. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..7a8b62a85b 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} is used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..91432326de 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220917.1823 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -97,7 +97,9 @@ leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :brightness 'dark + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..264a455518 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220917.1825 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -78,7 +78,9 @@ leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :brightness 'light + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..1e342aa946 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -30,7 +30,9 @@ (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :brightness 'dark + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..8c3d1298e5 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -30,7 +30,9 @@ (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :brightness 'light + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..cfcad356a3 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -20,7 +20,9 @@ ;;; Code: (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :brightness 'dark + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..295f56a8b9 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -21,7 +21,9 @@ (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :brightness 'light + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..2982573b7d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,46 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Toggle the current active theme by enabling its dual pair. +The current theme will be immediately disabled before the dual +theme has been enabled. If THEME is not active an error will be +raised. If theme is nil For NO-CONFIRM and NO-ENABLE, see +`load-theme'." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car custom-enabled-themes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "`%s' is not part of a family" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable)))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-= Content-Type: text/plain The only issue with this approach is that the properties are set using `deftheme', and are therefore not visible before the theme has been loaded. Do you (or anyone else) have any ideas how this could be improved? I guess the dirty way would be to set the symbol property using a manual `put' call and autoload it. --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 18:33: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 To: Philip Kaludercic Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16634395722650 (code B ref 57639); Sat, 17 Sep 2022 18:33:02 +0000 Received: (at 57639) by debbugs.gnu.org; 17 Sep 2022 18:32:52 +0000 Received: from localhost ([127.0.0.1]:47193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZccW-0000gf-2y for submit@debbugs.gnu.org; Sat, 17 Sep 2022 14:32:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZccS-0000gO-Ie for 57639@debbugs.gnu.org; Sat, 17 Sep 2022 14:32:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZccN-0003Es-8f; Sat, 17 Sep 2022 14:32:43 -0400 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=mjjvJyJId7bXtVV1KUroY6QLzIrwT/p+tef1IY/ckX8=; b=kIXt5cGpV8LC GXPsmXjRZ8ZR/c+cbTx5PuNUMm1jY2rajQMo7GZ3SaTW4FOIJesJhls02UPgl4zavHTmLeOMOuOSe 2iGbiIjeIT7Lp98XlQc1UFT63RzTGvQ/p5mQQBeFv2lqdIP8NJM1MekO3qirTqUjB+8N1OAbP3e3N YsK2WMYEnEwSt9yquW6aL2srWyBaXaU+eYEdmSk2aFJyH/bkG18kn5M1NfapdgYLqizaRVXKSOJ2L dzfK4bC+ABlciU9B25ENfl24lvpdTG2JRpTiqZl7ojgu7GSRAOQruMF5YEdLnlR7WmQkn0p+0rVoN Qq+8h3xIrzZ07mi/di9fDQ==; Received: from [87.69.77.57] (port=2234 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 1oZccM-0000dt-Nb; Sat, 17 Sep 2022 14:32:43 -0400 Date: Sat, 17 Sep 2022 21:32:42 +0300 Message-Id: <831qs926np.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o7vdg97w.fsf@posteo.net> (message from Philip Kaludercic on Sat, 17 Sep 2022 18:13:39 +0000) 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> X-Spam-Score: -2.3 (--) 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 (---) > Cc: 57639@debbugs.gnu.org > From: Philip Kaludercic > Date: Sat, 17 Sep 2022 18:13:39 +0000 > > +@findex theme-choose-variant > + Some themes have variants (most often these are light and dark > +pairs). You can switch between these by typing @kbd{M-x > +theme-choose-variant}. Note that this only works if only one theme is > +active. If a theme has only one alternative, it will toggle > +automatically. If there are more of them, it will query which one to > +use. This description is confusing, I needed to read it several times before I understood what you were trying to say. The main problem is that the "Note" sentence doesn't belong, and it interrupts the logic of the description. Here's my suggestion for saying it more clearly: Some themes have variants (most often just two: light and dark). You can switch to another variant with @kbd{M-x theme-choose-variant}. If the currently active theme has only one other variant, it will be selected; if there are more variants, the command will prompt you which one to switch to. Note that @code{theme-choose-variant} only works if a single theme is active. (Btw, what happens if more than one theme is active and the user invokes theme-choose-variant? should this be described?) > +Themes*} buffer. The remaining arguments @var{properties} is used > +pass a property list with theme attributes. ^^^^^^^ "are used", in plural. > + :brightness 'light Should we use :background-mode instead of :brightness, for consistency with frame-background-mode? > +(defun theme-choose-variant (&optional no-confirm no-enable) > + "Toggle the current active theme by enabling its dual pair. "Toggle ... by enabling"? "Dual pair"? Can this sentence be rephrased to be more clear? > +The current theme will be immediately disabled before the dual > +theme has been enabled. Likewise here: "dual theme" doesn't explain itself, and seems to be inaccurate, given the description in the manual. > If THEME is not active an error will be > +raised. Passive tense alert! > If theme is nil For NO-CONFIRM and NO-ENABLE, see > +`load-theme'." Something's missing here or wrong with the punctuation? > + ((length> custom-enabled-themes 1) > + (user-error "More than one theme active, cannot unambiguously toggle"))) Wouldn't it be better to prompt for the theme in this case? > + (let* ((theme (car custom-enabled-themes)) > + (family (plist-get (get theme 'theme-properties) :family))) > + (unless family > + (error "`%s' is not part of a family" theme)) "Family"? this terminology was never mentioned in the manual or the doc string. How about Theme `%s' does not have any variants instead? Thanks. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 21:34: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 To: Eli Zaretskii Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166345041327771 (code B ref 57639); Sat, 17 Sep 2022 21:34:02 +0000 Received: (at 57639) by debbugs.gnu.org; 17 Sep 2022 21:33:33 +0000 Received: from localhost ([127.0.0.1]:47284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZfRM-0007Dp-I2 for submit@debbugs.gnu.org; Sat, 17 Sep 2022 17:33:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZfRH-0007DZ-AH for 57639@debbugs.gnu.org; Sat, 17 Sep 2022 17:33:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2A759240026 for <57639@debbugs.gnu.org>; Sat, 17 Sep 2022 23:33:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663450401; bh=xSyljolMsNgAxuSkKp7OOvrIm79H4eq78DNxjA51/kM=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=XaegDueKwr0HuGuE12Ji+lY9nL1eKHmA6Y/xdmSTYB79yc1oa19yNKSEJ3QTG853y yxfU3a4kfobaBRt5W9rQR+tT448qQcSEFQZJk2+fhH9dp9Ttf9/XHDiH8z0hDy8D+k MXlCZ6W+irJyqxpRz1SyG3Pw8Vycj40W05Yv61lgdcZa/jhSnKfuji2IX+rIk2EvQk HP03JyMV56yraTbwXuFCcVIugDLmCESWKhOqkVhRCEI2goP7qYiypWX9DgzGVQER35 cwhA3wm43rEaCqs41McCMUCUPF1yZVoPr4fLrhcCGDOeZT0ZGgXkGEZHx2vJzhaLEA AHcH55QuibmYw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVPLm19kqz6trG; Sat, 17 Sep 2022 23:33:19 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <831qs926np.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Sep 2022 21:32:42 +0300") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> 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 Date: Sat, 17 Sep 2022 21:33:18 +0000 Message-ID: <871qs9fzz5.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Cc: 57639@debbugs.gnu.org >> From: Philip Kaludercic >> Date: Sat, 17 Sep 2022 18:13:39 +0000 >> >> +@findex theme-choose-variant >> + Some themes have variants (most often these are light and dark >> +pairs). You can switch between these by typing @kbd{M-x >> +theme-choose-variant}. Note that this only works if only one theme is >> +active. If a theme has only one alternative, it will toggle >> +automatically. If there are more of them, it will query which one to >> +use. > > This description is confusing, I needed to read it several times > before I understood what you were trying to say. The main problem is > that the "Note" sentence doesn't belong, and it interrupts the logic > of the description. Here's my suggestion for saying it more clearly: > > Some themes have variants (most often just two: light and dark). > You can switch to another variant with @kbd{M-x > theme-choose-variant}. If the currently active theme has only one > other variant, it will be selected; if there are more variants, the > command will prompt you which one to switch to. > > Note that @code{theme-choose-variant} only works if a single theme > is active. I prefer your phrasing and have adapted it in my next iteration of the patch below. > (Btw, what happens if more than one theme is active and the user > invokes theme-choose-variant? should this be described?) The current patch doesn't support this, but I've considered that a custom theme could clarify that it is a colour scheme in the new property list, and toggling would then not assume that there is only one active theme but only one active colour scheme. >> +Themes*} buffer. The remaining arguments @var{properties} is used >> +pass a property list with theme attributes. ^^^^^^^ > > "are used", in plural. Fixed. >> + :brightness 'light > > Should we use :background-mode instead of :brightness, for consistency > with frame-background-mode? I chose "brightness" because I was looking at terms used in colour theory and everyday language[0], and considered describing properties such as "hue", "saturation", "contrast", etc. but that would probably be overkill. Consistency is probably preferable, so I'll also make this change. [0] https://en.wikipedia.org/wiki/Color_term#In_natural_languages >> +(defun theme-choose-variant (&optional no-confirm no-enable) >> + "Toggle the current active theme by enabling its dual pair. > > "Toggle ... by enabling"? "Dual pair"? Can this sentence be > rephrased to be more clear? >> +The current theme will be immediately disabled before the dual >> +theme has been enabled. > > Likewise here: "dual theme" doesn't explain itself, and seems to be > inaccurate, given the description in the manual. You are right, the documentation was outdated. See below. >> If THEME is not active an error will be >> +raised. > > Passive tense alert! > >> If theme is nil For NO-CONFIRM and NO-ENABLE, see >> +`load-theme'." > > Something's missing here or wrong with the punctuation? The sentence was cut-off, so I just removed everything from "It" to "nil". >> + ((length> custom-enabled-themes 1) >> + (user-error "More than one theme active, cannot unambiguously toggle"))) > > Wouldn't it be better to prompt for the theme in this case? That would be another possibility. I guess it could be combined with the above proposal. >> + (let* ((theme (car custom-enabled-themes)) >> + (family (plist-get (get theme 'theme-properties) :family))) >> + (unless family >> + (error "`%s' is not part of a family" theme)) > > "Family"? this terminology was never mentioned in the manual or the > doc string. How about > > Theme `%s' does not have any variants > > instead? Strictly speaking that error message would be wrong at this point, because we cannot say if a theme has no variants if it is not part of a family. This is because variants of a theme are all those that are part of the same family. I think it would be better to clarify this in the documentation. > Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From ae4f1596c479b9703c27b3635cff88f89a0b730a Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. --- doc/emacs/custom.texi | 11 ++++++ doc/lispref/customize.texi | 5 +-- etc/themes/leuven-dark-theme.el | 6 ++-- etc/themes/leuven-theme.el | 6 ++-- etc/themes/tango-dark-theme.el | 4 ++- etc/themes/tango-theme.el | 4 ++- etc/themes/tsdh-dark-theme.el | 4 ++- etc/themes/tsdh-light-theme.el | 4 ++- lisp/custom.el | 62 +++++++++++++++++++++++++++++---- 9 files changed, 90 insertions(+), 16 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..4d5a674564 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,17 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). In +this case we say the theme is part of a family of themes. You can +switch to another variant within a family using @kbd{M-x +theme-choose-variant}. If the currently active theme has only one +other variant, it will be selected; if there are more variants, the +command will prompt you which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..42ebd7b2d6 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -97,7 +97,9 @@ leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..07c34e944c 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -78,7 +78,9 @@ leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..fb5a1b29eb 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -30,7 +30,9 @@ (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..026718bf38 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -30,7 +30,9 @@ (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..ddd710a16e 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -20,7 +20,9 @@ ;;; Code: (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..724b081880 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -21,7 +21,9 @@ (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..f04241ca4d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,47 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to a variant. +Themes only have variants if they are part of a family of themes. +The current theme will be immediately disabled before variant is +enabled. In case the current theme has only one variant, it will +be toggled without prompting. For NO-CONFIRM and NO-ENABLE, see +`load-theme'." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car custom-enabled-themes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "`%s' is not part of a family" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable)))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 06:55: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 To: Philip Kaludercic Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166348404526101 (code B ref 57639); Sun, 18 Sep 2022 06:55:01 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 06:54:05 +0000 Received: from localhost ([127.0.0.1]:47635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZoBo-0006mv-FT for submit@debbugs.gnu.org; Sun, 18 Sep 2022 02:54:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZoBj-0006mF-RN for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 02:54:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZoBe-00071e-Au; Sun, 18 Sep 2022 02:53:54 -0400 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=Mh4BNZjBirPb7fgYipcxk8tOsZBqAEPhm4D66QbV3aA=; b=Pom7reXWD6J7 fFN3BIrD/zr+4KLQWEA39a+qKDYkzWoAHT16+K2zuDoR0rFCppL24yCXYlFL8xdkcJJzAIm7/nubH d9gAMujNpygrg9FoSgTSr2off3hsNDqlbqN0m2wj/UmY9h44toT5OmWARuL22HvF75AETZOxjMy7X 8pTAudUTLx0rrfMOY/8Y63keYKRwDlj0hVFByvAA/RK+meZysIxmfOYS9jALh6hbizcHvaw466Zsl dGwFhXwnwXHFez6eJIK8Zj+0YPLFZrw2SPTfITlxo2S/Jj7iXQkdaUvgdanyzfqqxK0E2Mxahify4 FCk1NyzTLjGMzsVlw/hRrA==; Received: from [87.69.77.57] (port=3867 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 1oZoBd-0003WJ-MG; Sun, 18 Sep 2022 02:53:54 -0400 Date: Sun, 18 Sep 2022 09:53:53 +0300 Message-Id: <83h715yxz2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <871qs9fzz5.fsf@posteo.net> (message from Philip Kaludercic on Sat, 17 Sep 2022 21:33:18 +0000) 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> X-Spam-Score: -2.3 (--) 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: Philip Kaludercic > Cc: larsi@gnus.org, 57639@debbugs.gnu.org > Date: Sat, 17 Sep 2022 21:33:18 +0000 > > >> + (let* ((theme (car custom-enabled-themes)) > >> + (family (plist-get (get theme 'theme-properties) :family))) > >> + (unless family > >> + (error "`%s' is not part of a family" theme)) > > > > "Family"? this terminology was never mentioned in the manual or the > > doc string. How about > > > > Theme `%s' does not have any variants > > > > instead? > > Strictly speaking that error message would be wrong at this point, > because we cannot say if a theme has no variants if it is not part of a > family. This is because variants of a theme are all those that are part > of the same family. I think it would be better to clarify this in the > documentation. But the documentation doesn't explain what it means for a theme to be part of a family. Specifically, how does one tell, by looking at a theme, whether it is or isn't part of a family? An alternative for what I suggested above is to say Theme `%s' does not have any known variants > +(defun theme-choose-variant (&optional no-confirm no-enable) > + "Prompt to switch from the current theme to a variant. ^^^^^^^^^^^^ "to one of its variants" is more clear. > +Themes only have variants if they are part of a family of themes. This should explain what it means to be part of a family, otherwise this sentence is not helpful. > +The current theme will be immediately disabled before variant is > +enabled. The "immediately" part should probably be removed, as it doesn't seem to convey anything of importance, does it? Come to think of it, what exactly does this sentence try to say? isn't it obvious that the current theme will be disabled and then the variant will be enabled? > In case the current theme has only one variant, it will > +be toggled without prompting. "toggled" is wrong here. I suggest If the current theme has only one variant, switch to that variant without prompting, otherwise prompt for the variant to select. > For NO-CONFIRM and NO-ENABLE, see > +`load-theme'." I suggest to say this the other way around: See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE. Thanks. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 09:39: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 To: Eli Zaretskii Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166349389610859 (code B ref 57639); Sun, 18 Sep 2022 09:39:01 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 09:38:16 +0000 Received: from localhost ([127.0.0.1]:47790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZqkh-0002p4-Jr for submit@debbugs.gnu.org; Sun, 18 Sep 2022 05:38:16 -0400 Received: from mout01.posteo.de ([185.67.36.65]:32931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZqke-0002on-7Z for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 05:38:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0FDFE240026 for <57639@debbugs.gnu.org>; Sun, 18 Sep 2022 11:38:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663493886; bh=Y5T2e7oo1+IVfkBjU9DOnkwIng89S63nt5+lX2wiXoA=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=myTxPUdl9DW2g0dts81ZA4RPkSNXQr4XOylSl+X/Ej1e94U0GN3RjrFddwVBuoSQg 1XmsnIWSYkpc/uivNWJ4DaGOjmzKelcoZaD3KqUkEkU94YG2mD3eOFpuU1lGxDBG0x lS9tVHb2RV4cdFkjnUVSEbl501kdJPhldTG+HwjpL+lp0x9xCUqrNzCjWLO/AYMaNK qKYFiLtVaQwdr9o3+AB4W9yS5WqxZebgRkOeTY7d1uueQ/P1l3QFvEiyLzXaxczIy3 9ho9+lzH//6wtajgMMiw1UNqb6jtpcJdZuDHDzKhFOQhSqz8e8rIZKP85LopjjQPQj W3hUw2HX2gEWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVjQz5yQbz9rxH; Sun, 18 Sep 2022 11:38:02 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83h715yxz2.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Sep 2022 09:53:53 +0300") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> 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 Date: Sun, 18 Sep 2022 09:38:02 +0000 Message-ID: <87h715dnut.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: larsi@gnus.org, 57639@debbugs.gnu.org >> Date: Sat, 17 Sep 2022 21:33:18 +0000 >> >> >> + (let* ((theme (car custom-enabled-themes)) >> >> + (family (plist-get (get theme 'theme-properties) :family))) >> >> + (unless family >> >> + (error "`%s' is not part of a family" theme)) >> > >> > "Family"? this terminology was never mentioned in the manual or the >> > doc string. How about >> > >> > Theme `%s' does not have any variants >> > >> > instead? >> >> Strictly speaking that error message would be wrong at this point, >> because we cannot say if a theme has no variants if it is not part of a >> family. This is because variants of a theme are all those that are part >> of the same family. I think it would be better to clarify this in the >> documentation. > > But the documentation doesn't explain what it means for a theme to be > part of a family. Specifically, how does one tell, by looking at a > theme, whether it is or isn't part of a family? > > An alternative for what I suggested above is to say > > Theme `%s' does not have any known variants I get what you mean... how about (error "Theme `%s' is not part of a family of variants" theme) ? >> +(defun theme-choose-variant (&optional no-confirm no-enable) >> + "Prompt to switch from the current theme to a variant. > ^^^^^^^^^^^^ > "to one of its variants" is more clear. Done. >> +Themes only have variants if they are part of a family of themes. > > This should explain what it means to be part of a family, otherwise > this sentence is not helpful. My intention was for this to be an explanation. The issue is that variants and family are mutually recursive concepts: - A variant of a theme are those which are part of the same family - A family of themes is the set of all variants of a theme. Perhaps it is just easier to collapse both concepts into either variant of family and just "expose" by documenting it. I've tried doing so below. >> +The current theme will be immediately disabled before variant is >> +enabled. > > The "immediately" part should probably be removed, as it doesn't seem > to convey anything of importance, does it? Come to think of it, what > exactly does this sentence try to say? isn't it obvious that the > current theme will be disabled and then the variant will be enabled? I guess it isn't necessary, the point was just to emphasise that nothing happens between disabling the previous theme and enabling the variant. There was something I had in mind when writing this initially, but I cannot recall it anymore. So I've removed it for now. >> In case the current theme has only one variant, it will >> +be toggled without prompting. > > "toggled" is wrong here. I suggest > > If the current theme has only one variant, switch to that variant > without prompting, otherwise prompt for the variant to select. Done. >> For NO-CONFIRM and NO-ENABLE, see >> +`load-theme'." > > I suggest to say this the other way around: > > See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE. Done. > Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From 4aa11070669c4b7c802d54d7dd7dffbd41a1a409 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. --- doc/emacs/custom.texi | 10 ++++++ doc/lispref/customize.texi | 5 +-- etc/themes/leuven-dark-theme.el | 6 ++-- etc/themes/leuven-theme.el | 6 ++-- etc/themes/tango-dark-theme.el | 4 ++- etc/themes/tango-theme.el | 4 ++- etc/themes/tsdh-dark-theme.el | 4 ++- etc/themes/tsdh-light-theme.el | 4 ++- lisp/custom.el | 61 +++++++++++++++++++++++++++++---- 9 files changed, 88 insertions(+), 16 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..42ebd7b2d6 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -97,7 +97,9 @@ leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..07c34e944c 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -78,7 +78,9 @@ leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..fb5a1b29eb 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -30,7 +30,9 @@ (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..026718bf38 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -30,7 +30,9 @@ (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..ddd710a16e 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -20,7 +20,9 @@ ;;; Code: (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..724b081880 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -21,7 +21,9 @@ (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..5a3d3b95e2 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,46 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to one of its a variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car custom-enabled-themes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable)))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 10:40: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166349757817650 (code B ref 57639); Sun, 18 Sep 2022 10:40:02 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 10:39:38 +0000 Received: from localhost ([127.0.0.1]:47896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZri6-0004ac-GF for submit@debbugs.gnu.org; Sun, 18 Sep 2022 06:39:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZri4-0004aP-M7 for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 06:39:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6mrr7w1UFOLJemg5hU9Xds8mNI0RzB+I1mVCrnx8Emg=; b=bFqMlURC8bbsQ8AAiJbHUsUjXj iQ0xwlTLuhBuxLAJsbw9TmbGyJOl4bqM9oryQ32V4Yb84heawcjJkGV3X+avFtUk8d5+JyJAU/20q GGKZNafVvX3+q/QSy7t/KtI4qevz3UDaCBSdbYOT/WAjj0/xgBNwIN1MIuk/DD6cVnc8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZrhv-0006ox-Gf; Sun, 18 Sep 2022 12:39:29 +0200 From: Lars Ingebrigtsen In-Reply-To: <87h715dnut.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 18 Sep 2022 09:38:02 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUpJykfHB1+gIG0 ydGuubtOTVL///+yPxuZAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YJEgoJFD1GRbgAAAGpSURBVDjL bZNhkoMgDIVJd/kPzngBZC8gnAA4AGvN/a+yIQTFzjotVr6+9wJEpf67YIvK8q/6nL/Bh8C+ozJP AiwAAtbM84ZdLVvZKcIqbKMAq4YIdOV5C5mBHTEaVX9eQwemW8HBd3peBgAzAZiAWCGK9Cvs3ZNC KWfFUd0mCtJoZeAgBcVDvQF5aTA/BEiL7gYcUJXmm3M1xwm0RXAByWMIfUvMtPX6VZLPYdpELd+z 7KUBGKD2YXU+MaATgOalRaaTc11hJyu6XgRymIFcL+dcaIBLMmPbK5zkxOASYK0EFIGNwVVt21oa HGc3q94ZCmlS6Z/DcXa3MsD2DR8NSEY7QF4aCRQ+gORgO44jXVZXk+BBmjM5H2n+AZBBaU6lZ1xr qXg6zxGiGCuvuDkfwhU+Wp5A8SXnu1y4GotOr82H1K2gH5fG185ORcAoTNeDQMxU2N273FuoYzPi E+T/g7FiJiDuo0WlWZYOSpQMIwf8+9651lsxXoWcAlc7XrUB1uyoVPrkW2Fbf63ZM7iqsrJjS/Qc 8QSEFlpfblYfAL5T39tPYLcb/AENp3EfHoqI2QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOS0x OFQxMDowOToyMCswMDowMCsFq2IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDktMThUMTA6MDk6 MjArMDA6MDBaWBPeAAAAAElFTkSuQmCC X-Now-Playing: Stephan Mathieu's _Radiance (12): Pacific_: "Pacific" Date: Sun, 18 Sep 2022 12:39:27 +0200 Message-ID: <87edw955ls.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > Subject: [PATCH] Tag themes with properties Thanks; looks good to me. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Subject: [PATCH] Tag themes with properties Thanks; looks good to me. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 11:40: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166350119225858 (code B ref 57639); Sun, 18 Sep 2022 11:40:01 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 11:39:52 +0000 Received: from localhost ([127.0.0.1]:48130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZseN-0006j0-NC for submit@debbugs.gnu.org; Sun, 18 Sep 2022 07:39:52 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZseK-0006ik-2x for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 07:39:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8F619240101 for <57639@debbugs.gnu.org>; Sun, 18 Sep 2022 13:39:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663501182; bh=V8tRqqwSjV0lhtx2h4M0jDceu/YA2yglUcI1Lygwx0c=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=op4EOtIBmAJ5JYfaXn73rrcyBe8B0YxQhm4qf6UUIbvuhRuH6W/5qvLdkg2Bl1cug VLnzf0+Up5jIVWcsB718HZNNe7rxQtKqcN7SVkB2pVVraSSeV0tzO515ZgFXlZwGnK I2gwA+mkuqNznULxr0AANTj9Qgiu4yQ/e97KtWdwAXZLG9Au/exBZ8T3TFlfazvjKe J5OrAk26hjhhxRbeMivnHMmKQwqq/IX//Qhy0vxqGmHBJzzR+7QCcBhEhfHbNMu4d9 a/dGk6Uie+Xa+I8NF8+yXQfcHRCcfauMPIr/9/pKEePErr4byUxmG6roUWzUGnu4sS Y70l/duLRN1mw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVm7J5ytFz9rxF; Sun, 18 Sep 2022 13:39:40 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87edw955ls.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 18 Sep 2022 12:39:27 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> 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 Date: Sun, 18 Sep 2022 11:39:39 +0000 Message-ID: <8735coewsk.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Subject: [PATCH] Tag themes with properties > > Thanks; looks good to me. One last additional, I've added a property to all the themes indicating that they are colour schemes. This would make it easier to toggle between dark and light modes if multiple themes are enabled of which only one is a colour theme: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From 62c55cc27024348e43ae4591c3d239d705f8ad1b Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. (Bug#57639) --- doc/emacs/custom.texi | 10 +++++ doc/lispref/customize.texi | 5 ++- etc/themes/adwaita-theme.el | 4 +- etc/themes/deeper-blue-theme.el | 4 +- etc/themes/dichromacy-theme.el | 4 +- etc/themes/leuven-dark-theme.el | 6 ++- etc/themes/leuven-theme.el | 6 ++- etc/themes/light-blue-theme.el | 4 +- etc/themes/manoj-dark-theme.el | 4 +- etc/themes/misterioso-theme.el | 4 +- etc/themes/tango-dark-theme.el | 5 ++- etc/themes/tango-theme.el | 5 ++- etc/themes/tsdh-dark-theme.el | 5 ++- etc/themes/tsdh-light-theme.el | 5 ++- etc/themes/wheatgrass-theme.el | 4 +- etc/themes/whiteboard-theme.el | 4 +- etc/themes/wombat-theme.el | 4 +- lisp/custom.el | 70 ++++++++++++++++++++++++++++++--- 18 files changed, 128 insertions(+), 25 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el index ba83a0578c..6ac7d8f316 100644 --- a/etc/themes/adwaita-theme.el +++ b/etc/themes/adwaita-theme.el @@ -24,7 +24,9 @@ (deftheme adwaita "Face colors similar to the default theme of Gnome 3 (Adwaita). The colors are chosen to match Adwaita window decorations and the -default look of the Gnome 3 desktop.") +default look of the Gnome 3 desktop." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el index 8f19147f91..db3b9b5b60 100644 --- a/etc/themes/deeper-blue-theme.el +++ b/etc/themes/deeper-blue-theme.el @@ -22,7 +22,9 @@ ;;; Code: (deftheme deeper-blue - "Face colors using a deep blue background.") + "Face colors using a deep blue background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el index d53c075d92..d2c5983862 100644 --- a/etc/themes/dichromacy-theme.el +++ b/etc/themes/dichromacy-theme.el @@ -28,7 +28,9 @@ dichromacy differentiated by individuals with protanopia or deuteranopia. Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and -Ansi-Color faces are included.") +Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) (orange "#e69f00") diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..42ebd7b2d6 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -97,7 +97,9 @@ leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..07c34e944c 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220917.2332 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -78,7 +78,9 @@ leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el index eeca46210c..449600d01d 100644 --- a/etc/themes/light-blue-theme.el +++ b/etc/themes/light-blue-theme.el @@ -27,7 +27,9 @@ ;;; Code: (deftheme light-blue - "Face colors utilizing a light blue background.") + "Face colors utilizing a light blue background." + :background-mode 'light + :kind 'color-scheme) (make-obsolete 'light-blue nil "29.1") diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index af5576386c..402aafe49d 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -67,7 +67,9 @@ (deftheme manoj-dark "Very high contrast faces with a black background. This theme avoids subtle color variations, while avoiding the -jarring angry fruit salad look to reduce eye fatigue.") +jarring angry fruit salad look to reduce eye fatigue." + :background-mode 'dark + :kind 'color-scheme) (custom-theme-set-faces 'manoj-dark diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el index 55186384ad..7e3f0289f1 100644 --- a/etc/themes/misterioso-theme.el +++ b/etc/themes/misterioso-theme.el @@ -22,7 +22,9 @@ ;;; Code: (deftheme misterioso - "Predominantly blue/cyan faces on a dark cyan background.") + "Predominantly blue/cyan faces on a dark cyan background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..73a928e445 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -30,7 +30,10 @@ (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :kind 'color-scheme + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..8b8011bd1f 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -30,7 +30,10 @@ (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..2a2507f147 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -20,7 +20,10 @@ ;;; Code: (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..130b2a33d4 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -21,7 +21,10 @@ (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el index c56c8a2d8a..5b4370351f 100644 --- a/etc/themes/wheatgrass-theme.el +++ b/etc/themes/wheatgrass-theme.el @@ -23,7 +23,9 @@ wheatgrass "High-contrast green/blue/brown faces on a black background. Basic, Font Lock, Isearch, Gnus, and Message faces are included. The default face foreground is wheat, with other faces in shades -of green, brown, and blue.") +of green, brown, and blue." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el index f21b18b421..676e0e0f70 100644 --- a/etc/themes/whiteboard-theme.el +++ b/etc/themes/whiteboard-theme.el @@ -22,7 +22,9 @@ ;;; Code: (deftheme whiteboard - "Face colors similar to markers on a whiteboard.") + "Face colors similar to markers on a whiteboard." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el index d9fab8ac78..4eef29841b 100644 --- a/etc/themes/wombat-theme.el +++ b/etc/themes/wombat-theme.el @@ -25,7 +25,9 @@ wombat "Medium-contrast faces with a dark gray background. Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces -are included.") +are included." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..3b36544d9d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,55 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to one of its a variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (let ((active-color-schemes + (seq-filter + (lambda (theme) + ;; FIXME: As most themes currently do not have a `:kind' + ;; tag, it is assumed that a theme is a color scheme by + ;; default. This should be reconsidered in the future. + (memq (plist-get (get theme 'theme-properties) :kind) + '(color-scheme nil))) + custom-enabled-themes))) + (cond + ((length= active-color-schemes 0) + (user-error "No theme is active, cannot toggle")) + ((length> active-color-schemes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car active-color-schemes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable))))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-= Content-Type: text/plain Also, the issue I mentioned previously remains. The properties are only noticed if the theme file is loaded. So if you enabled `leuven-dark', you won't be able to toggle before `leuven' is loaded at least once. --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 12:53: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 To: Philip Kaludercic Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16635055582209 (code B ref 57639); Sun, 18 Sep 2022 12:53:02 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 12:52:38 +0000 Received: from localhost ([127.0.0.1]:48311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtmo-0000ZZ-2f for submit@debbugs.gnu.org; Sun, 18 Sep 2022 08:52:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtmk-0000ZG-7H for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 08:52:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZtme-0003U5-Ti; Sun, 18 Sep 2022 08:52:28 -0400 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=9VDhEXmX0QJxmagumbiKQcJkhGtEII4DTp+Tz0COfGc=; b=KF+H+nqmUOT0 YiTWWy97aRoWnFjNEcYBSmrpehCUgLCO+SscnC1Rle3pey/dIzr/xcVgPOiFciYSs2M7bloSPWC24 zLgY0DWwCeVGGX4prfWkhDyEt9jew0PrvFQh/hng8+dxUgJeh3muQXQXTjj5djucavgqME9hKCsP5 rhvSrs0ebm3TK/1v+ZmbHN4OImdqoHPC6zBxilOksTCGWomqiW+wHJdbjg+j86bclSz4wsj1bpRNX Kf9ETGeBESdf/samLRlp1GT6EBTmVckL/Jdbe7oEYu8mpQbkLZSg3yh65tWGYLItFvtoyqHkt4wp7 Cg3MuydX8lCUSLV4tZdVRQ==; Received: from [87.69.77.57] (port=1986 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 1oZtme-0001ig-Cd; Sun, 18 Sep 2022 08:52:28 -0400 Date: Sun, 18 Sep 2022 15:52:27 +0300 Message-Id: <83a66wzvxw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87h715dnut.fsf@posteo.net> (message from Philip Kaludercic on Sun, 18 Sep 2022 09:38:02 +0000) 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> X-Spam-Score: -2.3 (--) 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: Philip Kaludercic > Cc: larsi@gnus.org, 57639@debbugs.gnu.org > Date: Sun, 18 Sep 2022 09:38:02 +0000 > > >> >> + (let* ((theme (car custom-enabled-themes)) > >> >> + (family (plist-get (get theme 'theme-properties) :family))) > >> >> + (unless family > >> >> + (error "`%s' is not part of a family" theme)) > >> > > >> > "Family"? this terminology was never mentioned in the manual or the > >> > doc string. How about > >> > > >> > Theme `%s' does not have any variants > >> > > >> > instead? > >> > >> Strictly speaking that error message would be wrong at this point, > >> because we cannot say if a theme has no variants if it is not part of a > >> family. This is because variants of a theme are all those that are part > >> of the same family. I think it would be better to clarify this in the > >> documentation. > > > > But the documentation doesn't explain what it means for a theme to be > > part of a family. Specifically, how does one tell, by looking at a > > theme, whether it is or isn't part of a family? > > > > An alternative for what I suggested above is to say > > > > Theme `%s' does not have any known variants > > I get what you mean... how about > > (error "Theme `%s' is not part of a family of variants" theme) > > ? Theme `%s' is not part of a family of theme variants > >> +Themes only have variants if they are part of a family of themes. > > > > This should explain what it means to be part of a family, otherwise > > this sentence is not helpful. > > My intention was for this to be an explanation. The issue is that > variants and family are mutually recursive concepts: > > - A variant of a theme are those which are part of the same family > - A family of themes is the set of all variants of a theme. > > Perhaps it is just easier to collapse both concepts into either variant > of family and just "expose" by documenting it. I've tried doing so > below. Here's an attempt to explain what is a "family", in case it can still be of interest: A @dfn{family} of themes is a set of similar themes that differ by minor aspects, such as face colors that are meant for the light vs dark background of the frame. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 12:57: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 To: Eli Zaretskii Cc: larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16635058002688 (code B ref 57639); Sun, 18 Sep 2022 12:57:01 +0000 Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 12:56:40 +0000 Received: from localhost ([127.0.0.1]:48329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtqi-0000hH-9o for submit@debbugs.gnu.org; Sun, 18 Sep 2022 08:56:40 -0400 Received: from mout01.posteo.de ([185.67.36.65]:42305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtqg-0000h3-Qp for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 08:56:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1B694240026 for <57639@debbugs.gnu.org>; Sun, 18 Sep 2022 14:56:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663505793; bh=bRT4H+VdldrUQzDjBD02nP+FLAQUdwQ/RLlhV9dmles=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=mpNFbWWdDAbRVYnIyHKI093EOSimAV0k+TiOhKJJ3nykr1s4staVA0kZYiEj7h4S1 JARoUBVPyK+EaXAECC3adGnQ1inmhCbUhVr51o1a1lQz9GF96MZBXNgHwe7RZbo2qN fcMD2zRM7ms9Mxmj8bf5FGKp+Sajhq2qpbDPExOdkDWG6aPb/IvTqM1Tocq823o6z0 9S6+uR1L3tjQEeH1otU3h0SEXNjB1LXo+L69Z/3W1QfaIIXZHxiV1C4o3P2d1S6sj2 TYZXxQ35ZNgKDVXoBx+CbQYf9r43aVNvhrgU6xZFVZH81xa4ChsBE2RFrRWAsA8yMJ 45k+yEeeFXqcA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVnr017hpz9rxH; Sun, 18 Sep 2022 14:56:31 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83a66wzvxw.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Sep 2022 15:52:27 +0300") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> 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 Date: Sun, 18 Sep 2022 12:56:30 +0000 Message-ID: <87illk4z9d.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: larsi@gnus.org, 57639@debbugs.gnu.org >> Date: Sun, 18 Sep 2022 09:38:02 +0000 >> >> >> >> + (let* ((theme (car custom-enabled-themes)) >> >> >> + (family (plist-get (get theme 'theme-properties) :family))) >> >> >> + (unless family >> >> >> + (error "`%s' is not part of a family" theme)) >> >> > >> >> > "Family"? this terminology was never mentioned in the manual or the >> >> > doc string. How about >> >> > >> >> > Theme `%s' does not have any variants >> >> > >> >> > instead? >> >> >> >> Strictly speaking that error message would be wrong at this point, >> >> because we cannot say if a theme has no variants if it is not part of a >> >> family. This is because variants of a theme are all those that are part >> >> of the same family. I think it would be better to clarify this in the >> >> documentation. >> > >> > But the documentation doesn't explain what it means for a theme to be >> > part of a family. Specifically, how does one tell, by looking at a >> > theme, whether it is or isn't part of a family? >> > >> > An alternative for what I suggested above is to say >> > >> > Theme `%s' does not have any known variants >> >> I get what you mean... how about >> >> (error "Theme `%s' is not part of a family of variants" theme) >> >> ? > > Theme `%s' is not part of a family of theme variants > >> >> +Themes only have variants if they are part of a family of themes. >> > >> > This should explain what it means to be part of a family, otherwise >> > this sentence is not helpful. >> >> My intention was for this to be an explanation. The issue is that >> variants and family are mutually recursive concepts: >> >> - A variant of a theme are those which are part of the same family >> - A family of themes is the set of all variants of a theme. >> >> Perhaps it is just easier to collapse both concepts into either variant >> of family and just "expose" by documenting it. I've tried doing so >> below. > > Here's an attempt to explain what is a "family", in case it can still > be of interest: > > A @dfn{family} of themes is a set of similar themes that differ by > minor aspects, such as face colors that are meant for the light vs > dark background of the frame. I personally think it is better to omit this for now. Perhaps this can be mentioned if or when the theme tags are formalised. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 07:59: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166357430729415 (code B ref 57639); Mon, 19 Sep 2022 07:59:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Sep 2022 07:58:27 +0000 Received: from localhost ([127.0.0.1]:52214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBff-0007eN-GG for submit@debbugs.gnu.org; Mon, 19 Sep 2022 03:58:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBfd-0007eA-L8 for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 03:58:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZXAKqE/RPGaUVfCdzkaoVFOLOMHXt/gUaoKr8BkDkx0=; b=UioqkDfenrLraFtUDXkzDjJI8p vUfoI9EZFvC8k55wkkYCcuADInZqoeq/Hk7/KwGw9oPkplC0q+4+yJA59bGYBbvVmWQnJfIKbjZny o4tfmtXjYUlMPQb9Bz7xFjIabjNdNCK0Rxy98PG0bDj33OjS2rrM+F3adFMXrElgk5+Q=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaBfU-0006va-FO; Mon, 19 Sep 2022 09:58:18 +0200 From: Lars Ingebrigtsen In-Reply-To: <8735coewsk.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 18 Sep 2022 11:39:39 +0000") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEXu7u3Y0NfGoK/P NkTdV2e3rsuZeYdLOkUTBw9kV14nEhlLJio2IiosGiP////Zf5E1AAAAAWJLR0QOb70wTwAAAAd0 SU1FB+YJEwcsIERlldwAAAGOSURBVDjLrdK9TsJQFAfwYuJOE0kMkcHi4iq+AKUvwEA0xBV4Az4S WeV4oaNCBRcXLhe7Yk2ZhVSZ+xH6LrYF1J7WxMH/eH+959xzeznuKzz330nyPJ8Mr2Rzu5xtlxKC kD+RxKzkJ3cuSTvYE0VRkIRsTioUQju2OZB2yf/xPIlU9ZjfJAz7NbgpBSkiOJ0+xUPfaFXiIKUs G9/wY/pU8aESX6o0qsSXKtUqA9tbr96F4aLfrw5pS2nDbRjKzKR2GwAIgittDJN5DJTpmKrUA1zq EkyHAIlC2V3QWDj6WPt1SBRc1weg0R0r73tCZQwZdwlkOKXgIDhULZnN3y2QEaQpdHVdN2J6LLtz XVcdhnuoBmGMMAtDmvjDgRPZkWZTzYOXXhTWj8DgTXUjwEYe2E0jCg2v1HNzjU/F4BpkCosOBkJW /t3OiMmF3lWGBceFWdPGpZh35xQmA9wcZOIPYtcioAalVKWDwSLBr62bGOgGXhuoOQSPCmCi/ALd ezygBsw3gqGnseBhkTrHfQIpVOojvKi+iAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOS0xOVQw Nzo0NDozMiswMDowMHsDNFgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDktMTlUMDc6NDQ6MzIr MDA6MDAKXozkAAAAAElFTkSuQmCC X-Now-Playing: Anne Clark's _Hopeless Cases_: "Cane Hill" Date: Mon, 19 Sep 2022 09:58:13 +0200 Message-ID: <871qs7ztgq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > One last additional, I've added a property to all the themes indicating > that they are colour schemes. This would make it easier to toggle > between dark and light modes if multiple themes are enab [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > One last additional, I've added a property to all the themes indicating > that they are colour schemes. This would make it easier to toggle > between dark and light modes if multiple themes are enabled of which > only one is a colour theme: Makes sense. One thing that occurred to me now that I didn't think of before is: > (deftheme adwaita > "Face colors similar to the default theme of Gnome 3 (Adwaita). > The colors are chosen to match Adwaita window decorations and the > -default look of the Gnome 3 desktop.") > +default look of the Gnome 3 desktop." > + :background-mode 'light > + :kind 'color-scheme) Is this backwards compatible, and is that something we need to care about? I know that some (many?) themes are also distributed outside of Emacs, and should work under a range of Emacs versions. I don't think extending `deftheme' in this way would be backwards compatible, though, even if it makes sense from a language design point of view. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 08:06: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166357473230212 (code B ref 57639); Mon, 19 Sep 2022 08:06:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Sep 2022 08:05:32 +0000 Received: from localhost ([127.0.0.1]:52241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBmV-0007rE-Te for submit@debbugs.gnu.org; Mon, 19 Sep 2022 04:05:32 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBmU-0007r0-AE for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 04:05:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C828E240028 for <57639@debbugs.gnu.org>; Mon, 19 Sep 2022 10:05:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663574724; bh=/zHbwRDV6ndLvJcSJF/lM2fh38wLR9xF8AyHlNhLIkk=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=dfJRREhJxIlaojbSqV11YeGvva6TEUD/98qdNL89xp9JxEx1+M+B/jN5l7B4Tc5K+ CnnrfHhY2kPlBEwSqNrlLc3J6iGgHzNDVPguy1XP75kQ27V7af9jE/kENP+hZscAX6 uZ9cON4VHW0yQURcRBDxGDjTDCX5uxjx5K8ry8U/6bYlgOrKazGNeUYJmqdUVObl92 q+e1ELdZB2cCsCcPva/qdDiRHtIy8Aw83v/39PgKDKFDu2vxq/HgksUCllsc9WE8uE Ru12PRvneImfZ+bPkXK2FN0hKYJtbIT+ea6TXzZeNtXUASa6lMYz2sd0avDGcQadIW LQRpPoNxMENsA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MWHKc1q2sz9rxT; Mon, 19 Sep 2022 10:05:24 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qs7ztgq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Sep 2022 09:58:13 +0200") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> 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 Date: Mon, 19 Sep 2022 08:05:23 +0000 Message-ID: <87o7vbg56k.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> One last additional, I've added a property to all the themes indicating >> that they are colour schemes. This would make it easier to toggle >> between dark and light modes if multiple themes are enabled of which >> only one is a colour theme: > > Makes sense. One thing that occurred to me now that I didn't think of > before is: > >> (deftheme adwaita >> "Face colors similar to the default theme of Gnome 3 (Adwaita). >> The colors are chosen to match Adwaita window decorations and the >> -default look of the Gnome 3 desktop.") >> +default look of the Gnome 3 desktop." >> + :background-mode 'light >> + :kind 'color-scheme) > > Is this backwards compatible, and is that something we need to care > about? I know that some (many?) themes are also distributed outside of > Emacs, and should work under a range of Emacs versions. I don't think > extending `deftheme' in this way would be backwards compatible, though, > even if it makes sense from a language design point of view. I don't think so, but if a theme were concerned about this, all they need to do is (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) As that is all the macro does. As I said, we could do this too and add a autoload-cookie before it to solve the visibility issue, but it doesn't look that nice... Can (deftheme)s be autoloaded? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 08:16: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166357532331226 (code B ref 57639); Mon, 19 Sep 2022 08:16:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Sep 2022 08:15:23 +0000 Received: from localhost ([127.0.0.1]:52269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBw2-00087a-MF for submit@debbugs.gnu.org; Mon, 19 Sep 2022 04:15:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBw0-00087L-Rk for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 04:15:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eUHuNFIWOdw4FeF5LQ09nbzr4mqkK61g/FJ36dwebY8=; b=ol5VTbTvZKVZBobBGmWzMBaRYa 9IEaR+bYf98e0QipTF1cdaLPEVuMAWdPmcPKmi34BUZ6x/Uh3I9hUD4S2oSk28nvbOZoo1cp2KL0r etSmKuB/EANenTOFGR1+n70fro29+3StNhembpQRucJ9HG9LzMf6N7Vzoyay0/cmC/VU=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaBvs-00076R-Ba; Mon, 19 Sep 2022 10:15:14 +0200 From: Lars Ingebrigtsen In-Reply-To: <87o7vbg56k.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 19 Sep 2022 08:05:23 +0000") References: <875yhzmz25.fsf@posteo.net> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEXu7u3Y0NfGoK/P NkTdV2e3rsuZeYdLOkUTBw9kV14nEhlLJio2IiosGiP////Zf5E1AAAAAWJLR0QOb70wTwAAAAd0 SU1FB+YJEwcsIERlldwAAAGOSURBVDjLrdK9TsJQFAfwYuJOE0kMkcHi4iq+AKUvwEA0xBV4Az4S WeV4oaNCBRcXLhe7Yk2ZhVSZ+xH6LrYF1J7WxMH/eH+959xzeznuKzz330nyPJ8Mr2Rzu5xtlxKC kD+RxKzkJ3cuSTvYE0VRkIRsTioUQju2OZB2yf/xPIlU9ZjfJAz7NbgpBSkiOJ0+xUPfaFXiIKUs G9/wY/pU8aESX6o0qsSXKtUqA9tbr96F4aLfrw5pS2nDbRjKzKR2GwAIgittDJN5DJTpmKrUA1zq EkyHAIlC2V3QWDj6WPt1SBRc1weg0R0r73tCZQwZdwlkOKXgIDhULZnN3y2QEaQpdHVdN2J6LLtz XVcdhnuoBmGMMAtDmvjDgRPZkWZTzYOXXhTWj8DgTXUjwEYe2E0jCg2v1HNzjU/F4BpkCosOBkJW /t3OiMmF3lWGBceFWdPGpZh35xQmA9wcZOIPYtcioAalVKWDwSLBr62bGOgGXhuoOQSPCmCi/ALd ezygBsw3gqGnseBhkTrHfQIpVOojvKi+iAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOS0xOVQw Nzo0NDozMiswMDowMHsDNFgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDktMTlUMDc6NDQ6MzIr MDA6MDAKXozkAAAAAElFTkSuQmCC X-Now-Playing: Anne Clark's _Hopeless Cases_: "Leaving" Date: Mon, 19 Sep 2022 10:15:10 +0200 Message-ID: <874jx3ye41.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > I don't think so, but if a theme were concerned about this, all they > need to do is > > (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) > > As that is all the macro [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > I don't think so, but if a theme were concerned about this, all they > need to do is > > (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) > > As that is all the macro does. Ah, then that's fine -- feel free to push when you're ready. > As I said, we could do this too and add > a autoload-cookie before it to solve the visibility issue, but it > doesn't look that nice... Can (deftheme)s be autoloaded? Hm... well, anything can be put into the loaddefs.el file, really, so yes, but I'm not sure we want to... From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 10:14: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166358243828819 (code B ref 57639); Mon, 19 Sep 2022 10:14:01 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Sep 2022 10:13:58 +0000 Received: from localhost ([127.0.0.1]:52490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaDmo-0007Uj-0E for submit@debbugs.gnu.org; Mon, 19 Sep 2022 06:13:58 -0400 Received: from mout02.posteo.de ([185.67.36.66]:39795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaDmj-0007US-7f for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 06:13:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B4594240104 for <57639@debbugs.gnu.org>; Mon, 19 Sep 2022 12:13:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663582427; bh=R1XSn58h92RSp80KVvdwkgtt+3YQsTAy9hks2Kzbrnc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=r64zxhfe54qW9io3pAU+VHdoV1/zLQ1ENGclUbPT6CMuFAP3uvIddp2LkWfNbnCW2 6WMyod3Y25jLd2wqA5wV4tZfg00LP/M1GGy52A6ZlEqsaVLl4uYn8QIlg6JhsglWvG MkAWAteswr1XTxXb4g+uG2+8zqvFZ5XsN3KXkViFeUiGnzBQeZcis1iPTGEWArDBBj r3AOmqQ4DNvROLSBsDKggayqX5bZNBR564Epms63h+UcJOf5wRd/L1Q2Uk55OsE9fb CAJ0zRD6FXjwj+n4sambmElrvM/yOnajdI25UKHdb/dcTzMpoDlm28SDFsZnmWFYLk jeRS5bkCdXPQg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MWL9k6dF7z9rxV; Mon, 19 Sep 2022 12:13:46 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <874jx3ye41.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Sep 2022 10:15:10 +0200") References: <875yhzmz25.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> 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 Date: Mon, 19 Sep 2022 10:13:46 +0000 Message-ID: <87bkrbfz8l.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> I don't think so, but if a theme were concerned about this, all they >> need to do is >> >> (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) >> >> As that is all the macro does. > > Ah, then that's fine -- feel free to push when you're ready. > >> As I said, we could do this too and add >> a autoload-cookie before it to solve the visibility issue, but it >> doesn't look that nice... Can (deftheme)s be autoloaded? > > Hm... well, anything can be put into the loaddefs.el file, really, so > yes, but I'm not sure we want to... I think I'll modify the patch for now and pull out the properties via `put' calls, and maybe someone will think of a better solution later on. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: Toggling, in general Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 03:41: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 To: Philip Kaludercic Cc: eliz@gnu.org, larsi@gnus.org, 57639@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166364524725524 (code B ref 57639); Tue, 20 Sep 2022 03:41:02 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 03:40:47 +0000 Received: from localhost ([127.0.0.1]:55735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaU7q-0006db-NK for submit@debbugs.gnu.org; Mon, 19 Sep 2022 23:40:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaU7o-0006dO-Qu for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 23:40:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaU7i-0007U7-In; Mon, 19 Sep 2022 23:40:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=htiptx6J1A2OaR9h4b1TP+4dIyS46OC3hTRAJWYLcIE=; b=IR90nPbtQg4O L3ul7CBm3+TMDeZF0bbbzZsVGtzeio+1w8AEAnQ3IkUlsTR+ndmDD6tHdfdGMV3KZytQci+aFyHdN HxpqFtEDUHwgOspRhY6CwlFvKuP/c4X9dfD+preHJQB5eJlQFJoNpFyo3Qirt2IafNC++Hyk7xqq2 erUEY9rwW4wXIBAUlI5ReG6ZMOWmDYMHa4E1fWxumXEFFJ27+HrnvpG9KUQfRzymZXxcje10Co99j yhoc7jhoKkEG8HAYBxuryT2gAclnCTZWal+HWCzzAOe9QxmQyIaXBEUC9X0glwzgz/FAnwvO01rtN H0vthiHPI0xhUbu2HuSY3w==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1oaU7d-00046H-De; Mon, 19 Sep 2022 23:40:33 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: <87illk4z9d.fsf@posteo.net> (message from Philip Kaludercic on Sun, 18 Sep 2022 12:56:30 +0000) 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> <87illk4z9d.fsf@posteo.net> Message-Id: Date: Mon, 19 Sep 2022 23:40:33 -0400 X-Spam-Score: -2.3 (--) 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 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Is anyone investigating the idea of a more general UI facility for toggling various kinds of settings? This oculd be a prefix key. Or we might be able to do this more deeply, and implement toggling various kinds of settings with one Liep command. Either way, it would do many jobs and not require users to remember may different commands. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: Toggling, in general Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 08:08: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 To: Richard Stallman Cc: eliz@gnu.org, larsi@gnus.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16636612314313 (code B ref 57639); Tue, 20 Sep 2022 08:08:02 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 08:07:11 +0000 Received: from localhost ([127.0.0.1]:56025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaYHe-00017V-Pr for submit@debbugs.gnu.org; Tue, 20 Sep 2022 04:07:11 -0400 Received: from mout01.posteo.de ([185.67.36.65]:41137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaYHc-00017G-HD for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 04:07:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C481E240028 for <57639@debbugs.gnu.org>; Tue, 20 Sep 2022 10:07:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663661222; bh=Z8xBA0d+mdh9E6qL0FouHvc7BpP9N+wy1hbLVqTnQKE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=XyVao7TLAHPHaoWVmTcYUK8DzZoGzerbZ6lPv4f72saCT9uZAt9D2uhyiKExUwA9l b4PzMwbJul/h7MKyBFUZ9aG7zieKz6n+3kVvAK2BfH74IKnfAi34/gqNTyUdohLGNq djZKP1deFTNmT/qb7zb+26qaWZg/csyxpX+ayxpCIZTffiGgONsLTJxPeD6TrCj7H8 Rdp2BI6MNqVi+zBleqWV+MMmTRNiFPnRMObYnJJ8oZyWU13O+Txnjmoyj1Y0dWAH44 3ieFPAMZ87hvinma1waWrOcj9IZO5EDq4EIJJZSIjvAQiTa5BTKe7T8Wte5rc6dm0P /mFqb7A5csUZg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MWvK06lk5z6tnD; Tue, 20 Sep 2022 10:07:00 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Richard Stallman's message of "Mon, 19 Sep 2022 23:40:33 -0400") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> <87illk4z9d.fsf@posteo.net> 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 Date: Tue, 20 Sep 2022 08:07:00 +0000 Message-ID: <87o7vacvvf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Is anyone investigating the idea of a more general UI facility > for toggling various kinds of settings? > > This oculd be a prefix key. Or we might be able to do this more > deeply, and implement toggling various kinds of settings with one Liep > command. > > Either way, it would do many jobs and not require users to remember > may different commands. What kind of things are you thinking about? Things like the menu bar, tool bar, etc. are already toggled using minor modes. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: Toggling, in general Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 12:21:03 +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 To: Richard Stallman Cc: larsi@gnus.org, Philip Kaludercic , eliz@gnu.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166367644432176 (code B ref 57639); Tue, 20 Sep 2022 12:21:03 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 12:20:44 +0000 Received: from localhost ([127.0.0.1]:56466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oacF1-0008Mu-Ur for submit@debbugs.gnu.org; Tue, 20 Sep 2022 08:20:44 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:44639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oacEw-0008Md-0C for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 08:20:42 -0400 Received: by mail-pj1-f68.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so2272707pjh.3 for <57639@debbugs.gnu.org>; Tue, 20 Sep 2022 05:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=mYo33MGrJRMJAsfkA9Na8qk70IyEc2ah5xgrQP1+/00=; b=HrtneCaR5MmnmdMJ5WGGbLuuIIO6a9dexm8PCkjYK14cdiN+AfD6S4o1C2zufD5jOM bAl16Vp/2f7HroBKkMTCqm7BqvnFAMpry1Btht/yI8gWh6xG2CbM/flLR+0GR/Ox+NYy LnrC+rltHHKYwvGl5prszYNU+7NahWZjAax8vWUQnNemAnWzKj0Y1kXYNxMXaTPDWvrT qpoxUwRvjv45U5KBFAJ/6p2cf4JPOCjaFZgFWl9eSFyoSyoxQ0iQ8MUgSmBGQeq11UPr hBbtCjbiipSpHVosjl27pMBIRYEW+vd/IVLvksvYQOsLTUEp+2/eTs17HIhSAGO7TvBg L5sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=mYo33MGrJRMJAsfkA9Na8qk70IyEc2ah5xgrQP1+/00=; b=K/GOb5NFtumAJo1u+GtXTJAgcFbVsAlba+v5/5acEn2PU2GYC8+1sLkRO2OHb6ADEP gL9EcLoOYxp7yd/tYX0+D00PFZkh7SEH6IvC190GOpCQEugF3ozyR3evTZ6fpj6xtqR3 uthCeY8xkeV6fcizv0gNQVurHhw5oILWDKc+M0giPnK5qFRDu0VH34+lsbXas3pgqsHM MM7+ZVOo3j/jZEAlrgiXDJMJAud5MasQ2Q9BjWGLF3iy99iaU/KeSbOrk9z0B3KHSb9h GPZWPU1ZBpcqicVoaLlnIEH0eT97sNSGISQuXdN9UXaFcBVp+5ha6AIQMSI1ggV7dRp0 Pr+g== X-Gm-Message-State: ACrzQf29dM5iEjgm0FNnkv6Mip6AHPGU69tPVOf+h12A8IPd6HYN6Z53 wRpJ5em3Zvpa7OJ2urIa80Q= X-Google-Smtp-Source: AMsMyM75eAZnyyYxMC/LTSw10Dn+KCCuMMcnU+DgXonX3cOJO+qZHTEXabpBclU/ZqSu5b2xjnWxaQ== X-Received: by 2002:a17:902:dad2:b0:178:401c:f66d with SMTP id q18-20020a170902dad200b00178401cf66dmr4569014plx.157.1663676431948; Tue, 20 Sep 2022 05:20:31 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id r19-20020a63ce53000000b00434d9ba7817sm1472800pgi.30.2022.09.20.05.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 05:20:31 -0700 (PDT) From: Visuwesh In-Reply-To: (Richard Stallman's message of "Mon, 19 Sep 2022 23:40:33 -0400") 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> <87illk4z9d.fsf@posteo.net> Date: Tue, 20 Sep 2022 17:50:24 +0530 Message-ID: <87y1ueme47.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 19, 2022] Richard Stallman wrote: > Is anyone investigating the idea of a more general UI facility > for toggling various kinds of settings? Custom themes are a perfect candidate for this general facility. You can turn on major and minor modes, set variables as a part of a custom theme. So these "presets" could be different custom themes and we can have a command to toggle between said themes. [ You need not have to worry about custom file getting mangled since user options set by a custom theme are not saved [1]. ] > This oculd be a prefix key. Though, I'm lost here. If we are talking about, say, send-mail as the command to be run, you're saying this prefix key would change the From address, Signature, etc. right? Then I think having such a command would be welcome. > Or we might be able to do this more deeply, and implement toggling > various kinds of settings with one Liep command. See above, if we use custom themes, this should be trivial. 1. Only those from the special 'user' custom theme are saved. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 21:09: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16637081269822 (code B ref 57639); Tue, 20 Sep 2022 21:09:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 21:08:46 +0000 Received: from localhost ([127.0.0.1]:59860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oakU1-0002YM-K9 for submit@debbugs.gnu.org; Tue, 20 Sep 2022 17:08:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oakTw-0002Y4-CF for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 17:08:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D8351240026 for <57639@debbugs.gnu.org>; Tue, 20 Sep 2022 23:08:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663708114; bh=J4DE/dQocp4QjtgPOBHim3bAHQktRbOGXz1LZ5d+0PQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Uh6dMsgyW0xZ5T+qRSuumqKeamKlYwBC/B0MVHNASXdftjAO4yZWu4coRwAZHbmgP 27U1pACWfcwT0yzm1RMH2xrM3B3GvFx7Ws1YKIBspFOY4Hos5/0hC/TOe2bjQX+ETQ VKqzIAqEokdEplBERjKLRNV4p27nhVH/VWrfV8T148qUce8nWXD3gwDPWkL9kMtb8a VqUplvelCY9DVytNTyHjy5sjG16kxUx6mS2xkCvjhKz/mtrnSMuOQjAD/vE8ldyPWJ 6JxaKA0VS2I4J8/9MVXr3Sp+qTtQ8uh6Ca511J0feAH37Qm75g+mKdUyHUyv9I1KYA k98mnFToxmQyQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXDfl3FPhz9rxP; Tue, 20 Sep 2022 23:08:30 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87bkrbfz8l.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 19 Sep 2022 12:13:46 +0200") References: <875yhzmz25.fsf@posteo.net> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> 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 Date: Tue, 20 Sep 2022 21:08:29 +0000 Message-ID: <871qs5lpo2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Lars Ingebrigtsen writes: > >> Philip Kaludercic writes: >> >>> I don't think so, but if a theme were concerned about this, all they >>> need to do is >>> >>> (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) >>> >>> As that is all the macro does. >> >> Ah, then that's fine -- feel free to push when you're ready. >> >>> As I said, we could do this too and add >>> a autoload-cookie before it to solve the visibility issue, but it >>> doesn't look that nice... Can (deftheme)s be autoloaded? >> >> Hm... well, anything can be put into the loaddefs.el file, really, so >> yes, but I'm not sure we want to... > > I think I'll modify the patch for now and pull out the properties via > `put' calls, and maybe someone will think of a better solution later on. I've just tried this out but it appears that despite re-building Emacs the autoloaded calls are not registered. Is this because of some special handling of themes? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 21:12: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166370828910101 (code B ref 57639); Tue, 20 Sep 2022 21:12:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 21:11:29 +0000 Received: from localhost ([127.0.0.1]:59865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oakWf-0002cr-47 for submit@debbugs.gnu.org; Tue, 20 Sep 2022 17:11:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oakWc-0002cc-76 for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 17:11:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yGP+OEISKvGa864utc9P7li0uy05og5D+gix9n3BRW0=; b=gjuVgCP5sgN1lngE5/UkCsZYBv G//KVZRZhnReKZ18godz5ZbDheqgxKRuFg5Tu2zRV+F4LHCqBTYyVbJdzfu7vk1DrAo23Z6Ev+v7k VuXxHnwTA8yw1jstX/bu0Op+ALgBNxYyrOleLmMIy1BHh93yQNcdBD3GDokEXzxJKp5A=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oakWT-0005xU-0c; Tue, 20 Sep 2022 23:11:19 +0200 From: Lars Ingebrigtsen In-Reply-To: <871qs5lpo2.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 20 Sep 2022 21:08:29 +0000") References: <875yhzmz25.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> X-Now-Playing: Leslie Winer's _When I Hit You, You'll Feel It_: "N1 Ear" Date: Tue, 20 Sep 2022 23:11:16 +0200 Message-ID: <87mtatagzv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > I've just tried this out but it appears that despite re-building Emacs > the autoloaded calls are not registered. Is this because of some > special handling of themes? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > I've just tried this out but it appears that despite re-building Emacs > the autoloaded calls are not registered. Is this because of some > special handling of themes? Oh -- the themes are in etc/themes, and I don't think they're included... Let's see... Yup: autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp $(AM_V_GEN)$(emacs) \ -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} We can add ../etc/themes there after ${SUBDIRS_ALMOST}, though. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 21:36: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166370973912492 (code B ref 57639); Tue, 20 Sep 2022 21:36:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Sep 2022 21:35:39 +0000 Received: from localhost ([127.0.0.1]:59875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaku2-0003FP-Mo for submit@debbugs.gnu.org; Tue, 20 Sep 2022 17:35:39 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaktx-0003F8-SQ for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 17:35:37 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EFB2A240028 for <57639@debbugs.gnu.org>; Tue, 20 Sep 2022 23:35:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663709728; bh=/I7K7VCo80k+/vARFhF+t8+AK/nQzVVX/Fy+Bc7STqo=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=BM7UtC8ID7ZFRsZAfAYI5/WCvd3CSdMpPl1zRT4JH7ylAx4PHy3txQ2K6tJ62swtp UgPJjXiysFO1eJZNAIgmgBxKuVC4zQ0g449b2ccgQ4CP57rFDjE7EJyL/+v+4miB6u uDZOGUMiVMvCHaxefLFAPGogWLERYrQPy85YycvxtzMUzpa18ETrQrBEraghRxrCz6 7a/lR93m3Yq6n0B+x/yw2HtmPg2AUvOTpeCqvyKpTERhGPabHVqtdlmDP9XVvkVE24 gw1BdaTnF513s+jhhnN/frjuEurm5QSumDnX74L4Jqym7x2+YnkppbmbwS/YEKRJnS 9ba665GJ55zgg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXFFp2k78z9rxH; Tue, 20 Sep 2022 23:35:26 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87mtatagzv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 20 Sep 2022 23:11:16 +0200") References: <875yhzmz25.fsf@posteo.net> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> 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 Date: Tue, 20 Sep 2022 21:35:25 +0000 Message-ID: <87edw5n2zm.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> I've just tried this out but it appears that despite re-building Emacs >> the autoloaded calls are not registered. Is this because of some >> special handling of themes? > > Oh -- the themes are in etc/themes, and I don't think they're > included... Let's see... > > Yup: > > autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp > $(AM_V_GEN)$(emacs) \ > -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ > -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} > > We can add ../etc/themes there after ${SUBDIRS_ALMOST}, though. Would there be a disadvantage to doing so? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: Toggling, in general Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 02:48: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 To: Philip Kaludercic Cc: eliz@gnu.org, larsi@gnus.org, 57639@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16637284659893 (code B ref 57639); Wed, 21 Sep 2022 02:48:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 02:47:45 +0000 Received: from localhost ([127.0.0.1]:60163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oapm4-0002ZS-LY for submit@debbugs.gnu.org; Tue, 20 Sep 2022 22:47:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oapm1-0002YZ-LQ for 57639@debbugs.gnu.org; Tue, 20 Sep 2022 22:47:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaplv-0002ry-Vo; Tue, 20 Sep 2022 22:47:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=sOhRItZm2nvB04qfOVeilZd4ixe3lUqBrajo1ThBnJ8=; b=aZMz5aB5r12L S3j6D9jBDQ0Kt5qCrT9MPeqEOAYv2spvIBq2BPNJUUmPnxMNv3vJZtC+wnUA66eTZODn2OfvChXJZ j2O9+YTEOvO2V6E+J9H5+bnTTPUaQp2jUk4emW71D2ylAAGt3ZO0RMw+U2c8O5Fxu9cvfJVhW8lqt oau/t7I4saK6UOywL2OhbFJVxC3nU7+kXtBp0TUSgFSqiUtSJfAY+X8x39EtKFpv7GBdhJCMBzoDs WCHI1EPMpwceqdVArRIrcLcN0umD1fWb0IkwogwaRhe1f4WOwnV1SOyG3R6ZBBd9bLUkOzfSYW0Sx 5O+edBHmEKOIBgelyQZIww==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1oaplm-0003tB-9P; Tue, 20 Sep 2022 22:47:26 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: <87o7vacvvf.fsf@posteo.net> (message from Philip Kaludercic on Tue, 20 Sep 2022 08:07:00 +0000) 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> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> <87illk4z9d.fsf@posteo.net> <87o7vacvvf.fsf@posteo.net> Message-Id: Date: Tue, 20 Sep 2022 22:47:26 -0400 X-Spam-Score: -2.3 (--) 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 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > What kind of things are you thinking about? Things like the menu bar, > tool bar, etc. are already toggled using minor modes. What I have in mind is settings that have many possible values, and there's a way to select a new setting. It could be useful to have a general way to toggle between the last two values of the setting. One such thing is the selected buffer. Right now you toggle that with C-x b RET, which may be the shortest sequence of keys we can get, but you see what I mean. Another is the current input method. ISTR there is an ad-hoc command to reselect the previous input method. This is another thing that a general toggle could handle, and avoid the ad-hoc additional command. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: Toggling, in general Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 09:23: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 To: Richard Stallman Cc: larsi@gnus.org, Philip Kaludercic , eliz@gnu.org, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166375215326674 (code B ref 57639); Wed, 21 Sep 2022 09:23:01 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 09:22:33 +0000 Received: from localhost ([127.0.0.1]:60682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavw8-0006w9-NJ for submit@debbugs.gnu.org; Wed, 21 Sep 2022 05:22:32 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:40656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavw5-0006vs-0R for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 05:22:30 -0400 Received: by mail-wr1-f51.google.com with SMTP id x18so2797477wrm.7 for <57639@debbugs.gnu.org>; Wed, 21 Sep 2022 02:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=VtBB7KXd20NV2pBarDaXkUGpqNXKMJDyMP6dil5YkUE=; b=julo8iRwUNSTLDlxNkPST8/JHmf1TdfLaZphYEweBxG5T8T1+PIQUx8O6iLdxck0Cx pkaa1Oh6AXNnQ8uYUYu/F57XK+OJcB6aB29liHnlh2ctaTusiJ6MCTU4LB++HEPj4vwu tqwok6KxEtt7ggiLLlMujmEWB40Xuv2MDN5Wcnw1JzeJMhpi79igJC0E26rhRpemSGeX OBhI6k+pnbpzP+eRehw6zbj+oO3Y6W8ev5sUBE784ciUnEkg2q6Cq0FvGZuxAvtpUTDh SkWswHLd7QmY5bKfEQO5t/HFlwMBFlnnrBuhaO7gfMs7YQHA/bhUUO3wuJV+nCm91opM doaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=VtBB7KXd20NV2pBarDaXkUGpqNXKMJDyMP6dil5YkUE=; b=W2xh8HzBrGdg1J79Dq/8XlB1v2HU+8ZdlLCUp6GtVhBofQB1sTtT/q1nXvQmVto9hf vzmHwlABQUjaydMO5aIHymZfmVVOFXPsgRImVljlA18+qtzStG9bd1r/D6Cp3loUkcz4 8GBkfmMMciujMj/KM6MvOypPGKl8ktb1Bj8BGDpEhNxHK9a6SP/z7rbOl6aQ8LOGE/L2 be2Zcw4B64+dubgOtCqjT31f9BSlt2XFWzhjCmJkwIDPssOCZBsj2S2Ut8dOmsRL/eSJ 08uMdYZ9etMK94qakZs70BnsrpOzufc3Wbao5LUf0892g2vmYVBIfuDpJ6LXPGiEMPUX dENA== X-Gm-Message-State: ACrzQf1LrwcJsFbrGJcy54RqXvJgBIf9cXtqPUVuqVwiZR94Amd8WTt8 OPCFHBfbLhSl5kyMkmUdAYDR1yGqUehCGA== X-Google-Smtp-Source: AMsMyM68izVOm5OI8RMkYTJIEH07j8dlzZoAN0YTP9QTRyuUeAApeEkaBMiGHt+tt/esJK5uf23C8A== X-Received: by 2002:a5d:6dad:0:b0:22a:ec41:309c with SMTP id u13-20020a5d6dad000000b0022aec41309cmr12175762wrs.127.1663752142407; Wed, 21 Sep 2022 02:22:22 -0700 (PDT) Received: from rltb ([2a01:e0a:3f3:fb50:16a0:9848:d23c:7dcb]) by smtp.gmail.com with ESMTPSA id s6-20020adfdb06000000b0022ae4f8395dsm1939641wri.96.2022.09.21.02.22.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 02:22:21 -0700 (PDT) From: Robert Pluim In-Reply-To: (Richard Stallman's message of "Tue, 20 Sep 2022 22:47:26 -0400") References: <875yhzmz25.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> <87illk4z9d.fsf@posteo.net> <87o7vacvvf.fsf@posteo.net> Date: Wed, 21 Sep 2022 11:22:20 +0200 Message-ID: <87h711ccab.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) >>>>> On Tue, 20 Sep 2022 22:47:26 -0400, Richard Stallman sa= id: Richard> Another is the current input method. ISTR there is an ad-hoc = command to Richard> reselect the previous input method. This is another thing tha= t a general Richard> toggle could handle, and avoid the ad-hoc additional command. I don=CA=BCt think `toggle-input-method' counts as ad-hoc. The first time you use it, it follows `default-input-method' if set, otherwise it prompts for an input method. Subsequent uses turn that input method on and off (modulo the prefix arg). It *is* the command for selecting an input-method, not a separate toggling command. Robert --=20 From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 11:03: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166375816321709 (code B ref 57639); Wed, 21 Sep 2022 11:03:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 11:02:43 +0000 Received: from localhost ([127.0.0.1]:60833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaxV5-0005e5-53 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:02:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaxV3-0005dr-LO for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 07:02:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZSEABncjuGdOWlhoKSj/sFaNCkuWUCuvqzaskidQaC8=; b=U7fx03vpUMlAjH9TmMIMISNIDx xCbP4rYRJ3WGeA5uoU3SMQLPjbM/Z6PdCUBSSa9QXXXyKfnFOnqQWMbWbZoa1c4DIwvXFq7/no4ai WwDFa7rHiZVi2aaSLSpWQgfwZYnwpy3xorGSoUADBLbLjQ0LAdY+QkQ+cVLAuQivKVLM=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaxUu-00045D-6G; Wed, 21 Sep 2022 13:02:34 +0200 From: Lars Ingebrigtsen In-Reply-To: <87edw5n2zm.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 20 Sep 2022 21:35:25 +0000") References: <875yhzmz25.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> X-Now-Playing: Espen Reinertsen's _Forgaflingspop_: "Forgaflingspop" Date: Wed, 21 Sep 2022 13:02:29 +0200 Message-ID: <87o7v97zy2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >> autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp >> $(AM_V_GEN)$(emacs) \ >> -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ >> -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} >> >> We can add [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: >> autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp >> $(AM_V_GEN)$(emacs) \ >> -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ >> -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} >> >> We can add ../etc/themes there after ${SUBDIRS_ALMOST}, though. > > Would there be a disadvantage to doing so? There's no problems when doing ;;;###autoload(put ...) because those are entered into the loaddefs.el file literally. There may be some confusion if people start putting ;;;###autoload (defun ...) into the theme files, because the etc/themes directory is not in `load-path' (so those autoloads will fail). So it has a slightly inconsistent effect, but I don't think there'll be a problem in practice, because people don't put functions into the theme files. *knocks on wood* From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 11:31: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166375983631067 (code B ref 57639); Wed, 21 Sep 2022 11:31:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 11:30:36 +0000 Received: from localhost ([127.0.0.1]:60889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaxw1-00082M-Vl for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:30:35 -0400 Received: from mout01.posteo.de ([185.67.36.65]:48339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaxvy-0007cs-VB for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 07:30:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C8432240026 for <57639@debbugs.gnu.org>; Wed, 21 Sep 2022 13:30:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663759824; bh=ro6VVXzEisEQzWAL95mtS5jQGmJqlZi5A7Kdf2cKnuc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=oc/PPTgS7v+G6NJH4vnRPTqmpLycqo3ZVH54rLGRBgnmsJVI5vIJ6y21rYRQ4YmDK 7/Iy5KRdNmpOfAhpcS4px4hNZoIazIQardmjImtOb1hMGOgGpELU9KXsBrOUOXAK96 vsznAHweuRZU5+hj+8eMvkMU+8QCNGz0NyTIEl0g1/6RlVP5ntzk/gZZJZcC95DDhn Ved7q+vbM3opflRJB7kCWMeTz1cCV0HskP4et0tEA7MU/0mU27verVWCrRNkcuicFq NophtHF+7BPVrTdw7V1I1Wc3y+g3BhgdSiCQ5Y0HF6uNou1wk6O9gjx7KN3OOke6mL +EvlXchAYLFLQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXbnC1lB7z9rxP; Wed, 21 Sep 2022 13:30:20 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87o7v97zy2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 21 Sep 2022 13:02:29 +0200") References: <875yhzmz25.fsf@posteo.net> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> 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 Date: Wed, 21 Sep 2022 11:30:20 +0000 Message-ID: <87bkr9newj.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>> autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp >>> $(AM_V_GEN)$(emacs) \ >>> -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ >>> -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} >>> >>> We can add ../etc/themes there after ${SUBDIRS_ALMOST}, though. >> >> Would there be a disadvantage to doing so? > > There's no problems when doing > > ;;;###autoload(put ...) Ok, that sounds good. Here is the updated patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From 6e6c5a9cf356b5f634ba388f8e2724a1de893297 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. (Bug#57639) This patch adds theme properties twice, once as part of the deftheme declarations and once by explicitly manipulating the symbol plist. Ideally only the first case would be necessary, but in that case the theme properties only become visible after the theme has been loaded which is (initially) unfortunate if you want to toggle between themes. --- doc/emacs/custom.texi | 10 +++++ doc/lispref/customize.texi | 5 ++- etc/themes/adwaita-theme.el | 6 ++- etc/themes/deeper-blue-theme.el | 6 ++- etc/themes/dichromacy-theme.el | 6 ++- etc/themes/leuven-dark-theme.el | 9 ++++- etc/themes/leuven-theme.el | 9 ++++- etc/themes/light-blue-theme.el | 6 ++- etc/themes/manoj-dark-theme.el | 6 ++- etc/themes/misterioso-theme.el | 6 ++- etc/themes/tango-dark-theme.el | 7 +++- etc/themes/tango-theme.el | 7 +++- etc/themes/tsdh-dark-theme.el | 7 +++- etc/themes/tsdh-light-theme.el | 7 +++- etc/themes/wheatgrass-theme.el | 6 ++- etc/themes/whiteboard-theme.el | 6 ++- etc/themes/wombat-theme.el | 6 ++- lisp/custom.el | 70 ++++++++++++++++++++++++++++++--- 18 files changed, 160 insertions(+), 25 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el index ba83a0578c..c1d694f5dc 100644 --- a/etc/themes/adwaita-theme.el +++ b/etc/themes/adwaita-theme.el @@ -24,7 +24,11 @@ (deftheme adwaita "Face colors similar to the default theme of Gnome 3 (Adwaita). The colors are chosen to match Adwaita window decorations and the -default look of the Gnome 3 desktop.") +default look of the Gnome 3 desktop." + :background-mode 'light + :kind 'color-scheme) + +;;;###autoload (put 'adwaita 'theme-properties '(:background-mode light :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el index 8f19147f91..13abbe0672 100644 --- a/etc/themes/deeper-blue-theme.el +++ b/etc/themes/deeper-blue-theme.el @@ -22,7 +22,11 @@ ;;; Code: (deftheme deeper-blue - "Face colors using a deep blue background.") + "Face colors using a deep blue background." + :background-mode 'dark + :kind 'color-scheme) + +;;;###autoload (put 'deeper-blue 'theme-properties '(:background-mode dark :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el index d53c075d92..a25d2c310f 100644 --- a/etc/themes/dichromacy-theme.el +++ b/etc/themes/dichromacy-theme.el @@ -28,7 +28,11 @@ dichromacy differentiated by individuals with protanopia or deuteranopia. Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and -Ansi-Color faces are included.") +Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme) + +;;;###autoload (put 'dichromacy 'theme-properties '(:background-mode light :kind color-scheme)) (let ((class '((class color) (min-colors 89))) (orange "#e69f00") diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..0d3e1970ac 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220921.1327 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -97,7 +97,12 @@ leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven + :kind 'color-scheme) + +;;;###autoload (put 'leuven-dark 'theme-properties '(:background-mode dark :family leuven :kind color-scheme)) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..0bbc69aa05 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220921.1328 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -78,7 +78,12 @@ leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :kind 'color-scheme + :family 'leuven) + +;;;###autoload (put 'leuven 'theme-properties '(:background-mode light :family leuven :kind color-scheme)) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el index eeca46210c..ff1fde85a9 100644 --- a/etc/themes/light-blue-theme.el +++ b/etc/themes/light-blue-theme.el @@ -27,7 +27,11 @@ ;;; Code: (deftheme light-blue - "Face colors utilizing a light blue background.") + "Face colors utilizing a light blue background." + :background-mode 'light + :kind 'color-scheme) + +;;;###autoload (put 'light-blue 'theme-properties '(:background-mode light :kind color-scheme)) (make-obsolete 'light-blue nil "29.1") diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index af5576386c..791ad2f353 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -67,7 +67,11 @@ (deftheme manoj-dark "Very high contrast faces with a black background. This theme avoids subtle color variations, while avoiding the -jarring angry fruit salad look to reduce eye fatigue.") +jarring angry fruit salad look to reduce eye fatigue." + :background-mode 'dark + :kind 'color-scheme) + +;;;###autoload (put 'manoj-dark 'theme-properties '(:background-mode dark :kind color-scheme)) (custom-theme-set-faces 'manoj-dark diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el index 55186384ad..e7e5dac3dc 100644 --- a/etc/themes/misterioso-theme.el +++ b/etc/themes/misterioso-theme.el @@ -22,7 +22,11 @@ ;;; Code: (deftheme misterioso - "Predominantly blue/cyan faces on a dark cyan background.") + "Predominantly blue/cyan faces on a dark cyan background." + :background-mode 'dark + :kind 'color-scheme) + +;;;###autoload (put 'misterioso 'theme-properties '(:background-mode dark :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..f7d13c5bd5 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -30,7 +30,12 @@ (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :kind 'color-scheme + :family 'tango) + +;;;###autoload (put 'tango-dark 'theme-properties '(:background-mode dark :kind color-scheme :family tango)) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..8df3f50ded 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -30,7 +30,12 @@ (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme + :family 'tango) + +;;;###autoload (put 'tango 'theme-properties '(:background-mode light :kind color-scheme :family tango)) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..afb915dcce 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -20,7 +20,12 @@ ;;; Code: (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :kind 'color-scheme + :family 'tsdh) + +;;;###autoload (put 'tsdh-dark 'theme-properties '(:background-mode dark :kind color-scheme :family tsdh)) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..7fad6c337a 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -21,7 +21,12 @@ (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :kind 'color-scheme + :family 'tsdh) + +;;;###autoload (put 'tsdh-light 'theme-properties '(:background-mode light :kind color-scheme :family tsdh)) (custom-theme-set-faces 'tsdh-light diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el index c56c8a2d8a..81aa68cb34 100644 --- a/etc/themes/wheatgrass-theme.el +++ b/etc/themes/wheatgrass-theme.el @@ -23,7 +23,11 @@ wheatgrass "High-contrast green/blue/brown faces on a black background. Basic, Font Lock, Isearch, Gnus, and Message faces are included. The default face foreground is wheat, with other faces in shades -of green, brown, and blue.") +of green, brown, and blue." + :background-mode 'dark + :kind 'color-scheme) + +;;;###autoload (put 'wheatgrass 'theme-properties '(:background-mode dark :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el index f21b18b421..7b92510049 100644 --- a/etc/themes/whiteboard-theme.el +++ b/etc/themes/whiteboard-theme.el @@ -22,7 +22,11 @@ ;;; Code: (deftheme whiteboard - "Face colors similar to markers on a whiteboard.") + "Face colors similar to markers on a whiteboard." + :background-mode 'light + :kind 'color-scheme) + +;;;###autoload (put 'whiteboard 'theme-properties '(:background-mode light :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el index d9fab8ac78..2d0669f632 100644 --- a/etc/themes/wombat-theme.el +++ b/etc/themes/wombat-theme.el @@ -25,7 +25,11 @@ wombat "Medium-contrast faces with a dark gray background. Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces -are included.") +are included." + :background-mode 'dark + :kind 'color-scheme) + +;;;###autoload (put 'wombat 'theme-properties '(:background-mode dark :kind color-scheme)) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/lisp/custom.el b/lisp/custom.el index 352b5b0e16..93ea80ef43 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,55 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme) + "Return a list of theme variants for THEME." + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (when family + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to one of its a variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (let ((active-color-schemes + (seq-filter + (lambda (theme) + ;; FIXME: As most themes currently do not have a `:kind' + ;; tag, it is assumed that a theme is a color scheme by + ;; default. This should be reconsidered in the future. + (memq (plist-get (get theme 'theme-properties) :kind) + '(color-scheme nil))) + custom-enabled-themes))) + (cond + ((length= active-color-schemes 0) + (user-error "No theme is active, cannot toggle")) + ((length> active-color-schemes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car active-color-schemes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable))))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.3 --=-=-= Content-Type: text/plain > because those are entered into the loaddefs.el file literally. There > may be some confusion if people start putting > > ;;;###autoload > (defun ...) > > into the theme files, because the etc/themes directory is not in > `load-path' (so those autoloads will fail). > > So it has a slightly inconsistent effect, but I don't think there'll be > a problem in practice, because people don't put functions into the theme > files. *knocks on wood* This is actually done a few times by the modus themes and at least once by `leuven-dark' (see `leuven-dark-scale-font', tough I don't see why, and if the autoloads aren't being generated to begin with the cookie is pointless anyway). Should this be addressed before the patch is pushed? --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 11:39: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16637603071342 (code B ref 57639); Wed, 21 Sep 2022 11:39:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 11:38:27 +0000 Received: from localhost ([127.0.0.1]:60919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay3e-0000La-Qg for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:38:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay3d-0000LK-3A for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 07:38:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uT8Pbi6m3gRUu3CfXErhpVSPw0dhTfp6P5Wkvc5WMVU=; b=R/y7QgA341yaqJAaS/uWOxyrSK 91fLXLcuf2A+aJ/+IUBGKShTZBK3FA9jl9pb7bIIHcKsHV+f8n9zd4oZvyJ3d1YC/VQFzNP8rI7RO 4ywwSyKasHhuz0s8wAoYoYXSYFWi22jv6yidKcA98M1Q6pkYkwf8lhXxXKbALzyx3pRY=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oay3T-0004UO-CN; Wed, 21 Sep 2022 13:38:17 +0200 From: Lars Ingebrigtsen In-Reply-To: <87bkr9newj.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 21 Sep 2022 11:30:20 +0000") References: <875yhzmz25.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUFAwQtGxNVPRu8 oC67QBj///9p7MsAAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YJFQsUGrmHVi0AAAG0SURBVDjLdZSN lYMwCIAhtwBJHcBEFzhxgGtk/5kOSFqj16PvtZUvhH8BYheKBB8ES4mx6NedBuacmGuED+DBPAN8 tNiQ8HZZA093lq9APReCDMl+BmB6Paq608RubSAaSKm0GII+N5AkyYxFb+u55Q5WOfYtbDO0yDB1 wLscIjNvr2ropwElIs8gtYc1O1g6qYTNhbryq7igSCNnCmSZF1jFpfaqBKJWEpAulcaSbHmSg9nJ FdAj/wMWKR7wDRQ6Kk3qYJUy9DFshZb6rUCs83gFO6+H5BxTvlmoZ96m74zP0UcGHYb92FG7MVro gHyxym4R/QG7Akt7voJgFix5iAkwMAG+QOy1TbkUtLYtDnp6WJK12/0V7Ycm0gFqzwnBnmLU+so5 o+6L/I+SE5SM7/CiFqsQYh+r8AKICjLkh9cE+wkfsSRV7RYNXvVwJqQGs8c9+yC+Nk+PTF4mX60Q c8IGeuNScmBXpaZZm0/e3svYnKD1j3DVuhzjUkVKYtNbdYjqoLc1mZRInJh/RqCZoU11TusxdArA Wjf5TK8y6sHmD3Xg63Q8LyB5JPqqSZdFvwn+Aim9Vvm0oiCCAAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIyLTA5LTIxVDExOjIwOjI2KzAwOjAwv9uAjAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOS0y MVQxMToyMDoyNiswMDowMM6GODAAAAAASUVORK5CYII= X-Now-Playing: Niki Mono's _Contradictions are a Luxury_: "Baby's On Fire (Instrumental)" Date: Wed, 21 Sep 2022 13:38:13 +0200 Message-ID: <871qs57yai.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > Ok, that sounds good. Here is the updated patch: [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Ok, that sounds good. Here is the updated patch: [...] > This is actually done a few times by the modus themes and at least once > by `leuven-dark' (see `leuven-dark-scale-font', tough I don't see why, > and if the autoloads aren't being generated to begin with the cookie is > pointless anyway). > > Should this be addressed before the patch is pushed? Hm... are these themes also distributed via ELPA or something? But in any case, I don't see why you'd have: ;;;###autoload (defun leuven-dark-scale-font (control default-height) If you've activated the theme, you've loaded the file, so autoloading a function like that doesn't seem helpful in any case. So I think that sounds like it's just a mistake, and the ;;;###autoload should be removed. And the same with the commands autoloaded in modus themes? But perhaps there's a reason; I've added Prot to the CCs. Perhaps he can clarify why those autoloads are in modus*.el. But this looks more problematic: ;;;###autoload (when (and (boundp 'custom-theme-load-path) load-file-name) ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) We don't want that in the Emacs loaddefs file, so just adding etc/themes to our Makefile won't be the right thing to do, and we have to find a different way to fix this. Uhm... Uhm... I don't immediately see a good way to fix this... From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 11:47: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376078010719 (code B ref 57639); Wed, 21 Sep 2022 11:47:01 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 11:46:20 +0000 Received: from localhost ([127.0.0.1]:60955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayBI-0002mp-88 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:46:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayBG-0002md-E0 for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 07:46:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DFD6F240104 for <57639@debbugs.gnu.org>; Wed, 21 Sep 2022 13:46:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663760772; bh=n3KvYLs/2FmlOJkGdHMfeJPDMlAJEwdBVhmEWvUg8RM=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=O5nLZxOanFasjaeSLU/xskK55ewBfPT2kmKfawTPSWhI43X89OdHmbfDG0WotPkrN 5BV2egPN3M8kMieuy9H30ykmONo7vTus0lo3HpmIUijsyYbEDAHNmRrtU19Aoww4WZ dU4n3T07Ik3FtIOCGue93hD/FRSUtVzdB4z+aek6kVzudH1x+at4B9u2ycDMBQbCis 7wKwqwc0LewaE3S+lAs11thItt7C8gNsQ3skWmXbYcOvKN6IkHyqsmKNbL8P1bAvNM 04LoDIIy4e/itFgiMKHHHDKrs7V/0kpEFyLxmlyluDv7GTPW5NxCKj/j/WxuBH+uRR WWvSK0aBCRhmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXc7R6YCyz6tmK; Wed, 21 Sep 2022 13:46:11 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qs57yai.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 21 Sep 2022 13:38:13 +0200") References: <875yhzmz25.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> 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 Date: Wed, 21 Sep 2022 11:46:06 +0000 Message-ID: <87y1udlzlt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Ok, that sounds good. Here is the updated patch: > > [...] > >> This is actually done a few times by the modus themes and at least once >> by `leuven-dark' (see `leuven-dark-scale-font', tough I don't see why, >> and if the autoloads aren't being generated to begin with the cookie is >> pointless anyway). >> >> Should this be addressed before the patch is pushed? > > Hm... are these themes also distributed via ELPA or something? But in > any case, I don't see why you'd have: Modus-themes is distributed via GNU ELPA, and Leuven via MELPA. I didn't modify Modus-themes because I know it is sync'ed back regularly, but now that I think about it I don't know if I ought to have changed those either... > ;;;###autoload > (defun leuven-dark-scale-font (control default-height) > > If you've activated the theme, you've loaded the file, so autoloading a > function like that doesn't seem helpful in any case. > > So I think that sounds like it's just a mistake, and the ;;;###autoload > should be removed. And the same with the commands autoloaded in modus > themes? But perhaps there's a reason; I've added Prot to the CCs. > Perhaps he can clarify why those autoloads are in modus*.el. > > But this looks more problematic: > > ;;;###autoload > (when (and (boundp 'custom-theme-load-path) > load-file-name) > ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. > (add-to-list 'custom-theme-load-path > (file-name-as-directory (file-name-directory load-file-name)))) > > We don't want that in the Emacs loaddefs file, so just adding etc/themes > to our Makefile won't be the right thing to do, and we have to find a > different way to fix this. > > Uhm... Uhm... I don't immediately see a good way to fix this... There probably is not automatic way to resolve this issue, but perhaps it might be enough to remind all the external theme maintainers to remove these snippets before updating the files in emacs.git. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 12:07: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376200421359 (code B ref 57639); Wed, 21 Sep 2022 12:07:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 12:06:44 +0000 Received: from localhost ([127.0.0.1]:32789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayV1-0005YR-Sb for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:06:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayUz-0005YE-W7 for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 08:06:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HmLPFC7f2DNkVI8/fP56HlwVHaUMZZ9/sBrsZX5VaNE=; b=W7nbNin4Eb1Jl9fuwiIaoKDSa2 XtjKbqF1w2PdYtzbI0OtfpAg/8t8YtaB3Q3h6lOstG9Z99N2/wMrudbLxZ9CxSi4Fq/M7/JhiEtyW +iGcHYZ/olu4eMaYRLbWGDG7tQy+xouba5wcSsDqKuM1SrX4MOrVA2ZbpqcFHTYcRnNQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oayUq-0004r7-Qh; Wed, 21 Sep 2022 14:06:34 +0200 From: Lars Ingebrigtsen In-Reply-To: <87y1udlzlt.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 21 Sep 2022 11:46:06 +0000") References: <875yhzmz25.fsf@posteo.net> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWkRUzBsbE5Jiv/ //9EG+24AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YJFQs7EqVA5nIAAAGjSURBVCjPPZIxa+NAEIVH IgrBlTCWCamSFIe8v2IJOIUrWewITlWK5Ej0K4SwDuHqcpxNksoRkVm9X3mzkslW+82w7808lqYN Lq8vJ7+r+FBSut1O2zccYduSzNXHvH1/OFaLdkP+G+ZoblsAByLywwsi/I2pJPKIdJD3MxpPqGfo H4crU7QsYL9IE635LEoBy1IViFiUOtYCHge5QD8AMeffHQEjwMtE7hEzrwsrpaEhp+hMZMgfwWzM PghPHa6f9gHrE3TP97WAE1jw02KAQKA9MM5ZwGO+24LT0ml7zlS9ZrsT8AqvTmV0zeFkdprCtXnR q4ifYRMy+UZdmGGnhMK0RsOcQeEPUWaxcwAcic56Jc//KbQSoqd6aezc6g5ks6wWsGJUyCR+54IQ 05eAJxgh5J8sJnU6whBPlygnwEuWam8UIoGAV19xw/iciJpXx2w+9sjgwCU4R60GuHUaNnc+RL8q AZnnWgR0al3CWzcN6ysbcHYIaSmmeopPgzoRkM456pUNJAGiGf2wdzYmvyGS33ETwaqyssNP6Aso 1VZQ/wGiGsRQg+CqXwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOS0yMVQxMTo1OToxOCswMDow MLRFwnsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDktMjFUMTE6NTk6MTgrMDA6MDDFGHrHAAAA AElFTkSuQmCC X-Now-Playing: The Waitresses's _Wasn't Tomorrow Wonderful?_: "Quit" Date: Wed, 21 Sep 2022 14:06:32 +0200 Message-ID: <87o7v953uf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > There probably is not automatic way to resolve this issue, but perhaps > it might be enough to remind all the external theme maintainers to > remove these snippets before updating the files in emacs [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > There probably is not automatic way to resolve this issue, but perhaps > it might be enough to remind all the external theme maintainers to > remove these snippets before updating the files in emacs.git. That would be inconvenient to have to have different versions in Emacs and on ELPA(s). As a gross hack, we could add a new file in etc/themes that has these `put' statements and then load that in Emacs. But... that's kinda gross, so if somebody has a better idea, that's be nice. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 12:28: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376322923412 (code B ref 57639); Wed, 21 Sep 2022 12:28:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 12:27:09 +0000 Received: from localhost ([127.0.0.1]:32846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayom-00065Y-KV for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:27:08 -0400 Received: from mout01.posteo.de ([185.67.36.65]:49029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayok-000655-JM for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 08:27:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 15F4A240029 for <57639@debbugs.gnu.org>; Wed, 21 Sep 2022 14:26:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663763221; bh=dEOxrJOnlTIfaiLHLhav4eyIJqpgGcLllBaOYhwPB7s=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=TyUW2NFyGWg+4SoB0TN3ktONpZVZpRNpFVbmX8+Q6xAJUxcp9UQlNi/E64y7186WK 9BFH0HpEue7ngUfQnaVz7K/GjbOzZUbnZWoeuGZT4Jqk62UIGG1mg+tU//EkeZU4SG R8NK/fJW/NpbYmlXppU114Ida4JUOowCFHw+lzu9Wwc98Mqem62t6u+6Xz5nyjG5st Bc56P+LaYaPh0US18IL9L0o+9/8kQTESMl45Kk3d+1S8ShACyIQ/3EGr50m6OBZNoc CI3ggt78XbVDEfqgeZigbjuM39JOFpgGNtJmpAleO5X1GRQp1CXTIWlgGuUZI7cbwF nn4tzLr+mPtgA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXd2S33gMz6tpc; Wed, 21 Sep 2022 14:26:56 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87o7v953uf.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 21 Sep 2022 14:06:32 +0200") References: <875yhzmz25.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> 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 Date: Wed, 21 Sep 2022 12:26:56 +0000 Message-ID: <87tu50nca7.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> There probably is not automatic way to resolve this issue, but perhaps >> it might be enough to remind all the external theme maintainers to >> remove these snippets before updating the files in emacs.git. > > That would be inconvenient to have to have different versions in Emacs > and on ELPA(s). Functionally they wouldn't differ from one another, the only difference would be that the core packages wouldn't include the code necessary to bootstrap a theme as a package. > As a gross hack, we could add a new file in etc/themes that has these > `put' statements and then load that in Emacs. But... that's kinda > gross, so if somebody has a better idea, that's be nice. If there were a way to generate "autoloaded" code as a side effect of byte compilation or something, then deftheme would take care of that. But I don't know enough about the bootstrapping process to say how feasible that is or not. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 13:07: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 To: Lars Ingebrigtsen , Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376556927397 (code B ref 57639); Wed, 21 Sep 2022 13:07:01 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 13:06:09 +0000 Received: from localhost ([127.0.0.1]:32919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazQW-00077o-Uk for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:06:09 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:41425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazQT-00077B-5I for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 09:06:07 -0400 Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 2F5FA240010; Wed, 21 Sep 2022 13:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1663765559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vY8qzAbT41J3hGdH347pb8EDOtEdfbT0D9pql658olI=; b=E7cjFFtZ7FLYa9cnv3raJ+vgZJqUCt2gk0TgmLpvRxDjjlnJpVY/3WzafLMtdVkfYhkzwf b9zQC3uLHefxEgT8aFpGesTx+6TuBjiPQVsB1YLa+OVw7Zq1D05pA6AfIhAk1BWD9rej5m SydWYb+UhCPJ2XYrDDy/xt20AyL0OkHbKym09Vo8gmgTT7thf9XJNCh2dkLR+UmPZW2E7C 5sU3wgP7qujbVYpsCWwmlmeEaSngIpDKh5lcT4uK5jPeYQR/Ni6Vf0GqcwUDckgy7NYakc JgI7wnxGajI5t5O4dUO9ST1aAxyL/OCaB+VbH+2K1qAq8yH+KWyWqQGIxaCe3g== From: Protesilaos Stavrou In-Reply-To: <871qs57yai.fsf@gnus.org> References: <875yhzmz25.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Wed, 21 Sep 2022 16:05:54 +0300 Message-ID: <87wn9wq3m5.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) > From: Lars Ingebrigtsen > Date: Wed, 21 Sep 2022 13:38:13 +0200 > > Philip Kaludercic writes: > >> Ok, that sounds good. Here is the updated patch: > > [...] > >> This is actually done a few times by the modus themes and at least once >> by `leuven-dark' (see `leuven-dark-scale-font', tough I don't see why, >> and if the autoloads aren't being generated to begin with the cookie is >> pointless anyway). >> >> Should this be addressed before the patch is pushed? > > Hm... are these themes also distributed via ELPA or something? But in > any case, I don't see why you'd have: > > ;;;###autoload > (defun leuven-dark-scale-font (control default-height) > > If you've activated the theme, you've loaded the file, so autoloading a > function like that doesn't seem helpful in any case. > > So I think that sounds like it's just a mistake, and the ;;;###autoload > should be removed. And the same with the commands autoloaded in modus > themes? But perhaps there's a reason; I've added Prot to the CCs. > Perhaps he can clarify why those autoloads are in modus*.el. Those autoloads are for the version of the themes distributed via GNU ELPA. I am happy to make adaptations though. -- Protesilaos Stavrou https://protesilaos.com From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 13:09: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 To: Philip Kaludercic , Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376572027618 (code B ref 57639); Wed, 21 Sep 2022 13:09:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 13:08:40 +0000 Received: from localhost ([127.0.0.1]:32928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazSy-0007BI-Do for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:08:40 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:48641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazSo-0007Ap-Ox for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 09:08:31 -0400 Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 0BDED240002; Wed, 21 Sep 2022 13:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1663765705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iI2LB4Ttr6mqd2D7kFJgU+5yDjvWvcH2SZUFClr9DHI=; b=FlrPYQUQGco0Dgpz99a4KMrsIsr5r9hXfb5lB0lb1LVseJCT2l/A20SS+etFcgFqwL+Lm1 SeYMZkmUb91NPsEu/6kj5JyODldCmjs79MLJ6fHSeY6mFBmbiKev3H5dECvirwmFC9jjLQ hJ+m+xJk9dasZX2/Z02K9Ki6yuzLSACsxaG9CdfVj1qD1A6kgUZpCn1IQRFmxnr1LiZkvv sZsa/0pqy68QKKd8rGy7vdbBTo6KLgXv4CyaI5TH8Tp3eTDdoR5AUgosJWtiOr5khGyKuW Nyd7eKm29vGlI7CPDwO0e9hnzT8WYVzssxlAGIi+16IV4R4SjKjQt1E6GacBoA== From: Protesilaos Stavrou In-Reply-To: <87y1udlzlt.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Wed, 21 Sep 2022 16:08:23 +0300 Message-ID: <87tu50q3i0.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) > From: Philip Kaludercic > Date: Wed, 21 Sep 2022 11:46:06 +0000 > [... 19 lines elided] > Modus-themes is distributed via GNU ELPA, and Leuven via MELPA. I > didn't modify Modus-themes because I know it is sync'ed back regularly, > but now that I think about it I don't know if I ought to have changed > those either... I am fine either way. Do whatever you think is better. For the completeness of your patch, it makes more sense to include them as well. Then I can copy the relevant parts into my Git repo (or you prepare a patch). At any rate, I am following this discussion to know what changes I need to make. -- Protesilaos Stavrou https://protesilaos.com From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 13:15: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 To: Protesilaos Stavrou Cc: Lars Ingebrigtsen , Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376604428208 (code B ref 57639); Wed, 21 Sep 2022 13:15:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 13:14:04 +0000 Received: from localhost ([127.0.0.1]:32943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazYC-0007Ku-6G for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:14:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]:46547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazYA-0007KJ-E1 for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 09:14:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 854D8240026 for <57639@debbugs.gnu.org>; Wed, 21 Sep 2022 15:13:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663766036; bh=8Q3YUfMkvF8o0+smrRNKg+G12rBvP36gs0ZvqHWM8+k=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=CSMgb82gEPoEcIwrGvDNRamkkgzoWLr9MQxlCAOysoOAIcwCwnXjFIC5VyGQNpIGU Gr+LEdlll1s7YZT38yM9NSxiMf7YcTWZW4u8XZj+KeszsJJBanwQ5mDWgSo+pu8ogO T6cuP6ZmlDvo9mnJZ16nutUb2b4NunlsUzhLDxSRFS3x6Uh7cGz27WQ122UTVKIdnL vGz4IAU2OFgRrZGN3mPkuOAYRQx+nxZncNGb8szMyR1G4lVN9VIZZMK2xiu0IpKVZX SK6OU9M8XeIYnzIvr0iMfsmdznOy6f3b1AgmZw2JgXDShm4o04vTY0MGrlisBNm0b/ HRlS+1epP41uw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MXf4d2J9Rz9rxW; Wed, 21 Sep 2022 15:13:50 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87tu50q3i0.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Wed, 21 Sep 2022 16:08:23 +0300") References: <875yhzmz25.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87tu50q3i0.fsf@protesilaos.com> 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 Date: Wed, 21 Sep 2022 13:13:50 +0000 Message-ID: <87h710na41.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Protesilaos Stavrou writes: >> From: Philip Kaludercic >> Date: Wed, 21 Sep 2022 11:46:06 +0000 > >> [... 19 lines elided] > >> Modus-themes is distributed via GNU ELPA, and Leuven via MELPA. I >> didn't modify Modus-themes because I know it is sync'ed back regularly, >> but now that I think about it I don't know if I ought to have changed >> those either... > > I am fine either way. Do whatever you think is better. For the > completeness of your patch, it makes more sense to include them as well. > Then I can copy the relevant parts into my Git repo (or you prepare a > patch). FWIW I didn't change your themes for now, just Leuven. But if you are fine with it, I'd change those too and then send you a patch. > At any rate, I am following this discussion to know what changes I need > to make. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 13:22: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166376650329096 (code B ref 57639); Wed, 21 Sep 2022 13:22:02 +0000 Received: (at 57639) by debbugs.gnu.org; 21 Sep 2022 13:21:43 +0000 Received: from localhost ([127.0.0.1]:32984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazfa-0007ZE-TD for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:21:43 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:43767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazfV-0007Yy-6Q for 57639@debbugs.gnu.org; Wed, 21 Sep 2022 09:21:41 -0400 Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 4E69E240004; Wed, 21 Sep 2022 13:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1663766491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QliQNofNXupcm30VbK6+O/x/CKavCYVjpHEX5ikQk+g=; b=JHBLi6UD3u5ZL6SKN62hbDF/TWZxEfaoDsOiIIwR4fpeUO2Lb3IxxnhKU5GN+7Qhtvumv0 9gWs2+imYzaP0pOyoqMo3aM61tCFXHFHaQurkIot6KnKCVlgtWelwkeGh5/Xae0jWgzR50 jOGMBjbHVkd7j6PwYL8NTVzr/xEtF03YelGF9BR7p/G5pANvgJILrShv276mI2uCch/zc3 ZxWWn5fqRi5ejudMdTVH02++Jk+KReK1QJ462c7PEhTM2QM6e54T3MrEVaVI4F/0JXAMPw yW/u6xM5yqI7MuJPPWdnUFrSvmG9iYYzlurdjfCc92v/mkBsdJxoRdjiYlHa4g== From: Protesilaos Stavrou In-Reply-To: <87h710na41.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87tu50q3i0.fsf@protesilaos.com> <87h710na41.fsf@posteo.net> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Wed, 21 Sep 2022 16:21:27 +0300 Message-ID: <87leqcq2w8.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) > From: Philip Kaludercic > Date: Wed, 21 Sep 2022 13:13:50 +0000 > > Protesilaos Stavrou writes: > >>> From: Philip Kaludercic >>> Date: Wed, 21 Sep 2022 11:46:06 +0000 >> >>> [... 19 lines elided] >> >>> Modus-themes is distributed via GNU ELPA, and Leuven via MELPA. I >>> didn't modify Modus-themes because I know it is sync'ed back regularly, >>> but now that I think about it I don't know if I ought to have changed >>> those either... >> >> I am fine either way. Do whatever you think is better. For the >> completeness of your patch, it makes more sense to include them as well. >> Then I can copy the relevant parts into my Git repo (or you prepare a >> patch). > > FWIW I didn't change your themes for now, just Leuven. But if you are > fine with it, I'd change those too and then send you a patch. Yes, all good. Thank you! -- Protesilaos Stavrou https://protesilaos.com From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 12:59: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166532029614784 (code B ref 57639); Sun, 09 Oct 2022 12:59:02 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 12:58:16 +0000 Received: from localhost ([127.0.0.1]:42312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohVsl-0003qN-Tl for submit@debbugs.gnu.org; Sun, 09 Oct 2022 08:58:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:39811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohVsj-0003q9-8G for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 08:58:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B6E6A240104 for <57639@debbugs.gnu.org>; Sun, 9 Oct 2022 14:58:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665320287; bh=imBWkc91iJIHOCpNcxk3ttzpQ9PQWrTnZfMaeITXISI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=cYaA0zDVMrist5bSc5SCd30iNbTlOUp4r4teW0eLto8lbJbrLDLiIAwdruaU9ToFT KjlIgPwh0ER0ypMHNzSPg5ZfGz0JoJMk9TR3fQrGwWA2mMR8pGlt/eGo7R+9TsxgME SXoqZuFfZICIRWx+aMSV11GDxvgTUfHrF6BKLZKnn7qBqURNFgYcvLbbloDe5jcmfa KRdbuYtAckD1VB0EC/O1joquWJNhkrk+xcdVubohDfCIZvPwEm7BerrAFzbhLKe0L+ xqyB6RQaN0Dw1nlSfi24otn4cVxM+4Frl0qxdkj1uYpa6ZC7o6uKVoumM26jhmPOkO Wgozl3V3R0QWg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mlht444Lmz9rxH; Sun, 9 Oct 2022 14:58:04 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87tu50nca7.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 21 Sep 2022 12:26:56 +0000") References: <875yhzmz25.fsf@posteo.net> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> 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 Date: Sun, 09 Oct 2022 12:58:04 +0000 Message-ID: <87a6652lyb.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Philip Kaludercic writes: > Lars Ingebrigtsen writes: > >> Philip Kaludercic writes: >> >>> There probably is not automatic way to resolve this issue, but perhaps >>> it might be enough to remind all the external theme maintainers to >>> remove these snippets before updating the files in emacs.git. >> >> That would be inconvenient to have to have different versions in Emacs >> and on ELPA(s). > > Functionally they wouldn't differ from one another, the only difference > would be that the core packages wouldn't include the code necessary to > bootstrap a theme as a package. > >> As a gross hack, we could add a new file in etc/themes that has these >> `put' statements and then load that in Emacs. But... that's kinda >> gross, so if somebody has a better idea, that's be nice. > > If there were a way to generate "autoloaded" code as a side effect of > byte compilation or something, then deftheme would take care of that. > But I don't know enough about the bootstrapping process to say how > feasible that is or not. Ping? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 14:28: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166532563225332 (code B ref 57639); Sun, 09 Oct 2022 14:28:02 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 14:27:12 +0000 Received: from localhost ([127.0.0.1]:44712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXGp-0006aW-UF for submit@debbugs.gnu.org; Sun, 09 Oct 2022 10:27:12 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXGn-0006aH-K4 for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 10:27:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8IOrtut5Cgn99C8YVKf07iyQOPF+nWQGI2r303U+s3c=; b=h6fwWnLzIDfvstjb11G6feaqxi SfKX7MJaWXpcnT0shRyt9tPO1pDbFU0KprxDfC64tD3q7gzzdfpWwCMYo+G+EXPUl1nYVCsoP/Zhx 2fwEABK43asGIv6etvM7R/OaPh6OnEsHfrOaGBhU5NQoH1o6TdZlK5Q6X80ln23HShek=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohXGd-000333-NZ; Sun, 09 Oct 2022 16:27:02 +0200 From: Lars Ingebrigtsen In-Reply-To: <87a6652lyb.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 09 Oct 2022 12:58:04 +0000") References: <875yhzmz25.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUqHCJVMjPAnmv/ ///dSr/NAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKCQ4PBygToXIAAAFlSURBVCjPTZK/asMwEMbv StTZBivQzJ3yFArEu1x8gnrq0AzVU6RD9w7xksmBuOB7yt6dXKjAln989+fTyQC2XF922MjjFdDw /T88h1ogOIOq0jQogFcOsjUGD8xnuECAU+rokYfpUUXmH/7ky9uORwIaOzrwJWbmBbKm8v2FOd8N HN995usEzpSpYebvYo+nKBAK5BEFVuP76JjHVdmDKHMP0QDdwMsARAJPxzZZkicKriWBGeQoLSGR 2LkBxQDYkaw8axSgJynb7KRAgFbeVjVqNdGtX619cQVvsKUW5aM3SNQdJEv1iDT6HiuQYhiwH9WH ghe4USsNJacOrp/Vg9iRMEezp/Sq4KLrVPmwawt+KGGlc5rpdBXHNgYX/cCiVCWyTnJSu6TKh4oU NjKgxnce8gKoN++oayHJdAIEPOixIav/M/61aAC/ZDjdCoDaPeqfsKnAqZej+FDYLsVYMmcFXPoF Gpl5Wv37VTkAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMDlUMTQ6MTU6MDcrMDA6MDAlZjsA AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTEwLTA5VDE0OjE1OjA3KzAwOjAwVDuDvAAAAABJRU5E rkJggg== X-Now-Playing: Egg's _The Polite Force_: "Long Piece =?UTF-8?Q?N=C2=BA?= 3 (Part 2)" Date: Sun, 09 Oct 2022 16:26:59 +0200 Message-ID: <875ygtqdho.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: >>> As a gross hack, we could add a new file in etc/themes that has these >>> `put' statements and then load that in Emacs. But... that's kinda >>> gross, so if somebody has a better idea, that's be n [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: >>> As a gross hack, we could add a new file in etc/themes that has these >>> `put' statements and then load that in Emacs. But... that's kinda >>> gross, so if somebody has a better idea, that's be nice. >> >> If there were a way to generate "autoloaded" code as a side effect of >> byte compilation or something, then deftheme would take care of that. >> But I don't know enough about the bootstrapping process to say how >> feasible that is or not. > > Ping? Sorry; I'm not sure what the question is any more? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 15:14: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16653283975716 (code B ref 57639); Sun, 09 Oct 2022 15:14:01 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 15:13:17 +0000 Received: from localhost ([127.0.0.1]:44749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXzQ-0001U8-K3 for submit@debbugs.gnu.org; Sun, 09 Oct 2022 11:13:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:39291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXzO-0001Tv-P2 for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 11:13:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 44D7C240104 for <57639@debbugs.gnu.org>; Sun, 9 Oct 2022 17:13:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665328389; bh=KkAFORmM4PdNrwftuJZ+btNwoQNWMH7XFTgoUy55Aa4=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=k4bg0B1Z/Xv48GARfipPxb9nhU93Zmf4EAop4wvwS8gwkVx7iYNUjkglaiHm1KgFM kHYvarNYPplBR6U1/+ztSy+oEpXCPWqI2uprMUm0bgAzsaDHjfHatICVr/lcMDzJIx +NDSrXZkEM/obgM7pH/jMHZT3ZWRA4IRWYrHxSCV1Vbxouomjwx+JnUrkRKjgNaDjg TydjGr6/SgK1sBP5rqrLAhE3gMf5iLoQo/4yQ7l27YxPYz0VfcDQrPQurCCCjRE90g 66YoPnHqVZLkoUwZkktvcu9jMPFb0ybhztpuij5OrbGW+0D6ZlpnM01RCQR1LX4Wi5 tjf16GM+f9eZw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mllsq2qPlz9rxK; Sun, 9 Oct 2022 17:13:03 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <875ygtqdho.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 09 Oct 2022 16:26:59 +0200") References: <875yhzmz25.fsf@posteo.net> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> 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 Date: Sun, 09 Oct 2022 15:13:03 +0000 Message-ID: <87wn99114w.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >>>> As a gross hack, we could add a new file in etc/themes that has these >>>> `put' statements and then load that in Emacs. But... that's kinda >>>> gross, so if somebody has a better idea, that's be nice. >>> >>> If there were a way to generate "autoloaded" code as a side effect of >>> byte compilation or something, then deftheme would take care of that. >>> But I don't know enough about the bootstrapping process to say how >>> feasible that is or not. >> >> Ping? > > Sorry; I'm not sure what the question is any more? The last issue preventing this patch from being merged is that expressions marked for auto-loading are not gathered. I believe one option was adding etc/themes to the list of scraped directories, but that would require comments like --8<---------------cut here---------------start------------->8--- ;;;###autoload (when (and (boundp 'custom-theme-load-path) load-file-name) ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) --8<---------------cut here---------------end--------------->8--- from leuven-theme.el to be removed. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 20:33: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 To: Philip Kaludercic , Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166534757821197 (code B ref 57639); Sun, 09 Oct 2022 20:33:02 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 20:32:58 +0000 Received: from localhost ([127.0.0.1]:45006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohcyo-0005Vp-0i for submit@debbugs.gnu.org; Sun, 09 Oct 2022 16:32:58 -0400 Received: from mail-oo1-f44.google.com ([209.85.161.44]:42519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohcym-0005Vb-5A for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 16:32:56 -0400 Received: by mail-oo1-f44.google.com with SMTP id r15-20020a4abf0f000000b004761c7e6be1so6832543oop.9 for <57639@debbugs.gnu.org>; Sun, 09 Oct 2022 13:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=GrWeoGVhSWz4truPuQT0jYK4s9aomFM3AklGqs7CH38=; b=TgnnmU4l+e7hCVwDUykjZCJZyTNgNT/UdLjNsx5V1+LFhSZwZO4e1u557Kqs7CXSGI Y9MOzg6VOri79DsCvV7mqjGOFD2EIGGBMTXTQTgMkYmbgzZ+eogQB23/bWturfsKKbhJ voX8PpxgOkOwVf4dJO0TMaK8AYMP6zO5rntoI+SQfHKL63sLYA0gyh9+y6rYyNhwFM2w vOZZOVF8GIf0s4OW6bm5OuuqiAcVfO7Ov7j/JqY4/gOD124xYN18Vy8ybt0lYS9Q7s6d ivPOmcU5Ur89N/S/OCHwM7YETe02zZKzFMLJipWTJmsxK8kDn3vQCq1X+D8DJfH/O2AT ikHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=GrWeoGVhSWz4truPuQT0jYK4s9aomFM3AklGqs7CH38=; b=JO5Va+gDPBAiKEoVevYkgX58mWLo2vSA/gwMR5Kr9hfoK87YHQkkGT0rbdd2zQ2oIz NGeV9Yk4kQ5OjCz4cvWSCVlFsC3CFxSFD2MlEdPketo1YGRtx4f5yjJI2loS8Eo2YLPN 3ZflJHqnHrQROr/hu7HXimUm0uh/1GvKpoTHu7Og6K6ubqWJrVKRv8uzRbqhoQzLnkJc VJjfTesn1GRfJrkbQ7erwU+2MInqGzlqE16Wvwc7/OZir+WCT5T1Yi54xBUQREjRQ1kz ryJ15mBYZDPe3MZVaPAHk0T3dqBUgIT0wUa3PVH6yZIj4eyvOQWk41ex6+fMJuRiYb1i 9GAw== X-Gm-Message-State: ACrzQf1qp/TF0KpvSvxI4tg+RPFgj7i1HWETcznW5mUn88vXYYAB6DT/ ds3fBE/VtcWqVNsh9KILKak/ZvP03p9x1K6fvYM= X-Google-Smtp-Source: AMsMyM5FRcdhqYfAA8GjJgatpsE+mejNoy/4ZvtZwhKkx9XAZN/M+nINjMId9Z/Vb2kWK18dacNMC64FcECIMzBn3rI= X-Received: by 2002:a9d:7c89:0:b0:655:dfb1:331c with SMTP id q9-20020a9d7c89000000b00655dfb1331cmr6397201otn.224.1665347570591; Sun, 09 Oct 2022 13:32:50 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 9 Oct 2022 22:32:49 +0200 From: Stefan Kangas In-Reply-To: <87wn99114w.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> X-Hashcash: 1:20:221009:57639@debbugs.gnu.org::gmgU4I+Vt/w85OWh:CA+f MIME-Version: 1.0 Date: Sun, 9 Oct 2022 22:32:49 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Philip Kaludercic writes: > --8<---------------cut here---------------start------------->8--- > ;;;###autoload > (when (and (boundp 'custom-theme-load-path) > load-file-name) > ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. > (add-to-list 'custom-theme-load-path > (file-name-as-directory (file-name-directory load-file-name)))) > --8<---------------cut here---------------end--------------->8--- > > from leuven-theme.el to be removed. Why would the above be necessary for leuven-theme.el in particular? I've never had a problem loading themes installed from MELPA, so I don't understand why it should need any special treatment. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 21:04: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 To: Stefan Kangas Cc: Fabrice Niessen , Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166534939824185 (code B ref 57639); Sun, 09 Oct 2022 21:04:01 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 21:03:18 +0000 Received: from localhost ([127.0.0.1]:45024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohdS7-0006Hy-F3 for submit@debbugs.gnu.org; Sun, 09 Oct 2022 17:03:18 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohdS2-0006Hh-8H for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 17:03:14 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 71E47240026 for <57639@debbugs.gnu.org>; Sun, 9 Oct 2022 23:03:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665349384; bh=pgmFiGa5cevQUhnEe14y9QWaTx4PvbKuzuG77iy2tJg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=of13Qdfp1M+dtXT5CxEi7jLCyP0aNiKhO0tyuFjSQImHx6CpwzZ3JIuj1RvzIpJAk 8i1FitfxcUatQusMd0JEoo79c6epEDcbH7FLtkuUBdQEoyjr5ucaFkD/ELGoTEAqj6 sSXGOdJsvPKguWyNBFzlMgrSi3k4yT+Sf+Lmr1PCWA4E1kqPkJIRbYXsBjr9q2CPpV WOQkcR+J34OzeTcj0nTkCNOJnAOT+MpFTVLQfNem1BsYLBCdcrTkdmfE/ITGk+oYAJ 4s34Fx5O8MWC1n6HINVUBMzjRAn9gUN/8hzses4ULmG5i3h8vnSiJJkSY7DGdDt/nr meehctiO6BTYQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mlvdc300Kz6tmF; Sun, 9 Oct 2022 23:03:00 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Kangas's message of "Sun, 9 Oct 2022 22:32:49 +0200") References: <875yhzmz25.fsf@posteo.net> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> 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 Date: Sun, 09 Oct 2022 21:02:59 +0000 Message-ID: <87fsfw1zi4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Stefan Kangas writes: > Philip Kaludercic writes: > >> --8<---------------cut here---------------start------------->8--- >> ;;;###autoload >> (when (and (boundp 'custom-theme-load-path) >> load-file-name) >> ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. >> (add-to-list 'custom-theme-load-path >> (file-name-as-directory (file-name-directory load-file-name)))) >> --8<---------------cut here---------------end--------------->8--- >> >> from leuven-theme.el to be removed. > > Why would the above be necessary for leuven-theme.el in particular? > > I've never had a problem loading themes installed from MELPA, so I don't > understand why it should need any special treatment. It probably isn't necessary at all and it could be removed. My guess is that it used to be necessary for [some reason] but [something] changed at [some point], but the snippet was kept anyway. I have CC'ed the maintainer Fabrice to find out if my guess is accurate. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2022 21:44: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 To: Stefan Kangas Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166535180627773 (code B ref 57639); Sun, 09 Oct 2022 21:44:01 +0000 Received: (at 57639) by debbugs.gnu.org; 9 Oct 2022 21:43:26 +0000 Received: from localhost ([127.0.0.1]:45038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohe4z-0007Dt-Ol for submit@debbugs.gnu.org; Sun, 09 Oct 2022 17:43:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]:32791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohe4x-0007De-Ee for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 17:43:23 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E81E2240103 for <57639@debbugs.gnu.org>; Sun, 9 Oct 2022 23:43:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665351797; bh=rTQDpCgd1aZ8TAzRJy60eHlCcvRXllbHVp38TNkacEQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=THsueke1c88zUxxxbFxYm/Vdzmy58vQyMhGR078EreeLpppy6CDbXutxd6cAwvtj7 laxAAs6ZVYFTwt2EDukfIcyqc5l7ECV6DKOuZFZulMhJcRjJebNCdL9ZoAZyzc1Sz5 FvRHClkfwYgNf6LjzrG34wHW557tKvDy0kYu0whf5z9rydYLbOc7k/OBqGrPPVPjpd k4/3iOVW/+BrR9xR0LiAbLdpbrxfiyWINFB4kCP0Qo1ihSpTgeJp/mnwS47XMhlUS6 osjXlIkaqKjHxPsWOmdTYEOo3LNaylpcFtTHyROLAx5U1oUMAbykRUoW93+5Y6UJD7 I0T0Gi2I3Qtbg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MlwX14Mb7z6tmJ; Sun, 9 Oct 2022 23:43:13 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87fsfw1zi4.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 09 Oct 2022 23:02:59 +0200") References: <875yhzmz25.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87fsfw1zi4.fsf@posteo.net> 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 Date: Sun, 09 Oct 2022 21:43:13 +0000 Message-ID: <87bkqk1xn2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > I have CC'ed the maintainer Fabrice to find out if my guess is accurate. It appears the email address mentioned in the package header doesn't actually exist. I'll contact him directly tomorrow to sort this out. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 00:58: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166536342313238 (code B ref 57639); Mon, 10 Oct 2022 00:58:02 +0000 Received: (at 57639) by debbugs.gnu.org; 10 Oct 2022 00:57:03 +0000 Received: from localhost ([127.0.0.1]:45135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohh6M-0003RS-Vx for submit@debbugs.gnu.org; Sun, 09 Oct 2022 20:57:03 -0400 Received: from mail-oi1-f180.google.com ([209.85.167.180]:41663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohh6H-0003Qu-As for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 20:57:01 -0400 Received: by mail-oi1-f180.google.com with SMTP id w196so5022470oiw.8 for <57639@debbugs.gnu.org>; Sun, 09 Oct 2022 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=DyH1h6owaZGC8pLJHw+rKwadlNWyE/9jwHQA/1+ecmo=; b=SmtPutD7QbZZJigUFBfX9EbVj335B8KdN3+GLJpOaAChIfK6ssx65deuE/ydvKH0OS 4JdAwl6b6rsNf5ywsNeapBEOvCuH95rsNDdbVxVHobj2KWkOZXTJzEXkE8Uwp/gyCr4Z YnyYMwmikOA23YztilQ0dBqAWFTFmpTPyOq+ANp988YojC5ncgaDa3nwgAH/5A6yMLg+ PFgIyYaTl6qU02i5SKATgCSg5oG81peRgvFob6aZtd5VRsmIWYWZjo0Gk0as1Ze5uOno QtP/5Q8kAu36NH/zsxIPmLbk5EhV7FdpIEBoX77aQigqx1FTjQHpmW0F59iTB1zBmwJ1 csZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=DyH1h6owaZGC8pLJHw+rKwadlNWyE/9jwHQA/1+ecmo=; b=qbmTny0j0cBm/9OPQmnWqyHTbBRkYDLHqFlaV/5fEvTe+VoSoPv8EJUE6nl/vkbzLS 7+zSUhlzmglCqzCuJWMixiUHNxHM/k2Qzmv91Xy3TLuAfGrvyg4JqhDHYw7AkOS/DBTf VTnrrrcjMJEaLLbAT1n8saAVukfxP6FmXqitAInjYtNG64fpFVhTqP5Ow4haTFF8yWeD i19I0JrP+gvGkhRmDXekFSbPMylruqXza/7rd0kP9AavOXrk5yeF4hIW/5JG3S2LZBDV w6vci+wbhHc74VGhKri7BHYdYHMlf1Kqy3FEOfN0dwC8Q9MnHDfGxp5d0nKNPPrtSCAm A4Xw== X-Gm-Message-State: ACrzQf15jlxa+v+25ml2aEmrU31Dlsv4N07ONKpOw8IiXaVPNghRp9yz WTIVdfJvgDPnDeZdQsrM/EzyMOWzCft0RM/faiE= X-Google-Smtp-Source: AMsMyM5gKHyVFfCq9b4jsGWw+yh5hc91cMSUjc+WExcoHdZxJamLU7ACSWhbGRVbS8PKpztDHjPyzqBRbveHa/O1go8= X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr13336621oil.199.1665363411553; Sun, 09 Oct 2022 17:56:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 10 Oct 2022 02:56:50 +0200 From: Stefan Kangas In-Reply-To: <87bkqk1xn2.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87fsfw1zi4.fsf@posteo.net> <87bkqk1xn2.fsf@posteo.net> X-Hashcash: 1:20:221010:57639@debbugs.gnu.org::KDKZYtECMRM4A0jd:4OKU MIME-Version: 1.0 Date: Mon, 10 Oct 2022 02:56:50 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Philip Kaludercic writes: > Philip Kaludercic writes: > >> I have CC'ed the maintainer Fabrice to find out if my guess is accurate. > > It appears the email address mentioned in the package header doesn't > actually exist. I'll contact him directly tomorrow to sort this out. I've managed to reach Fabrice through the leuven-themes bug tracker, so I'd start there. It would be good if we had a working email address in the library headers though. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 01:18: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 To: Stefan Kangas , Philip Kaludercic , Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166536467115127 (code B ref 57639); Mon, 10 Oct 2022 01:18:02 +0000 Received: (at 57639) by debbugs.gnu.org; 10 Oct 2022 01:17:51 +0000 Received: from localhost ([127.0.0.1]:45141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohhQU-0003vu-Vo for submit@debbugs.gnu.org; Sun, 09 Oct 2022 21:17:51 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:33781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohhQT-0003vg-6t for 57639@debbugs.gnu.org; Sun, 09 Oct 2022 21:17:49 -0400 Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id AC764240002; Mon, 10 Oct 2022 01:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1665364663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6beP27oewjsOuLR2rD5TL8CIv3cTL8LHxxCMlO9H09Q=; b=bPjk0wZLY1xPn4O6luKJWATbKUGKZbCKazP17PVb2vSFn6oCyCc3rNi089HcmzzzXYktQ0 NyqAs8NnM2TplobCdbUffjV5ddEgKZd/btktW60cv7vyNwYWq2lL4z02ZWyobtehU/4nbz CjmtctHQZfZbmcTi+ACHYJMjGweYGlOepdXPAcIG55umm20yg6wklBc6oor1KOF1SkxZNO F9lJnMRLJf0tY6yEYA9ant9QH/JVk0mqCn+BQ5iEvm9xxnj53VSXaNVLqIYYA6+6v11e/A KuokXt/y3K7s8wv4Q4M+HDEbgEHvBsX0gLnPVRKk83VxuoJVrDxa5ugiNKVisA== From: Protesilaos Stavrou In-Reply-To: References: <875yhzmz25.fsf@posteo.net> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> Date: Mon, 10 Oct 2022 04:17:38 +0300 Message-ID: <87v8os5vf1.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) > From: Stefan Kangas > Date: Sun, 9 Oct 2022 22:32:49 +0200 > > Philip Kaludercic writes: > >> --8<---------------cut here---------------start------------->8--- >> ;;;###autoload >> (when (and (boundp 'custom-theme-load-path) >> load-file-name) >> ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. >> (add-to-list 'custom-theme-load-path >> (file-name-as-directory (file-name-directory load-file-name)))) >> --8<---------------cut here---------------end--------------->8--- >> >> from leuven-theme.el to be removed. > > Why would the above be necessary for leuven-theme.el in particular? > > I've never had a problem loading themes installed from MELPA, so I don't > understand why it should need any special treatment. Note that the modus-themes.el have this: ;;;###autoload (when load-file-name (let ((dir (file-name-directory load-file-name))) (unless (equal dir (expand-file-name "themes/" data-directory)) (add-to-list 'custom-theme-load-path dir)))) It is (was?) necessary to make the theme available when installing with package.el (GNU ELPA). -- Protesilaos Stavrou https://protesilaos.com From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 08:15: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166538969224565 (code B ref 57639); Mon, 10 Oct 2022 08:15:02 +0000 Received: (at 57639) by debbugs.gnu.org; 10 Oct 2022 08:14:52 +0000 Received: from localhost ([127.0.0.1]:45854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnw4-0006O9-K6 for submit@debbugs.gnu.org; Mon, 10 Oct 2022 04:14:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnw3-0006Nw-Mr for 57639@debbugs.gnu.org; Mon, 10 Oct 2022 04:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fbQcYHGCptEbP/OFW6YkcwWFKyeDMfzGVPqFE3kR1x0=; b=tXyFS7rcMN/j5sE0Wo0WvGd5rx KsYvNvNhXNPLrdHrkSPw4962SICh8f32x1KsSTfNjxTaHy3J5Qhc5Np7XKLdEg/VZdIHqQ1CwcVWS 4UbKwvj+JgWnGc4Rxrl86Ad+R7euR1CPtLDltVPzc8UeJIzeg9N4BDPsTY9KIFzLPQGA=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohnvu-0006YR-FK; Mon, 10 Oct 2022 10:14:44 +0200 From: Lars Ingebrigtsen In-Reply-To: <87wn99114w.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 09 Oct 2022 15:13:03 +0000") References: <875yhzmz25.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUWBQxTFC7IqqD/ //8b8hccAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKCgc6HWokDt8AAAGQSURBVCjPNVI7bh0xDBwa 1CtSUQb3AUlvIMegADlAOq4h3cCNc4rkBnbxUqdIAr89pUcGvAuswBU5mo8AGY6PR/YSAOvgWxwR WRDFAprZob1qGKCS6zPCqq029sidaUlkRlroy1NEIOelPeM2noiDKuUUuImrEK3J3fcIef6LBT1z CvDjn9aAn+Uiii/HT0vU7VvGsE////QF/Zmn2unySAZZXjopnF6/kq94UxPcvD6SuW1DzfFw/UUJ tjs5ysO1kPGONG04HU2prI4iIsdxhVJXCeHGcYRTKYFxZjGpOHmYxfn3ZbWN8Ibo0bBB7lv0IkVL qQS2ieWDRkWrxBdR0caVPjULcrp3OD3sajVtANsY3DQzoYTUnG7mKbRqFEMfy20zjN01BvMIOh9b yWiNxGmISiQpzL05ffOoKnS5c5gR6mo2EgEHkuGZ6ZgA87Um00pnsQnmFHeewGugMHDAtnURmF5Z VyB2aoVNRryFCLzN1pWjRGFrSPqW77+UHjp1DV30acXKRVYRlcQyZlL7G1c+VmbbgwPeAAAAJXRF WHRkYXRlOmNyZWF0ZQAyMDIyLTEwLTEwVDA3OjU4OjI5KzAwOjAwCEP3NwAAACV0RVh0ZGF0ZTpt b2RpZnkAMjAyMi0xMC0xMFQwNzo1ODoyOSswMDowMHkeT4sAAAAASUVORK5CYII= X-Now-Playing: Sheila Chandra's _Nada Brahma_: "Question the Answer" Date: Mon, 10 Oct 2022 10:14:41 +0200 Message-ID: <87wn98nlhq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > The last issue preventing this patch from being merged is that > expressions marked for auto-loading are not gathered. I believe one > option was adding etc/themes to the list of scraped directories [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > The last issue preventing this patch from being merged is that > expressions marked for auto-loading are not gathered. I believe one > option was adding etc/themes to the list of scraped directories, but > that would require comments like > > ;;;###autoload > (when (and (boundp 'custom-theme-load-path) > load-file-name) > ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. > (add-to-list 'custom-theme-load-path > (file-name-as-directory (file-name-directory load-file-name)))) > > from leuven-theme.el to be removed. Ah, right. Well, we could come up with a special rule for etc/themes. For instance, we could use ;;;###theme-autoload (put ...) for these things, and add a function to loaddefs-gen that only fetched those for the Emacs build (it'd almost be trivial -- we just bind lisp-mode-autoload-regexp to ";;;###theme-autoload" and then point the scraping function at etc/themes). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 08:17: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 To: Protesilaos Stavrou Cc: Lars Ingebrigtsen , Eli Zaretskii , Stefan Kangas , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166538977524752 (code B ref 57639); Mon, 10 Oct 2022 08:17:02 +0000 Received: (at 57639) by debbugs.gnu.org; 10 Oct 2022 08:16:15 +0000 Received: from localhost ([127.0.0.1]:45861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnxP-0006R9-10 for submit@debbugs.gnu.org; Mon, 10 Oct 2022 04:16:15 -0400 Received: from mout01.posteo.de ([185.67.36.65]:42165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohnxN-0006Qx-HC for 57639@debbugs.gnu.org; Mon, 10 Oct 2022 04:16:14 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0703E240029 for <57639@debbugs.gnu.org>; Mon, 10 Oct 2022 10:16:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665389768; bh=G5GnNuMYw4H4SbNOwiLzjkvXMRjyGhcHFx0OrA8qnK0=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=W6SdtzJ4CgeSqwhvtiNU6w+T6bGwUFkgcAjTsqT9gTjQ9u8AS65Ci1WyuuQL5lJh9 kQBkp4wDI2G02cn9oNXJunXid2Yw7WGZMBQD05+mSogutiz6IAHKL27mCsAGrroNX7 yhzwS6fGGHfn6qpPLXSd9Xo3bglQNpM9o29eIym8jhDPVF7QII97Qc/s7lPzTEb86g fF9iTZyvDGEzVo4FZ8fL8GfhV9frwrExNOt82EQktTRtAs1SHrDlyTPQtLlDGQL8+X 3XBtJH5Ojq40mJut7MCZp2Xrbu0QsXAlWU0b+jEHhUP6CW3w6BhSOro9l6c9ug758s JXLMssjpk8y9Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MmBZG6MsWz6tmG; Mon, 10 Oct 2022 10:16:06 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87v8os5vf1.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Mon, 10 Oct 2022 04:17:38 +0300") References: <875yhzmz25.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87v8os5vf1.fsf@protesilaos.com> 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 Date: Mon, 10 Oct 2022 08:16:06 +0000 Message-ID: <87pmf0aybd.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Protesilaos Stavrou writes: >> From: Stefan Kangas >> Date: Sun, 9 Oct 2022 22:32:49 +0200 >> >> Philip Kaludercic writes: >> >>> --8<---------------cut here---------------start------------->8--- >>> ;;;###autoload >>> (when (and (boundp 'custom-theme-load-path) >>> load-file-name) >>> ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. >>> (add-to-list 'custom-theme-load-path >>> (file-name-as-directory (file-name-directory load-file-name)))) >>> --8<---------------cut here---------------end--------------->8--- >>> >>> from leuven-theme.el to be removed. >> >> Why would the above be necessary for leuven-theme.el in particular? >> >> I've never had a problem loading themes installed from MELPA, so I don't >> understand why it should need any special treatment. > > Note that the modus-themes.el have this: > > ;;;###autoload > (when load-file-name > (let ((dir (file-name-directory load-file-name))) > (unless (equal dir (expand-file-name "themes/" data-directory)) > (add-to-list 'custom-theme-load-path dir)))) > > It is (was?) necessary to make the theme available when installing with > package.el (GNU ELPA). I have just checked a few themes from MELPA, and they all include this snippet. And it appears rightfully, as package.el doesn't do any theme handling. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 11:03: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166539977126617 (code B ref 57639); Mon, 10 Oct 2022 11:03:02 +0000 Received: (at 57639) by debbugs.gnu.org; 10 Oct 2022 11:02:51 +0000 Received: from localhost ([127.0.0.1]:46237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohqYc-0006vE-IM for submit@debbugs.gnu.org; Mon, 10 Oct 2022 07:02:51 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohqYa-0006v0-5F for 57639@debbugs.gnu.org; Mon, 10 Oct 2022 07:02:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A254F240103 for <57639@debbugs.gnu.org>; Mon, 10 Oct 2022 13:02:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665399762; bh=z6xQQiAtNbWtk9YigflbrP86CfP4hrjJmxXMUiEit3U=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=o9A59sGa1VT0H3tIGGU1dFSSzpL7U5nXNfeKVS3LWjrESciFzB4+VQBRuMEPK2WHH bE6zwlfJhUr1/DmPV0KxlSrWpJgTLxcx4QZwtM0XopXG66GAkemE3vS4UB9vttcvhQ VF3u0X5A9Bv29f0iCuU8tKYrCBXOIc71cJF/VI3RIqtvWjLpxIKQzW4/fp2vpJk62m 4hELZs73N/NjX0qNru8qeF8ISK3IjGNkD4k2H+2dMh4RuotKnhiJ/YLvfV6FSSvjiH eGCglNPEivSS7eEvrdTmh8THEoh93gju9qmMDeDpKzasU+tEsqXevZh9wLACO8xGtS CefmupF7rf3mQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MmGGQ6fV3z9rxV; Mon, 10 Oct 2022 13:02:38 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87wn98nlhq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 10 Oct 2022 10:14:41 +0200") References: <875yhzmz25.fsf@posteo.net> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> 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 Date: Mon, 10 Oct 2022 11:02:37 +0000 Message-ID: <87lepo9c1e.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> The last issue preventing this patch from being merged is that >> expressions marked for auto-loading are not gathered. I believe one >> option was adding etc/themes to the list of scraped directories, but >> that would require comments like >> >> ;;;###autoload >> (when (and (boundp 'custom-theme-load-path) >> load-file-name) >> ;; Add theme folder to `custom-theme-load-path' when installing over MELPA. >> (add-to-list 'custom-theme-load-path >> (file-name-as-directory (file-name-directory load-file-name)))) >> >> from leuven-theme.el to be removed. > > Ah, right. > > Well, we could come up with a special rule for etc/themes. For > instance, we could use > > ;;;###theme-autoload (put ...) > > for these things, and add a function to loaddefs-gen that only fetched > those for the Emacs build (it'd almost be trivial -- we just bind > lisp-mode-autoload-regexp to ";;;###theme-autoload" and then point the > scraping function at etc/themes). I am not sure how that is done exactly, but if we take the ";;;###theme-autoload" approach it should be able to have a handler to convert autoloaded (defcustom ...) forms in to (put ...) ones: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Tag-themes-with-properties.patch >From 36505800b5a0c8d7b4af5ceb54483cfdfdbf6925 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. (Bug#57639) * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Handle 'defcustom's by extracting the properties. --- doc/emacs/custom.texi | 10 +++++ doc/lispref/customize.texi | 5 ++- etc/themes/adwaita-theme.el | 5 ++- etc/themes/deeper-blue-theme.el | 5 ++- etc/themes/dichromacy-theme.el | 5 ++- etc/themes/leuven-dark-theme.el | 8 +++- etc/themes/leuven-theme.el | 8 +++- etc/themes/light-blue-theme.el | 5 ++- etc/themes/manoj-dark-theme.el | 5 ++- etc/themes/misterioso-theme.el | 5 ++- etc/themes/tango-dark-theme.el | 7 +++- etc/themes/tango-theme.el | 6 ++- etc/themes/tsdh-dark-theme.el | 6 ++- etc/themes/tsdh-light-theme.el | 6 ++- etc/themes/wheatgrass-theme.el | 5 ++- etc/themes/whiteboard-theme.el | 5 ++- etc/themes/wombat-theme.el | 5 ++- lisp/custom.el | 70 ++++++++++++++++++++++++++++++--- lisp/emacs-lisp/loaddefs-gen.el | 6 +++ 19 files changed, 152 insertions(+), 25 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el index ba83a0578c..6ad8405559 100644 --- a/etc/themes/adwaita-theme.el +++ b/etc/themes/adwaita-theme.el @@ -21,10 +21,13 @@ ;;; Code: +;;;###theme-autoload (deftheme adwaita "Face colors similar to the default theme of Gnome 3 (Adwaita). The colors are chosen to match Adwaita window decorations and the -default look of the Gnome 3 desktop.") +default look of the Gnome 3 desktop." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el index 8f19147f91..48ed9ba061 100644 --- a/etc/themes/deeper-blue-theme.el +++ b/etc/themes/deeper-blue-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme deeper-blue - "Face colors using a deep blue background.") + "Face colors using a deep blue background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el index d53c075d92..fe44d520cc 100644 --- a/etc/themes/dichromacy-theme.el +++ b/etc/themes/dichromacy-theme.el @@ -21,6 +21,7 @@ ;;; Code: +;;;###theme-autoload (deftheme dichromacy "Face colors suitable for red/green color-blind users. The color palette is from B. Wong, Nature Methods 8, 441 (2011). @@ -28,7 +29,9 @@ dichromacy differentiated by individuals with protanopia or deuteranopia. Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and -Ansi-Color faces are included.") +Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) (orange "#e69f00") diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..08978a2668 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20221010.1208 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -93,11 +93,15 @@ leuven-dark-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..e712a79adf 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20221010.1209 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -74,11 +74,15 @@ leuven-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :kind 'color-scheme + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el index eeca46210c..808fcbfeb2 100644 --- a/etc/themes/light-blue-theme.el +++ b/etc/themes/light-blue-theme.el @@ -26,8 +26,11 @@ ;;; Code: +;;;###theme-autoload (deftheme light-blue - "Face colors utilizing a light blue background.") + "Face colors utilizing a light blue background." + :background-mode 'light + :kind 'color-scheme) (make-obsolete 'light-blue nil "29.1") diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index af5576386c..f9aaa97c25 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -64,10 +64,13 @@ ;;; Code: +;;;###theme-autoload (deftheme manoj-dark "Very high contrast faces with a black background. This theme avoids subtle color variations, while avoiding the -jarring angry fruit salad look to reduce eye fatigue.") +jarring angry fruit salad look to reduce eye fatigue." + :background-mode 'dark + :kind 'color-scheme) (custom-theme-set-faces 'manoj-dark diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el index 55186384ad..3fd6cdb5af 100644 --- a/etc/themes/misterioso-theme.el +++ b/etc/themes/misterioso-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme misterioso - "Predominantly blue/cyan faces on a dark cyan background.") + "Predominantly blue/cyan faces on a dark cyan background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..85995e4e99 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -27,10 +27,15 @@ ;;; Code: +;;;###theme-autoload (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :kind 'color-scheme + :family 'tango) + (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..2ac1b42294 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -27,10 +27,14 @@ ;;; Code: +;;;###theme-autoload (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..6b1e865e42 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -19,8 +19,12 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..ac964d66d6 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -19,9 +19,13 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el index c56c8a2d8a..20e7bbbac2 100644 --- a/etc/themes/wheatgrass-theme.el +++ b/etc/themes/wheatgrass-theme.el @@ -19,11 +19,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wheatgrass "High-contrast green/blue/brown faces on a black background. Basic, Font Lock, Isearch, Gnus, and Message faces are included. The default face foreground is wheat, with other faces in shades -of green, brown, and blue.") +of green, brown, and blue." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el index f21b18b421..2f86234b32 100644 --- a/etc/themes/whiteboard-theme.el +++ b/etc/themes/whiteboard-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme whiteboard - "Face colors similar to markers on a whiteboard.") + "Face colors similar to markers on a whiteboard." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el index d9fab8ac78..9bb026ead1 100644 --- a/etc/themes/wombat-theme.el +++ b/etc/themes/wombat-theme.el @@ -21,11 +21,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wombat "Medium-contrast faces with a dark gray background. Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces -are included.") +are included." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/lisp/custom.el b/lisp/custom.el index 604b1a3ff4..5aecbe6fe5 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,55 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to one of its a variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (let ((active-color-schemes + (seq-filter + (lambda (theme) + ;; FIXME: As most themes currently do not have a `:kind' + ;; tag, it is assumed that a theme is a color scheme by + ;; default. This should be reconsidered in the future. + (memq (plist-get (get theme 'theme-properties) :kind) + '(color-scheme nil))) + custom-enabled-themes))) + (cond + ((length= active-color-schemes 0) + (user-error "No theme is active, cannot toggle")) + ((length> active-color-schemes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car active-color-schemes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable))))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 964d23c770..e57024aee5 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -283,6 +283,12 @@ loaddefs-generate--make-autoload ,@(when-let ((safe (plist-get props :safe))) `((put ',varname 'safe-local-variable ,safe)))))) + ;; Extract theme properties + ((eq car 'deftheme) + (let* ((name (car-safe (cdr-safe form))) + (props (nthcdr 3 form))) + `(put ',name 'theme-properties (list ,@props)))) + ((eq car 'defgroup) ;; In Emacs this is normally handled separately by cus-dep.el, but for ;; third party packages, it can be convenient to explicitly autoload -- 2.37.3 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 00:26: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166544791919835 (code B ref 57639); Tue, 11 Oct 2022 00:26:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 00:25:19 +0000 Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi35D-00059r-2g for submit@debbugs.gnu.org; Mon, 10 Oct 2022 20:25:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi35B-00059c-BI for 57639@debbugs.gnu.org; Mon, 10 Oct 2022 20:25:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Fi0myjp6LbxnIt4Ns33AFgRuh+b2Yj3sHlEKFCcAA10=; b=qEnUF9hb67OZrWhECGoteibozy VKHRwfFrqOQ8P1gO8+hKRAws9rDf6BNHPNjYiZ5ozOytJkgcxD4412t8xONLo+p7V1W5cj46JrySu 8z428IM09c4EmqSbUIvi0V40U99vldTTfPrs6VRgsqEOEfBq1FMS8FlklBbun8TlFi+8=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oi350-00069y-Qp; Tue, 11 Oct 2022 02:25:10 +0200 From: Lars Ingebrigtsen In-Reply-To: <87lepo9c1e.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 10 Oct 2022 11:02:37 +0000") References: <875yhzmz25.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> X-Now-Playing: Metalheadz's _15 Years of Metalheadz_: "Swarm" Date: Tue, 11 Oct 2022 02:25:06 +0200 Message-ID: <87r0zfkxzx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > I am not sure how that is done exactly, but if we take the > ";;;###theme-autoload" approach it should be able to have a handler to > convert autoloaded (defcustom ...) forms in to (put ...) ones: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > I am not sure how that is done exactly, but if we take the > ";;;###theme-autoload" approach it should be able to have a handler to > convert autoloaded (defcustom ...) forms in to (put ...) ones: Yes. But as noted before, since many themes are distributed via ELPA (too), we can't really change the definition of deftheme. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 09:08: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16654792307650 (code B ref 57639); Tue, 11 Oct 2022 09:08:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 09:07:10 +0000 Received: from localhost ([127.0.0.1]:50881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiBED-0001zK-VZ for submit@debbugs.gnu.org; Tue, 11 Oct 2022 05:07:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiBEC-0001z7-1i for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 05:07:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7601924002A for <57639@debbugs.gnu.org>; Tue, 11 Oct 2022 11:06:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665479221; bh=VXEOcrZTKK5S4FBpXyPPsZ7Ab0dDBO1+HjwctN9fj+o=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=WBYjXk/bj0iMjf9F1G4aO569Jkx0xGHdBPN+fagQxkoTa7YMqCd7aNv5Nf6MrOk52 ni+0MBs6I1ORjG/Jlw5mgd+aJvvP4tmhy4rl9f1+Ac3npSWqU4tJLUlBFMVH59U3KE Nwrzuj0RvgZJa47jv2k1Lk/6MQ1lc+fdnIbIpBIEMqFCRnj/nhrakaGEL7kUmy1QmQ 1J5c0qLBkiZLIiKphiEpH8Be6wrZYCgNDhC8+z9gKwI5THjwYjeLmSLCE4oW4kLSGc LWVR5TxGVB/Et4f3B2MLmB9RYwiQxVlOTD/VKrZY+e7EmUgGT9lG+/7Q8quIhVRKWy dBzPVo0oRLmOw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MmqfR4zqXz9rxN; Tue, 11 Oct 2022 11:06:55 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87r0zfkxzx.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 11 Oct 2022 02:25:06 +0200") References: <875yhzmz25.fsf@posteo.net> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> 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 Date: Tue, 11 Oct 2022 09:06:54 +0000 Message-ID: <87pmeyg24x.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> I am not sure how that is done exactly, but if we take the >> ";;;###theme-autoload" approach it should be able to have a handler to >> convert autoloaded (defcustom ...) forms in to (put ...) ones: > > Yes. But as noted before, since many themes are distributed via ELPA > (too), we can't really change the definition of deftheme. The change to `deftheme' is only a feature of convenience, the backwards-compatibile way to set the attributes remains using `put'. In fact, that `put'-expression is exactly what `deftheme' expands to. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 19:45: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166551744226614 (code B ref 57639); Tue, 11 Oct 2022 19:45:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 19:44:02 +0000 Received: from localhost ([127.0.0.1]:54930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLAY-0006v1-A3 for submit@debbugs.gnu.org; Tue, 11 Oct 2022 15:44:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLAX-0006uU-30 for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 15:44:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8p+ulsA/e9Hqcw5J0v1ywtP9Fsvuw02ui2NyI3upQa0=; b=dg5LLfu9kFpfQjjf+3jeOEd5Re SP2sEa5dzOBJyDa9MHDtUarY3iA0YZu+qitkDzkFC8x5uME3yOTUXvNnvJqe47dYgYAY6To1qTH5L pSPcnf1IVQZcTEwhlb/SSWa+A488ECkbw8yQIQJApxoyuc6joE51ilLR2HUwVbdorJiE=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiLAN-0007it-MN; Tue, 11 Oct 2022 21:43:53 +0200 From: Lars Ingebrigtsen In-Reply-To: <87pmeyg24x.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 11 Oct 2022 09:06:54 +0000") References: <875yhzmz25.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWdVaZIIDK1p7Ks TFzWjmmuOIv///8BKnpWAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YKCxIyK88WF7AAAAGpSURBVDjL hZNLdsMgDEUFqedWCXPKaeehkAX4hAWYOtr/ViqRj2W3PdXAA671HvoAsAbqgP9BUKD8BbIG1jzP j1WBAOZ3qQhK5/gEURLaU2cFTJrnU2alcmhzBg0PDq9bEKERp1yz32VYaI0QX5M/7qUGWrCdEjpX 60VlBFgampK8eKyAz2FMaM7TWZSSkrLwwredJ8o7AIMAmqQhW2DuIOdSN/MwIODiWWraghl9o4ol ixL2ogPfKt5AkV710cYYQ5R4G3FEn5O7pj2Q/uZJ5nGTCrcJfowyj3xxU58h0D24VzLbpSAruVwV aMaTuLMUlyJgHmYGfIjUnEuZr1DuGTcwI3deEqRfTyDf5smJcwcwq0l5Irb2tLD5doQdnHcAaEnn 1oGYrxGpJr8woC2wwMBRcnkHINiaw4I9oyoQuZ+p94uGooDsyYDj8CswHXiCspEKvFif7SewwR6S 7WAjFW3kxR0f762o/yPXNgtwTgGZPXqUF9o3QN0qBiSMDV0H74/TviohA9sEnRG5bmBn9vDsYFJZ qwDD/fhKrCehPQ4n4wI3BAZ5O98nu3i0kMM+6AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMC0x MVQxODo1MDo0MyswMDowMG2cRNgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTAtMTFUMTg6NTA6 NDMrMDA6MDAcwfxkAAAAAElFTkSuQmCC X-Now-Playing: Kid Sister's _Ultra Violet_: "Switch Board (Feat DJ Gant-Man)" Date: Tue, 11 Oct 2022 21:43:51 +0200 Message-ID: <87edvef8nc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > The change to `deftheme' is only a feature of convenience, the > backwards-compatibile way to set the attributes remains using `put'. In > fact, that `put'-expression is exactly what `deftheme' expa [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > The change to `deftheme' is only a feature of convenience, the > backwards-compatibile way to set the attributes remains using `put'. In > fact, that `put'-expression is exactly what `deftheme' expands to. But your patch added altered the deftheme calls (and thereby making the themes non-backward-compatible) -- did you send the wrong patch? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 19:52: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16655179203538 (code B ref 57639); Tue, 11 Oct 2022 19:52:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 19:52:00 +0000 Received: from localhost ([127.0.0.1]:54952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLIF-0000uz-Mp for submit@debbugs.gnu.org; Tue, 11 Oct 2022 15:51:59 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLIB-0000ul-RU for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 15:51:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 11FA0240101 for <57639@debbugs.gnu.org>; Tue, 11 Oct 2022 21:51:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665517910; bh=286abr4hHyZ3pRL4Ed6psYxBO6RqmF6qz+8FHTS4zQE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=P5VaFR9yuyG067RjtDL4gofkaT65tdHDPZaqtRHRrnF1lyJte8JycDV9+t9WMRZjs VSyhNbIxqjo6qkTXXR8FxeKzxmNdpP53w2AvxLrvKIGh5UYvOaDjdi9l2KOQOaiLV7 DWMmk5mSarQjPpmrwZzpiK3EPgbuB+xkxg0SPKH5iRDYzPn25orAEoYje7TBtaK64i W2Vm/blW+XzF2IO5ef1fNSpPgQuhXavElx7PUi18cP4ExCYGYG9Z2OHO7nzHiHIXsD QTzb1u97Hz9a4ngm5xidTZghfTf6mWBihmv151LMDrdlh5RthWKgMmxlpEo52F5dOP cH9zLxsWmHzdA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mn5yY1qbbz6tmF; Tue, 11 Oct 2022 21:51:49 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87edvef8nc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 11 Oct 2022 21:43:51 +0200") References: <875yhzmz25.fsf@posteo.net> <87o7vbg56k.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> 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 Date: Tue, 11 Oct 2022 19:51:48 +0000 Message-ID: <871qre2l63.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> The change to `deftheme' is only a feature of convenience, the >> backwards-compatibile way to set the attributes remains using `put'. In >> fact, that `put'-expression is exactly what `deftheme' expands to. > > But your patch added altered the deftheme calls (and thereby making the > themes non-backward-compatible) -- did you send the wrong patch? No, but these themes are built-in, and to my knowledge not distributed on ELPA (or at least changes in emacs.git are not exported to ELPA. The Modus Themes are manually synchronised), so it shouldn't make any difference. If so, I'll revert the changes where necessary. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 20:05: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16655186694814 (code B ref 57639); Tue, 11 Oct 2022 20:05:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 20:04:29 +0000 Received: from localhost ([127.0.0.1]:54968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLUL-0001FZ-23 for submit@debbugs.gnu.org; Tue, 11 Oct 2022 16:04:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLUI-0001FK-HM for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 16:04:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YCWJDfEXGZI38s+5WhpwUpvGr9HZu5Zz/n20QyBEf7M=; b=hHbKSm6WDUYb7GnY8V5QYRtqwW P9easc9tuiV1JSGDfcXUiazVxl4M5OzqQ3yg2T1PihyCnATm5KEo0CJe21oOKhRP1VhC9Bag7lAfO FSZO+7xZoDI/Bne/7CeynEeLNf7KyLfkN5ih4MJEyTUfW7DTpN8S8vGNpOrVXvsyETSs=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiLU8-0007qz-9x; Tue, 11 Oct 2022 22:04:18 +0200 From: Lars Ingebrigtsen In-Reply-To: <871qre2l63.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 11 Oct 2022 19:51:48 +0000") References: <875yhzmz25.fsf@posteo.net> <874jx3ye41.fsf@gnus.org> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX8/PzV0danoqeC eoFeWV8YFhn///8p1eoYAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YKCxQDOf5/HfgAAAGjSURBVDjL pdTBepswDABgi+wBbHe9Y5nciYF7VuR7A9b7v0plpxiypfv2rbqhH0syBpT6/wAj8RwQ3TcK/yW0 tMSAErmH0ZLCAjnfMc3D4KCklVrVp9iOE82hjuS2Me2ZeelIrgEe5s9whSm1BRq61h0LtBDnVYFW L8zvR3Cewyr9gCuoApeJwwJGwSRlK3hiN5IAzurHERC94TQsedCfj4CXqQDojrnf58W4TJxuytML RW53kNskbhD8K9MBcCqwQhg6mlnvPWKKWWBcSSY8AHMROy5nIt4eVm4RbxmQFtnrAc4crxkGSgJp h4nPb7n/HNP8AK3vKK9IkeSGdd9GC6bsJFGSY142cDh0wxg5yYrkuEIjMEkRWUGRcJ1uR+B7JUpO +V8VbOnM/DbGVTXz51PXDfoNIl/70/YuaBv8eIcwplPfUb/toq6YfXtSFZQNOJY8U1BWjxuAveB9 wSLvYqMpthuEe5577fQJKsgp8fKa4QqXuWvqOYHxwTWDRGsdGkD81y8LXf6kUP8B1ljjzBOQMZTR T4t9CaC+CHj+K/k9PgDTYXalSdg47gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMC0xMVQyMDow Mzo1NyswMDowMOl7gaIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTAtMTFUMjA6MDM6NTcrMDA6 MDCYJjkeAAAAAElFTkSuQmCC X-Now-Playing: PJ Harvey's _The Peel Sessions 1991-2004_: "Sheela-Na-Gig (Peel 29.10.91)" Date: Tue, 11 Oct 2022 22:04:15 +0200 Message-ID: <875ygqf7pc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > No, but these themes are built-in, and to my knowledge not distributed > on ELPA (or at least changes in emacs.git are not exported to ELPA. The > Modus Themes are manually synchronised), so it shou [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > No, but these themes are built-in, and to my knowledge not distributed > on ELPA (or at least changes in emacs.git are not exported to ELPA. The > Modus Themes are manually synchronised), so it shouldn't make any > difference. If so, I'll revert the changes where necessary. Ah, OK, then that's fine. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 20:10: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16655189975290 (code B ref 57639); Tue, 11 Oct 2022 20:10:01 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 20:09:57 +0000 Received: from localhost ([127.0.0.1]:54973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLZc-0001NG-Pu for submit@debbugs.gnu.org; Tue, 11 Oct 2022 16:09:57 -0400 Received: from mout01.posteo.de ([185.67.36.65]:57489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLZX-0001Mz-Kd for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 16:09:55 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 22E0A240029 for <57639@debbugs.gnu.org>; Tue, 11 Oct 2022 22:09:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665518986; bh=nbNjqLGUZ+wcJk1XCw9E4XBqi1p11JaeQbTElXyXUdI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=YOymIJS5gOuRdg0tj3BFhndBpdL03so/F6lwXcirrgOhzDoipflcVQe2fmhr5Uvku DHlCS3Deu0d+pC/vC+/+6RTbdZfBlh6mVcYc9PIHLnj6S/Y9zB1IuAutoKTsI6I/9/ vpCUFGHRNxiPEUBsCD83AjBgPYIn/CvatVuWQNTjz0X0KQ2CPgwrXzgiiM1QT+1bi1 W+IqdqOaQzOnUMG/zqvB/9/TsQlPwIlNqaM7a583k2ihm74Hrl1oAt8IBKsMCVZlJK Z5md7Ybe0G+rrn2qrE+M68WzW4Vpdzf7FazV+5Nt2pggpPYjuM+jIgVfxmOKNgfo8O Zwgc+PVfyLxPw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mn6MD07dGz6tmB; Tue, 11 Oct 2022 22:09:43 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <875ygqf7pc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 11 Oct 2022 22:04:15 +0200") References: <875yhzmz25.fsf@posteo.net> <87bkrbfz8l.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> 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 Date: Tue, 11 Oct 2022 20:09:42 +0000 Message-ID: <87r0ze15rt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> No, but these themes are built-in, and to my knowledge not distributed >> on ELPA (or at least changes in emacs.git are not exported to ELPA. The >> Modus Themes are manually synchronised), so it shouldn't make any >> difference. If so, I'll revert the changes where necessary. > > Ah, OK, then that's fine. Great, can you point me to the places I would have to make changes for this to work: add a function to loaddefs-gen that only fetched those for the Emacs build (it'd almost be trivial -- we just bind lisp-mode-autoload-regexp to ";;;###theme-autoload" and then point the scraping function at etc/themes). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 20:50: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16655213569401 (code B ref 57639); Tue, 11 Oct 2022 20:50:02 +0000 Received: (at 57639) by debbugs.gnu.org; 11 Oct 2022 20:49:16 +0000 Received: from localhost ([127.0.0.1]:54990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiMBf-0002RY-LP for submit@debbugs.gnu.org; Tue, 11 Oct 2022 16:49:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiMBc-0002RK-E2 for 57639@debbugs.gnu.org; Tue, 11 Oct 2022 16:49:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=D4A97KWdJVWX5CQozlEPcuwcAEXsb9fQpkL8gfxVQ3E=; b=G1jXSycTgBeSMREQ527fZZ2IyR orq3n+fMsfTj+kHehLY/br2l53xQXunkEs5/vuptqpznefCtj51FsMglwCYbJLuSXdXLrZtIZFifP /kcZz0GROKMIMOa+6tvkgOa09KfIWIGGrUQORhcXa00TLygzFcWMCUPh2/f+VusSCEz4=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiMBS-0008A7-Id; Tue, 11 Oct 2022 22:49:04 +0200 From: Lars Ingebrigtsen In-Reply-To: <87r0ze15rt.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 11 Oct 2022 20:09:42 +0000") References: <875yhzmz25.fsf@posteo.net> <871qs5lpo2.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX17dH+/u+4saGH g3hfXFUjIR3///9GvcUgAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YKCxQoH1oCZWwAAAGpSURBVDjL bZNrtqQgDISB2QDOChBmAV6C/+9I2EAL+9/KVHxc0TGHo0e+DklVaKXOGPawspSW9RLW6ncwDOoN YEsDYOmzjpZPq47vc3//1Q7sC9CD3YEVYv0Z7ngdxW3imJjnib4pE6X0pX7aO45zRhnjnVYmkCcJ p8j7sRPiaW4Sn4DH3w4oFcoJageM98oL+vhWuQPebO2lthiArws0jnvn0RS+AcSyg0DpDWwx3kDF DpUleG/0Dawh+lSW0uIjI+fApQHkR41KXEubSuNeh2QwUanT/AJimOtLRoXGP9UlJHY1mJm8Mz76 8LD98IoJXfVHEUMgR4gojVIHoGD1MqpYyh1IcZlUZL4J3KYnrS0A/u6VpFReEhp72M44qzpclr7G llEqNMz/mQhT4Psk7T7clXE0mEixK16wHTjPAqLpMuBTgnaZx3rraruHWQCFm7sBdpQM6kIj+nHX KpgKENuqpPhwAfEJunNwMFiNd1BbNnIZxl9PsBjUmD8mPMCCjpvL+DvoC0BzNglTmcbg3XC1y2Ux uBAAv6m7uzgqq1lGuOpg3HWU+gcu6KSWiQHMBAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMC0x MVQyMDo0MDozMSswMDowMBcqdZ4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTAtMTFUMjA6NDA6 MzErMDA6MDBmd80iAAAAAElFTkSuQmCC X-Now-Playing: David Harrow's _The Succession_: "Without Sin" Date: Tue, 11 Oct 2022 22:49:01 +0200 Message-ID: <871qref5mq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > Great, can you point me to the places I would have to make changes for > this to work: > > add a function to loaddefs-gen that only fetched those for the > Emacs build (it'd almost be trivial -- we [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > Great, can you point me to the places I would have to make changes for > this to work: > > add a function to loaddefs-gen that only fetched those for the > Emacs build (it'd almost be trivial -- we just bind > lisp-mode-autoload-regexp to ";;;###theme-autoload" and then > point the scraping function at etc/themes). I think you'd basically put something like the following into `loaddefs-generate--emacs-batch' -- (let ((lisp-mode-autoload-regexp "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) (loaddefs-generate (expand-file-name "../etc/themes/" lisp-directory) (expand-file-name "theme-loaddefs.el" lisp-directory))) Then you have to teach `loaddefs-generate--make-autoload' to generate the correct forms as a result of the `deftheme' -- which should be some `put's. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 08:51: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16656510484631 (code B ref 57639); Thu, 13 Oct 2022 08:51:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 08:50:48 +0000 Received: from localhost ([127.0.0.1]:59494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oitvS-0001Cc-QL for submit@debbugs.gnu.org; Thu, 13 Oct 2022 04:50:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]:55101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oitvP-0001CM-Lc for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 04:50:45 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B33CB240104 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 10:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665651037; bh=qVUKTtG+mEuEoIL8KkBWchsXOlSxjTUoePMsu1bnnv8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=JfVe0t4LU4SuVa5xh2fJQPsq/7YVkX0OY5mHxSEhZw9Hj3Tapb1IV7i+sLnu1mKTj bvPGq0Y/Wp+MV4mNr38gCdA3V5QKb4bWXLq4d+gxFIA9gIcdMmbmp2GjcHjCIXB0pK bfStHlze2C73RVz3tBlm7HFVZ39RJp7+/fcz+f1q64obUsgotf+SZz73O4uNYXzALA y8X/L8zwvTnXbsQAxLvl96pJ3SVK3dr3t34YKR00+djMB10/LcUZLqXoy9ImWkrav9 nAGlr46K3ayC8zwGflRmuFWgMXLVl+SbOpeDxDG/3Iz6JWrv8uOIyOzhrqNN4/rf3u pFLqC8BW/9hsQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mp3Bg5vKQz6tmb; Thu, 13 Oct 2022 10:50:35 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <871qref5mq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 11 Oct 2022 22:49:01 +0200") References: <875yhzmz25.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> 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 Date: Thu, 13 Oct 2022 08:50:34 +0000 Message-ID: <875ygohztx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> Great, can you point me to the places I would have to make changes for >> this to work: >> >> add a function to loaddefs-gen that only fetched those for the >> Emacs build (it'd almost be trivial -- we just bind >> lisp-mode-autoload-regexp to ";;;###theme-autoload" and then >> point the scraping function at etc/themes). > > I think you'd basically put something like the following into > `loaddefs-generate--emacs-batch' -- > > (let ((lisp-mode-autoload-regexp > "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) > (loaddefs-generate > (expand-file-name "../etc/themes/" lisp-directory) > (expand-file-name "theme-loaddefs.el" lisp-directory))) > > Then you have to teach `loaddefs-generate--make-autoload' to generate > the correct forms as a result of the `deftheme' -- which should be some > `put's. OK, it looks like this worked. Just to recap, these are the proposed changes: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Tag-themes-with-properties.patch >From 5436a1b7d1bac4d55770cd84cbef545bfdd930b3 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * etc/themes/modus-operandi-theme.el: Add properties. * etc/themes/modus-vivendi-theme.el: Add properties. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. (Bug#57639) * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Handle 'defcustom's by extracting the properties. --- doc/emacs/custom.texi | 10 +++++ doc/lispref/customize.texi | 5 ++- etc/themes/adwaita-theme.el | 5 ++- etc/themes/deeper-blue-theme.el | 5 ++- etc/themes/dichromacy-theme.el | 5 ++- etc/themes/leuven-dark-theme.el | 8 +++- etc/themes/leuven-theme.el | 8 +++- etc/themes/light-blue-theme.el | 5 ++- etc/themes/manoj-dark-theme.el | 5 ++- etc/themes/misterioso-theme.el | 5 ++- etc/themes/modus-operandi-theme.el | 2 + etc/themes/modus-vivendi-theme.el | 2 + etc/themes/tango-dark-theme.el | 7 ++- etc/themes/tango-theme.el | 6 ++- etc/themes/tsdh-dark-theme.el | 6 ++- etc/themes/tsdh-light-theme.el | 6 ++- etc/themes/wheatgrass-theme.el | 5 ++- etc/themes/whiteboard-theme.el | 5 ++- etc/themes/wombat-theme.el | 5 ++- lisp/custom.el | 70 +++++++++++++++++++++++++++--- lisp/emacs-lisp/loaddefs-gen.el | 6 +++ 21 files changed, 156 insertions(+), 25 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..911b6c4d75 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,13 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el index ba83a0578c..6ad8405559 100644 --- a/etc/themes/adwaita-theme.el +++ b/etc/themes/adwaita-theme.el @@ -21,10 +21,13 @@ ;;; Code: +;;;###theme-autoload (deftheme adwaita "Face colors similar to the default theme of Gnome 3 (Adwaita). The colors are chosen to match Adwaita window decorations and the -default look of the Gnome 3 desktop.") +default look of the Gnome 3 desktop." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el index 8f19147f91..48ed9ba061 100644 --- a/etc/themes/deeper-blue-theme.el +++ b/etc/themes/deeper-blue-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme deeper-blue - "Face colors using a deep blue background.") + "Face colors using a deep blue background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el index d53c075d92..fe44d520cc 100644 --- a/etc/themes/dichromacy-theme.el +++ b/etc/themes/dichromacy-theme.el @@ -21,6 +21,7 @@ ;;; Code: +;;;###theme-autoload (deftheme dichromacy "Face colors suitable for red/green color-blind users. The color palette is from B. Wong, Nature Methods 8, 441 (2011). @@ -28,7 +29,9 @@ dichromacy differentiated by individuals with protanopia or deuteranopia. Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and -Ansi-Color faces are included.") +Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) (orange "#e69f00") diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..08978a2668 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20221010.1208 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -93,11 +93,15 @@ leuven-dark-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..e712a79adf 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20221010.1209 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -74,11 +74,15 @@ leuven-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :kind 'color-scheme + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el index eeca46210c..808fcbfeb2 100644 --- a/etc/themes/light-blue-theme.el +++ b/etc/themes/light-blue-theme.el @@ -26,8 +26,11 @@ ;;; Code: +;;;###theme-autoload (deftheme light-blue - "Face colors utilizing a light blue background.") + "Face colors utilizing a light blue background." + :background-mode 'light + :kind 'color-scheme) (make-obsolete 'light-blue nil "29.1") diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index af5576386c..f9aaa97c25 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -64,10 +64,13 @@ ;;; Code: +;;;###theme-autoload (deftheme manoj-dark "Very high contrast faces with a black background. This theme avoids subtle color variations, while avoiding the -jarring angry fruit salad look to reduce eye fatigue.") +jarring angry fruit salad look to reduce eye fatigue." + :background-mode 'dark + :kind 'color-scheme) (custom-theme-set-faces 'manoj-dark diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el index 55186384ad..3fd6cdb5af 100644 --- a/etc/themes/misterioso-theme.el +++ b/etc/themes/misterioso-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme misterioso - "Predominantly blue/cyan faces on a dark cyan background.") + "Predominantly blue/cyan faces on a dark cyan background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index 6e609c0803..0f0630a6d1 100644 --- a/etc/themes/modus-operandi-theme.el +++ b/etc/themes/modus-operandi-theme.el @@ -71,4 +71,6 @@ (provide-theme 'modus-operandi)) +;;;###theme-autoload (put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus)) + ;;; modus-operandi-theme.el ends here diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index 0983e26c78..02c2d9e129 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -71,4 +71,6 @@ (provide-theme 'modus-vivendi)) +;;;###theme-autoload (put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus)) + ;;; modus-vivendi-theme.el ends here diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..85995e4e99 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -27,10 +27,15 @@ ;;; Code: +;;;###theme-autoload (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :kind 'color-scheme + :family 'tango) + (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..2ac1b42294 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -27,10 +27,14 @@ ;;; Code: +;;;###theme-autoload (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..6b1e865e42 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -19,8 +19,12 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..ac964d66d6 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -19,9 +19,13 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el index c56c8a2d8a..20e7bbbac2 100644 --- a/etc/themes/wheatgrass-theme.el +++ b/etc/themes/wheatgrass-theme.el @@ -19,11 +19,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wheatgrass "High-contrast green/blue/brown faces on a black background. Basic, Font Lock, Isearch, Gnus, and Message faces are included. The default face foreground is wheat, with other faces in shades -of green, brown, and blue.") +of green, brown, and blue." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el index f21b18b421..2f86234b32 100644 --- a/etc/themes/whiteboard-theme.el +++ b/etc/themes/whiteboard-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme whiteboard - "Face colors similar to markers on a whiteboard.") + "Face colors similar to markers on a whiteboard." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el index d9fab8ac78..9bb026ead1 100644 --- a/etc/themes/wombat-theme.el +++ b/etc/themes/wombat-theme.el @@ -21,11 +21,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wombat "Medium-contrast faces with a dark gray background. Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces -are included.") +are included." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/lisp/custom.el b/lisp/custom.el index 604b1a3ff4..5aecbe6fe5 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,55 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +If the optional argument LIST is not given, " + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Prompt to switch from the current theme to one of its a variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (let ((active-color-schemes + (seq-filter + (lambda (theme) + ;; FIXME: As most themes currently do not have a `:kind' + ;; tag, it is assumed that a theme is a color scheme by + ;; default. This should be reconsidered in the future. + (memq (plist-get (get theme 'theme-properties) :kind) + '(color-scheme nil))) + custom-enabled-themes))) + (cond + ((length= active-color-schemes 0) + (user-error "No theme is active, cannot toggle")) + ((length> active-color-schemes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car active-color-schemes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable))))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 964d23c770..e57024aee5 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -283,6 +283,12 @@ loaddefs-generate--make-autoload ,@(when-let ((safe (plist-get props :safe))) `((put ',varname 'safe-local-variable ,safe)))))) + ;; Extract theme properties + ((eq car 'deftheme) + (let* ((name (car-safe (cdr-safe form))) + (props (nthcdr 3 form))) + `(put ',name 'theme-properties (list ,@props)))) + ((eq car 'defgroup) ;; In Emacs this is normally handled separately by cus-dep.el, but for ;; third party packages, it can be convenient to explicitly autoload -- 2.37.3 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Handle-theme-autoload-comments-in-etc-themes.patch >From a9bc4ba6b07aef118f05022486f9fc10a0e41e64 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 13 Oct 2022 10:43:36 +0200 Subject: [PATCH] Handle ;;;###theme-autoload comments in etc/themes * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch): Extract the autoloads and have them loaded along with loaddefs.el. --- lisp/emacs-lisp/loaddefs-gen.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index e57024aee5..39eec87f72 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -736,7 +736,15 @@ loaddefs-generate--emacs-batch ;; updated. (file-newer-than-file-p (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) - output-file)))) + output-file))) + (let ((lisp-mode-autoload-regexp + "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)") + (output-file )) + (loaddefs-generate + (expand-file-name "../etc/themes/" lisp-directory) + (expand-file-name "theme-loaddefs.el" lisp-directory)))) + +;;;###autoload (load "theme-loaddefs.el") (provide 'loaddefs-gen) -- 2.37.3 --=-=-= Content-Type: text/plain Note that this includes changes to both the Leuven and Modus themes. --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 09:11: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166565221015050 (code B ref 57639); Thu, 13 Oct 2022 09:11:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 09:10:10 +0000 Received: from localhost ([127.0.0.1]:59531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiuEE-0003ue-CV for submit@debbugs.gnu.org; Thu, 13 Oct 2022 05:10:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiuEC-0003uO-EU for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 05:10:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6F56524002B for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 11:10:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665652202; bh=ZYqgKBUHvZTLj68hOVsfRc/TmWx7oZWvtUBlPOH8k2I=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=IwgKlksi9NyQQ+7cSNEke5Vbo0y1npWnYRgOY8Jl3q0QFogEdM9SDAc5y/l2ywMCO g1K0nmQ3rOWc/kv6pQH1rgAK+WUI7xPTZfT80dLbOeSJVb1mNu1qMqTlWFUMco6Qfl OGE7gZXGEHrYPY4N4CK09dmofYaCxvc4tc3SIgH1TmL8BPLVhyLQHcSnaT4gjyzdxP SP32ILNTPrMdp+ZCRwbCJK7w+FSGoHv7Z5+JisbK8PZVEA+NB/II3UJ0w9J8KRrMLI JKCCVMXuMSsZrykkjEKTXHb5xuS2gWrKMhHYWyio9Zco27zOVH1sXBPcVtifnzLG9B kGdSQ33wLSQnQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mp3d432Drz6tmb; Thu, 13 Oct 2022 11:10:00 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <875ygohztx.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 13 Oct 2022 10:50:34 +0200") References: <875yhzmz25.fsf@posteo.net> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> 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 Date: Thu, 13 Oct 2022 09:10:00 +0000 Message-ID: <87lepkgkd3.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 a9bc4ba6b07aef118f05022486f9fc10a0e41e64 Mon Sep 17 00:00:00 2001 > From: Philip Kaludercic > Date: Thu, 13 Oct 2022 10:43:36 +0200 > Subject: [PATCH] Handle ;;;###theme-autoload comments in etc/themes > > * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch): > Extract the autoloads and have them loaded along with loaddefs.el. > --- > lisp/emacs-lisp/loaddefs-gen.el | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el > index e57024aee5..39eec87f72 100644 > --- a/lisp/emacs-lisp/loaddefs-gen.el > +++ b/lisp/emacs-lisp/loaddefs-gen.el > @@ -736,7 +736,15 @@ loaddefs-generate--emacs-batch > ;; updated. > (file-newer-than-file-p > (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) > - output-file)))) > + output-file))) > + (let ((lisp-mode-autoload-regexp > + "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)") > + (output-file )) I have just noticed that this variable was not used and have removed it locally. > + (loaddefs-generate > + (expand-file-name "../etc/themes/" lisp-directory) > + (expand-file-name "theme-loaddefs.el" lisp-directory)))) > + > +;;;###autoload (load "theme-loaddefs.el") > > (provide 'loaddefs-gen) From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 10:35: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 To: Philip Kaludercic Cc: larsi@gnus.org, 57639@debbugs.gnu.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166565726824290 (code B ref 57639); Thu, 13 Oct 2022 10:35:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 10:34:28 +0000 Received: from localhost ([127.0.0.1]:59690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oivXo-0006Ji-2W for submit@debbugs.gnu.org; Thu, 13 Oct 2022 06:34:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oivXl-0006JQ-Tx for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 06:34:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oivXg-0008EV-MH; Thu, 13 Oct 2022 06:34:20 -0400 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=PGqkkAftZcehbGHxszVknjdkxpAoR8Fcl66faz+WSfs=; b=OA1x9/FD3Ox8 rHhZfBy06AzoCXukx38u43APDyhedmMv++F/EnSrt2fu4plCMsGqawDyMTiai1gcuFdwJf9as2JVL dT5JWE/bAWWWAFozB58vRC7oO+QfHEWSHG4+V0qJ52z8I6dovLWwPoS8OeRzaWFHEYZAsdnI7NNRz 4w5LIg5wr57blb19+O+Wk8k7pOrsoLR31dFCU266OAOWwk94NOHjH984NfF7fFY0FqR1awOT32PHY 3viVlcXrHxF+aZeo8pElCTY2pNsdB1tfDv/aZvHQDK21W0kIfggiMvrEfRM9pdPh3NdAg66xjEbRY riyI/Ts+rIDnECHJCLNijw==; Received: from [87.69.77.57] (port=3139 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 1oivXW-0005rX-R4; Thu, 13 Oct 2022 06:34:19 -0400 Date: Thu, 13 Oct 2022 13:34:25 +0300 Message-Id: <83tu489fm6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875ygohztx.fsf@posteo.net> (message from Philip Kaludercic on Thu, 13 Oct 2022 08:50:34 +0000) References: <875yhzmz25.fsf@posteo.net> <87mtatagzv.fsf@gnus.org> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> X-Spam-Score: -2.3 (--) 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: Philip Kaludercic > Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos > Stavrou > Date: Thu, 13 Oct 2022 08:50:34 +0000 > > Lars Ingebrigtsen writes: > > > Philip Kaludercic writes: > > > >> Great, can you point me to the places I would have to make changes for > >> this to work: > >> > >> add a function to loaddefs-gen that only fetched those for the > >> Emacs build (it'd almost be trivial -- we just bind > >> lisp-mode-autoload-regexp to ";;;###theme-autoload" and then > >> point the scraping function at etc/themes). > > > > I think you'd basically put something like the following into > > `loaddefs-generate--emacs-batch' -- > > > > (let ((lisp-mode-autoload-regexp > > "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) > > (loaddefs-generate > > (expand-file-name "../etc/themes/" lisp-directory) > > (expand-file-name "theme-loaddefs.el" lisp-directory))) > > > > Then you have to teach `loaddefs-generate--make-autoload' to generate > > the correct forms as a result of the `deftheme' -- which should be some > > `put's. > > OK, it looks like this worked. Just to recap, these are the proposed > changes: What, if anything, does this mean for themes that aren't bundled with Emacs? Also, this needs a NEWS entry. Thanks. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 10:37: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 To: Eli Zaretskii Cc: larsi@gnus.org, 57639@debbugs.gnu.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166565736724469 (code B ref 57639); Thu, 13 Oct 2022 10:37:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 10:36:07 +0000 Received: from localhost ([127.0.0.1]:59695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oivZO-0006Ma-Ij for submit@debbugs.gnu.org; Thu, 13 Oct 2022 06:36:06 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oivZJ-0006Lz-GQ for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 06:36:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A0E73240104 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 12:35:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665657355; bh=aLyEI0LUKDN7Oloi8aFFh5jIYtDfBfxZYR5RvaamG+c=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=B+NvKHFNknKCYlO9PzZXfbv3tUTISVSnyANj9JgXCAqLpXhXuwVQvN9G/erCL6uVG CWcp++cTQXphks/eV6UTRzQSbq9l2trjfNfdRt9ewwFYRiiSWOMyFqh0IzUFtUcNZS 0ZLxxAtw7eOIwHGtUeqEUJaIeGXg6TIjrtSZmItWQbfeRniI0uehpx4cqk3r20sGO5 vfXM6n550EEBKUFQWvsp8eDdJvotkGuUXMHDhaMszT3PDP4tuK0AfAd10/wXSdE8XB uaJvlsIYDeXbyUI9GQ2ZhDsCdhoeiPSePj00AUdISh7ZkMljUhVlRhNnvY5/SNcT20 O6CAB5G56X4Gg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mp5X73F5tz6tmp; Thu, 13 Oct 2022 12:35:51 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83tu489fm6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 13 Oct 2022 13:34:25 +0300") References: <875yhzmz25.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> 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 Date: Thu, 13 Oct 2022 10:35:51 +0000 Message-ID: <8735bs3ta0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos >> Stavrou >> Date: Thu, 13 Oct 2022 08:50:34 +0000 >> >> Lars Ingebrigtsen writes: >> >> > Philip Kaludercic writes: >> > >> >> Great, can you point me to the places I would have to make changes for >> >> this to work: >> >> >> >> add a function to loaddefs-gen that only fetched those for the >> >> Emacs build (it'd almost be trivial -- we just bind >> >> lisp-mode-autoload-regexp to ";;;###theme-autoload" and then >> >> point the scraping function at etc/themes). >> > >> > I think you'd basically put something like the following into >> > `loaddefs-generate--emacs-batch' -- >> > >> > (let ((lisp-mode-autoload-regexp >> > "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) >> > (loaddefs-generate >> > (expand-file-name "../etc/themes/" lisp-directory) >> > (expand-file-name "theme-loaddefs.el" lisp-directory))) >> > >> > Then you have to teach `loaddefs-generate--make-autoload' to generate >> > the correct forms as a result of the `deftheme' -- which should be some >> > `put's. >> >> OK, it looks like this worked. Just to recap, these are the proposed >> changes: > > What, if anything, does this mean for themes that aren't bundled with > Emacs? Nothing for now, but I could add support for package.el. > Also, this needs a NEWS entry. Yes, thanks for the reminder. > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 13 09:48:16 2022 Received: (at control) by debbugs.gnu.org; 13 Oct 2022 13:48:16 +0000 Received: from localhost ([127.0.0.1]:60093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyZM-0005L4-Dk for submit@debbugs.gnu.org; Thu, 13 Oct 2022 09:48:16 -0400 Received: from mail-ot1-f47.google.com ([209.85.210.47]:39763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyZG-0005Hn-4h for control@debbugs.gnu.org; Thu, 13 Oct 2022 09:48:10 -0400 Received: by mail-ot1-f47.google.com with SMTP id br15-20020a056830390f00b0061c9d73b8bdso64612otb.6 for ; Thu, 13 Oct 2022 06:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=0iyCEuHXlFAReOjRcK3GlPg6Z2USLdcjONLujBKzC2Y=; b=gagg4MTLyh2npdI+Owth2AZ7pTB/p3UCOHo9qM16jiKsrT6q4fKI+3bCj3dH3uwTEz +HtVqB9OlWqOOpVhXT838mnJBdzYXEc0evsVtgtHWuEB/6PoEHNc82dCARCC0GdNbXLq 5FCVIXoHNZA4oJiULoqd4JT+2je2YRe5ga45PmQOpJHl7/iJ+WKpSpEQYOMEJS8YSVMX 6nJYW7v32UrQm+AFnlbnO9VsaE+UMNGnMT6wKKA6cjiAf5svdR9TatfiF1y8prwfV9p7 pfZDefwN1rVtbY2uKRKz00wnJsgrfXg0lyMZWEpbatPIi2MfVB9rT2UlJu9crJ+Ct5H5 gx6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0iyCEuHXlFAReOjRcK3GlPg6Z2USLdcjONLujBKzC2Y=; b=p8ImLndsT601wtUUGjuiWBUyYuV9P0shqcuxPhhk5E0ZLIp0NGa5BZ09bMaCd5moqi Z84VzbKsPIGwT1NqOO+F2FS7vwQBOSuryzZiQS7MwHV419vLJjcpeSfESVKGLkykMdeW 87i0aHgGIig6ap70vnPrWJrxaEFEL2/j8fTnER2JnqRtJZmXzayzFyQkf4GQfpuc2uuD 4PLha1NP0z74yLS+T2/4ywHIR/xZKP8s7JCLfDE0YIlTYVp6nEvlhswGHZHmIovibOi8 HUGRYv2xycQD3O7VbpmoMkzIBd1uLSP0n0PgiD5qLk+0b0hMoxRQ2G5TuM7ti4K6vwh8 ByoQ== X-Gm-Message-State: ACrzQf1WG5A0OA2qYjmrjU2uIO5lulDugSUKVhdmCS9UOa/72OqbHaqD NmbzmwZkaXmmIhBCRkLZhMKHIkwZmjqro+qDxz5F+Oh+ X-Google-Smtp-Source: AMsMyM4vEdBJX0N3FynSMnCP2JF3DFeDdR2ymCogKCoLPLBJWxCLOGj1yV+dPIbYtXHAd4sON1iMY5+d85vpzHdiZyE= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr28874otc.105.1665668884699; Thu, 13 Oct 2022 06:48:04 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Oct 2022 15:48:04 +0200 From: Stefan Kangas X-Hashcash: 1:20:221013:control@debbugs.gnu.org::s9ZslXFOaxUbNquk:1E4s MIME-Version: 1.0 Date: Thu, 13 Oct 2022 15:48:04 +0200 Message-ID: Subject: control message for bug #57639 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) severity 57639 wishlist quit From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 14:05: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 To: Philip Kaludercic , Eli Zaretskii Cc: larsi@gnus.org, 57639@debbugs.gnu.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.1665669842951 (code B ref 57639); Thu, 13 Oct 2022 14:05:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 14:04:02 +0000 Received: from localhost ([127.0.0.1]:34390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyoc-0000F6-Co for submit@debbugs.gnu.org; Thu, 13 Oct 2022 10:04:02 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:43614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiyoa-0000EN-8z for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 10:04:01 -0400 Received: by mail-oi1-f182.google.com with SMTP id g10so1806421oif.10 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 07:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=ldRNECwmyVYmtHVoMDj1DnMCl/QNLLE2PPJqePgu5/A=; b=lLfMc8hLl3WGS+lB7VQlTMk1Bhqw0h/xu6R4y05qejcmYH84nKP9KRIg1NfGsWqFaQ 4LAaGzIt7uktcBbXHvqzOQeY8Vgy0lhcDR8v1C0slYibudPMnXhOT/G/lNmW5X1bkaPh davx4JSevvhqe62L2d3/eBOrWGsNlw4e/qf0N6a6i/gwX77frJQr9ztEv07fk7PrcxNO OClxqokvOAYM/oNHTVWuxpUp2yt4V18lfG/EyP9Vjh+couxYgD67qnmzcpni527QksCH WwhMBGs5sdEaRv85BDC5y8xqHMg0/kcf9RcYx3aRrfP/0cHNw4n6+z1/zuh94eb4rvlz jU2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ldRNECwmyVYmtHVoMDj1DnMCl/QNLLE2PPJqePgu5/A=; b=1AH+rbAafgqidoVGGDrb3/YnACzdgWIvR/GZqFcubQv3YRfdIZCQwlFJqJjseOmRMI pDtzAI3BbkhvAsHRZvyGF+19YAz9fNbNZP1kcX0VOV3sLFK0G+Es7hSjUxKdiqbvNFc8 EUxufdJ9wl2h+LEQ8CeBvJZYzzQsvd/F3CZmEnvDYFetI7ghbiC1vB1mJcdrdau+RUAQ b+XN5X7TUQNSK4H/q7us7nL4OGzjTmfyWxe2u/Xs5wYajj8d+XAma/7MeulpgdlH5O3v Vz0s889dmwWKDX9VqWcGPVFNlBJvX6kTcja7mC1DXB91gGHaQGiPLDB/KuQc5Pp/D23v NFxA== X-Gm-Message-State: ACrzQf2cN5m0BiJc3CODnz/0kNNo5wLM3UvhL7Iod8esiriX6bisIzmM Z/1GBqqaCpaR02/ogcZOs00xtnlgC9djXBA/kYk= X-Google-Smtp-Source: AMsMyM6/N44rqM1Uq/mtaPOTeZFrMT+ql0ATme1v02d0LKvkQkjmrfMmbRHocuzUAi6lFS08lWie5S1svlp7xd+rQ1A= X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr4777070oil.199.1665669834746; Thu, 13 Oct 2022 07:03:54 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Oct 2022 16:03:54 +0200 From: Stefan Kangas In-Reply-To: <8735bs3ta0.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> X-Hashcash: 1:20:221013:eliz@gnu.org::V0YqH2/Qu1/nGlPv:HKhn MIME-Version: 1.0 Date: Thu, 13 Oct 2022 16:03:54 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Philip Kaludercic writes: > Nothing for now, but I could add support for package.el. If that means we can get rid of the boilerplate that themes have to add now, I think it would be a good thing. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 14:09: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 To: Stefan Kangas Cc: Eli Zaretskii , larsi@gnus.org, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16656700891361 (code B ref 57639); Thu, 13 Oct 2022 14:09:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 14:08:09 +0000 Received: from localhost ([127.0.0.1]:34398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiysb-0000Ls-7p for submit@debbugs.gnu.org; Thu, 13 Oct 2022 10:08:09 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiysW-0000LL-1B for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 10:08:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ECD7524002B for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 16:07:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665670078; bh=27bbXhHQJfWonlkNRKvE2sVTZl6AwBTtrs+pycXo9Ug=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=F1cnOs1lwMOU9Och+6xBLPKWihydD+igBd7zPy3lFGk8da7kLE0uEfUm3tyujFECO gHWKZO8LlDhcrmohzdfXZ5RCjIW8EpqWQcqCEGqDKa9fIccVtLDSPWgIymzqPWMOUt LwPhwZBnQiaNP66z/IaEQjaif84ISYNwPC3+5ixrD/rRhNuX53RFv3r7eyIZDD2bgn t2LPXOlneABHn6igBijJC16JhVQfUmfuXV4Yfg8PU9b1RGFO9Hnhz1G/A333yMRweA 43FuZzUCckh9vo+2KhvwDwagwZL+ng74bAN1CTn65C6ludJvBglPGDHi6IPTfUh0LL NdjRsICiReJ3w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpBDr5qc7z9rxQ; Thu, 13 Oct 2022 16:07:56 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Kangas's message of "Thu, 13 Oct 2022 16:03:54 +0200") References: <875yhzmz25.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> 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 Date: Thu, 13 Oct 2022 14:07:56 +0000 Message-ID: <87ilkn3jgj.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Stefan Kangas writes: > Philip Kaludercic writes: > >> Nothing for now, but I could add support for package.el. > > If that means we can get rid of the boilerplate that themes have to add > now, I think it would be a good thing. The fundamental issue that necessitates boilerplate is that packages are not added to the theme load path, and adding a new cookie type doesn't change that. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 19:13: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166568833410030 (code B ref 57639); Thu, 13 Oct 2022 19:13:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 19:12:14 +0000 Received: from localhost ([127.0.0.1]:34971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj3cr-0002bi-Rp for submit@debbugs.gnu.org; Thu, 13 Oct 2022 15:12:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj3co-0002bQ-P5 for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 15:12:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z1cHxPVJAUGFV92hZ/JfCjDTuuMCf0zsNi8z1z8zATM=; b=uigw4ehUKbarD5WesF+4p1Pcjh FtgL8Kkd2t3WBNm9GmjyLdwy1SNvrEWuHH0lgG2qideZW0CxslUvdFXhGuFef1WcZfPiXGjowWeRe NOSPsLk1uIbYhtCc6EFp8BzwkH2mP1nD0buI86FVqW6MU0FORK3fMc4sXMrQOHFNJ/BE=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oj3ce-0006qL-T4; Thu, 13 Oct 2022 21:12:02 +0200 From: Lars Ingebrigtsen In-Reply-To: <875ygohztx.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 13 Oct 2022 08:50:34 +0000") References: <875yhzmz25.fsf@posteo.net> <87edw5n2zm.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> X-Now-Playing: Arovane's _Atol Scrap_: "failed (2021 Remaster)" Date: Thu, 13 Oct 2022 21:12:00 +0200 Message-ID: <87zgdz5yin.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > OK, it looks like this worked. Just to recap, these are the proposed > changes: Looks good to me (but I haven't actually tried the code). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic writes: > OK, it looks like this worked. Just to recap, these are the proposed > changes: Looks good to me (but I haven't actually tried the code). From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 20:23: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Protesilaos Stavrou Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166569252817342 (code B ref 57639); Thu, 13 Oct 2022 20:23:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 20:22:08 +0000 Received: from localhost ([127.0.0.1]:35048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj4iW-0004Vd-JF for submit@debbugs.gnu.org; Thu, 13 Oct 2022 16:22:08 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj4iR-0004V4-Fu for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 16:22:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 707DB240026 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 22:21:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665692517; bh=ylUH9UX/YfHBwVd6vVJUaGMV6hjEtvdB9gz2Bz/dYUM=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=LiEK5+L8E4khduojJQxoajSTCmPd+8Uq7Hg1NVc7rKurgT48J6B49pNeGgbNg+qiv VAGyDBYo26bEXbaSCskWYfYCT/McDFnyvg7wqcOeL3rMIR/NLq9uVhKVQD5Mkx63lH DoGmEQV7E77Q79+xBbnGwhbUayNmBUw1+Gpr8O3h5yslfjmVqsI3HDPeo3pKtufNmY nUAfBL1bALi765N8syHEqEwYYHKOKu6ZUDXiuS5gl0NkRqPlFQeQo344xxO1I8XiX6 D5EVqDz4lll+NcILs5AL4DMEJFXybop+5MYDk4vXXWUgt2MvnPnjkaVM6/vcOAx6vE m2Vsaa7hIxolQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpLXK6fkVz6tm9; Thu, 13 Oct 2022 22:21:53 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87zgdz5yin.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 13 Oct 2022 21:12:00 +0200") References: <875yhzmz25.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <87zgdz5yin.fsf@gnus.org> 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 Date: Thu, 13 Oct 2022 20:21:53 +0000 Message-ID: <87wn93iie6.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> OK, it looks like this worked. Just to recap, these are the proposed >> changes: > > Looks good to me (but I haven't actually tried the code). I will be testing it for a day or two, and then push it. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' References: <875yhzmz25.fsf@posteo.net> In-Reply-To: <875yhzmz25.fsf@posteo.net> Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 20:48: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166569403019891 (code B ref 57639); Thu, 13 Oct 2022 20:48:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 20:47:10 +0000 Received: from localhost ([127.0.0.1]:35077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj56k-0005Al-AY for submit@debbugs.gnu.org; Thu, 13 Oct 2022 16:47:10 -0400 Received: from mail-oa1-f43.google.com ([209.85.160.43]:45028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj56g-00059m-DF for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 16:47:08 -0400 Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-132b8f6f1b2so3677703fac.11 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 13:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=nhyhCIYTxzzgerN9fIPIcQqmV+UaTI2N8Fac3bugajU=; b=plppYsfzCj3wQPmT7ENhve7hP6Rzw5s5T2fk18VelUFfWp9CxAEWvwizMN/6vKMYLa 9th4LeR00RPlKsHIJKIebOr4eEKRNDisgxlLPPreqqjErzsjYQI1qRhLGSSAPNA4IzwR ciylKtodpF4hgPQlHiyj91MNQChJ1VKaMAvZdrCNyOzrgaR6AdSaK1hfEf11VnymXPu/ fViQTPPN8ZrIwhpaXkb3uWz0vsc4VI5Y4W1r8Aj5fmoy83DNywbjIWxS7OvwGHw2dNxs kJ85mPXXMgURXg82x0dxP/AZ4pCUy7siI3TyRuhxSO3ZLmO9BgXHWGOrCAClGteQ4SA+ oOMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nhyhCIYTxzzgerN9fIPIcQqmV+UaTI2N8Fac3bugajU=; b=6s5pOhWp28Nw6QTrBKzbRsET7TcJRnVUdoXXXHT9Cp3tiarCT/1tWq4h1TJb0bNtLO SkHYYkOjYLJVSURU2JJO4vmsAc8zeYTSgy4BsLhdnDwgeSxaOYxTP3n+p3qNEqt3SHr0 CjwsB4TQQqKIyA7P73ZD7xh9qpWapga9HKcJQ5G2y4+Fsp2x0OYA6LnsU7NM3IqSkr7K OrCMWVvJlrua7JET6RKr8CcP4Gf2db2tVlZWc2h1dSFBDeFCRJ0regV39ww9TBr6JpWY KCB3aSO+++iawtbE0FIBvuqM1fVHxVa5yDe6XnfwhpWBHB4/zVbfXIbz0XP0rAp0hg3U Aw0w== X-Gm-Message-State: ACrzQf0zZpRKVNCSwZCU1wM6j4/2odjEqRly6lopfM77DQ0QZaPjt6lp rzeZb5hPc7ghDcRwjTdEjLA= X-Google-Smtp-Source: AMsMyM7jKKHg0GHXJoJ7zYHZZFqrB+tgZtEdjC4x0Xn9jp8YjiXq5hUZ5FIwB8rVogjkvn22p4o2vQ== X-Received: by 2002:a05:6870:d192:b0:133:1f1c:f680 with SMTP id a18-20020a056870d19200b001331f1cf680mr6670780oac.277.1665694020295; Thu, 13 Oct 2022 13:47:00 -0700 (PDT) Received: from [192.168.0.234] ([181.228.28.240]) by smtp.gmail.com with ESMTPSA id z7-20020a056870e30700b0012c52bd4369sm521826oad.19.2022.10.13.13.46.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 13:46:59 -0700 (PDT) Message-ID: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> Date: Thu, 13 Oct 2022 17:46:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US From: Mauro Aranda Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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 Philip, Philip Kaludercic writes: > +Themes*} buffer.  The remaining arguments @var{properties} are used > +pass a property list with theme attributes. I think this added sentence is not clear. Also, no documentation for these special properties for toggling themes? > +(defun theme-list-variants (theme &rest list) > +  "Return a list of theme variants for THEME. > +If the optional argument LIST is not given, " This docstring is incomplete. > +  (let* ((properties (get theme 'theme-properties)) > +         (family (plist-get properties :family))) > +    (seq-filter > +     (lambda (variant) > +       (and (eq (plist-get (get variant 'theme-properties) :family) > +                family) > +            (not (eq variant theme)))) > +     (or list (custom-available-themes))))) > + > +(defun theme-choose-variant (&optional no-confirm no-enable) > +  "Prompt to switch from the current theme to one of its a variants. I'd say: "Command to switch..." > +  (let ((active-color-schemes > +         (seq-filter > +          (lambda (theme) > +            ;; FIXME: As most themes currently do not have a `:kind' > +            ;; tag, it is assumed that a theme is a color scheme by > +            ;; default.  This should be reconsidered in the future. > +            (memq (plist-get (get theme 'theme-properties) :kind) > +                  '(color-scheme nil))) I think that theme writers who care about this functionality will add :kind and :family to the themes, and those who don't won't bother with that.  So I don't really see the point in supporting (:kind nil). > +          custom-enabled-themes))) > +    (cond > +     ((length= active-color-schemes 0) > +      (user-error "No theme is active, cannot toggle")) This message will be confusing when there are themes whose :kind is not color-scheme... > +     ((length> active-color-schemes 1) > +      (user-error "More than one theme active, cannot unambiguously toggle"))) > +    (let* ((theme (car active-color-schemes)) > +           (family (plist-get (get theme 'theme-properties) :family))) > +      (unless family > +        (error "Theme `%s' does not have any known variants" theme)) This will pretty much always error with themes that don't really care about toggling (see above).  Could you tell more about what is the benefit of supporting (:kind nil)? > --- a/lisp/emacs-lisp/loaddefs-gen.el > +++ b/lisp/emacs-lisp/loaddefs-gen.el > @@ -283,6 +283,12 @@ loaddefs-generate--make-autoload >             ,@(when-let ((safe (plist-get props :safe))) >                 `((put ',varname 'safe-local-variable ,safe)))))) > > +     ;; Extract theme properties Full stop missing. > +     ((eq car 'deftheme) > +      (let* ((name (car-safe (cdr-safe form))) > +         (props (nthcdr 3 form))) > +    `(put ',name 'theme-properties (list ,@props)))) In the Autoload section of the Elisp Manual, we have this: "The forms which are not copied verbatim are the following:..." Shouldn't deftheme be added to that list as well? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 22:20: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 To: Mauro Aranda Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166569957730274 (code B ref 57639); Thu, 13 Oct 2022 22:20:01 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 22:19:37 +0000 Received: from localhost ([127.0.0.1]:35225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj6YC-0007sD-M3 for submit@debbugs.gnu.org; Thu, 13 Oct 2022 18:19:37 -0400 Received: from mout02.posteo.de ([185.67.36.66]:33353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj6Y6-0007rh-UD for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 18:19:35 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F089B240103 for <57639@debbugs.gnu.org>; Fri, 14 Oct 2022 00:19:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665699565; bh=0h8Lp/+XQYj46SHgUPRKgCOkYuE+PZPO9vOZu18WIeQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=lKTqmmB5IQZxXmEfCLtE7OC/ztkOXe5ohN0gHGb0TJpFprd+2/10DIUE+PGTjESmG WiNAgpyfDD3fB8A63xlpW4OkiufwLmDOQMROZ7uiDs9V6MMdHfWnCjuYemWQCvmCOQ 3fFx1NtLz4Lcf+AvG7vja0Wz2+GsRWO2XphKdUqYz5lEtU2GlUd5QahWBgcNlVQyIu LJpVClIkujOprqfkGfOAL9XxpL33yTMzlQhHyMgygFN68kFfoe4iiTBNlxBGFLSpbu PcPTv3tLsR7spzLACk/v+J5UfbGBjc7z2a/vuxfKgWwgZ1lCISMAOU5LRNmfHhm+yT 2WnivkH6lMADQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpP7s20RNz9rxB; Fri, 14 Oct 2022 00:19:21 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> (Mauro Aranda's message of "Thu, 13 Oct 2022 17:46:55 -0300") References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> 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 Date: Thu, 13 Oct 2022 22:19:20 +0000 Message-ID: <87czavicyf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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.7 (-) Mauro Aranda writes: > Hi Philip, > > Philip Kaludercic writes: > >> +Themes*} buffer.=C2=A0 The remaining arguments @var{properties} are used >> +pass a property list with theme attributes. > > I think this added sentence is not clear. > > Also, no documentation for these special properties for toggling themes? Currently no. >> +(defun theme-list-variants (theme &rest list) >> +=C2=A0 "Return a list of theme variants for THEME. >> +If the optional argument LIST is not given, " > > This docstring is incomplete. Fixed, thanks. >> +=C2=A0 (let* ((properties (get theme 'theme-properties)) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (family (plist-get pro= perties :family))) >> +=C2=A0=C2=A0=C2=A0 (seq-filter >> +=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (variant) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (and (eq (plist-get (get variant '= theme-properties) :family) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 family) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (not= (eq variant theme)))) >> +=C2=A0=C2=A0=C2=A0=C2=A0 (or list (custom-available-themes))))) >> + >> +(defun theme-choose-variant (&optional no-confirm no-enable) >> +=C2=A0 "Prompt to switch from the current theme to one of its a variant= s. > > I'd say: "Command to switch..." Do you think it is necessary to point out that it is a command? >> +=C2=A0 (let ((active-color-schemes >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (seq-filter >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (theme) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; F= IXME: As most themes currently do not have a `:kind' >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; t= ag, it is assumed that a theme is a color scheme by >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; d= efault.=C2=A0 This should be reconsidered in the future. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mem= q (plist-get (get theme 'theme-properties) :kind) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 '(color-scheme nil))) > > I think that theme writers who care about this functionality will add > :kind and :family to the themes, and those who don't won't bother with > that.=C2=A0 So I don't really see the point in supporting (:kind nil). :kind nil will probably not occur in practice, it is just that `plist-get' will return nil if no :kind is specified. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 custom-enabled-t= hemes))) >> +=C2=A0=C2=A0=C2=A0 (cond >> +=C2=A0=C2=A0=C2=A0=C2=A0 ((length=3D active-color-schemes 0) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (user-error "No theme is active, cannot = toggle")) > > This message will be confusing when there are themes whose :kind is not > color-scheme... How come? Or do you think that we should explicitly clarify that `theme-choose-variant' is just for color-schemes? >> +=C2=A0=C2=A0=C2=A0=C2=A0 ((length> active-color-schemes 1) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (user-error "More than one theme active,= cannot unambiguously > toggle"))) >> +=C2=A0=C2=A0=C2=A0 (let* ((theme (car active-color-schemes)) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (family (p= list-get (get theme 'theme-properties) :family))) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (unless family >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error "Theme `%s' does not = have any known variants" theme)) > > This will pretty much always error with themes that don't really care > about toggling (see above).=C2=A0 Could you tell more about what is the > benefit of supporting (:kind nil)? I guess you are right in saying that nobody will set :family without setting :kind... But that won't change anything here, because what you describe is intended (a theme that has no variants, cannot be toggled.) >> --- a/lisp/emacs-lisp/loaddefs-gen.el >> +++ b/lisp/emacs-lisp/loaddefs-gen.el >> @@ -283,6 +283,12 @@ loaddefs-generate--make-autoload >>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ,@(when-let ((safe (plist-get props :safe))) >>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 `((put ',varname 'safe-local-variable ,safe)))))) >> >> +=C2=A0=C2=A0=C2=A0=C2=A0 ;; Extract theme properties > > Full stop missing. Noted. >> +=C2=A0=C2=A0=C2=A0=C2=A0 ((eq car 'deftheme) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let* ((name (car-safe (cdr-safe form))) >> +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 (props (nthcdr 3 form))) >> +=C2=A0=C2=A0=C2=A0 `(put ',name 'theme-properties (list ,@props)))) > > In the Autoload section of the Elisp Manual, we have this: > "The forms which are not copied verbatim are the following:..." > > Shouldn't deftheme be added to that list as well? Good point, will do. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2022 22:54: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16657016131631 (code B ref 57639); Thu, 13 Oct 2022 22:54:02 +0000 Received: (at 57639) by debbugs.gnu.org; 13 Oct 2022 22:53:33 +0000 Received: from localhost ([127.0.0.1]:35231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj752-0000QF-Vm for submit@debbugs.gnu.org; Thu, 13 Oct 2022 18:53:33 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:37412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj74y-0000Px-Fv for 57639@debbugs.gnu.org; Thu, 13 Oct 2022 18:53:31 -0400 Received: by mail-oi1-f182.google.com with SMTP id j188so3347388oih.4 for <57639@debbugs.gnu.org>; Thu, 13 Oct 2022 15:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YpjHSnPH6HDKnecDekYcCIg/FmTKxZGrk9kE0+kENPU=; b=Eb1EbPEplYbCS/4RyMtrwJitbmjTEFiXo7FwqqqXATyKX3UL2QxZS8SVj7vpPklSrD D4glqQrtK+xr778rdXkFDAi0oeDb+8BbTNEU4r1lhxRgCgjgYovxfrD6GyKubxUB0NQK Ih414ZKBOq7aRWnGMiOaWBpSq8TZRPANcxYglzxUxhVgI+Ccyq1YjAAlbwucuVV0PJ1g F1T5o8cZFU17pWmKBmlaNqPpKKlcOJ6ma2YnDgX/tkhajsi/NLXTzKrq6T62EoTAkyb9 VI3pfuX439HlPjTJmtDAkiv71wIURuUP3IAS7FWAWZP/tcRy5jiumPdgtzdZ0+rGEs3f aMyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YpjHSnPH6HDKnecDekYcCIg/FmTKxZGrk9kE0+kENPU=; b=n4tW7T6b4axmUREQ/f/0uG6aWmHrJjNlFCIxmhjGzNuvSGwCTq5oJnjgrpc0OT2yLK ROqc9qmjA/kL5DU69hy/2O7hvTLQ878yF3+UelqugCjkUH/jW2g9skAXqILMPSA3OMxb ryk78DXksnPB3wNGDbTMALT++10w2KmP3AkFLC3xHSZyxkaqDRzSzW0SjTU4wyHE6dzK msaHbU5To36CGIiizQ0WFp55Cue7kOfM44NUGf8R10PZswCGJ9WT2RpCUKXfea3OlBDO 66PkaTiihRJg5gyxLGqBEAnMcfz0uPXfmzhfmsaOZbTxYfs9r5AuA+/lYBcnWczpSYSr 1fnQ== X-Gm-Message-State: ACrzQf25rLrc/aY5mV9/Wzq4pzFzIxYG9wEYBlx5f7daKM9pNUdpFen7 uEasNheC24nsN0sRg3Nks2Q= X-Google-Smtp-Source: AMsMyM6rJY4mIraig0EdHX784A61k02ffdgKSAmteu3qKSx63HD/lws5nmuwgqoCAS+JHWaQT/Qwpg== X-Received: by 2002:aca:1106:0:b0:355:1196:8f73 with SMTP id 6-20020aca1106000000b0035511968f73mr1067509oir.236.1665701602644; Thu, 13 Oct 2022 15:53:22 -0700 (PDT) Received: from [192.168.0.234] ([181.228.28.240]) by smtp.gmail.com with ESMTPSA id bd18-20020a056808221200b00354e8bc0236sm419067oib.34.2022.10.13.15.53.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 15:53:22 -0700 (PDT) Message-ID: <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> Date: Thu, 13 Oct 2022 19:53:19 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> From: Mauro Aranda In-Reply-To: <87czavicyf.fsf@posteo.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.8 (-) 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.8 (--) Philip Kaludercic writes: > Mauro Aranda writes: > >> Hi Philip, >> >> Philip Kaludercic writes: >> >>> +Themes*} buffer.  The remaining arguments @var{properties} are used >>> +pass a property list with theme attributes. >> >> I think this added sentence is not clear. >> >> Also, no documentation for these special properties for toggling themes? > > Currently no. I hope there will be. >>> +(defun theme-choose-variant (&optional no-confirm no-enable) >>> +  "Prompt to switch from the current theme to one of its a variants. >> >> I'd say: "Command to switch..." > > Do you think it is necessary to point out that it is a command? OK, maybe not.  But why start with "Prompt to"? It is likely that it will not prompt.  Why not get rid of it? >>> +  (let ((active-color-schemes >>> +         (seq-filter >>> +          (lambda (theme) >>> +            ;; FIXME: As most themes currently do not have a `:kind' >>> +            ;; tag, it is assumed that a theme is a color scheme by >>> +            ;; default.  This should be reconsidered in the future. >>> +            (memq (plist-get (get theme 'theme-properties) :kind) >>> +                  '(color-scheme nil))) >> >> I think that theme writers who care about this functionality will add >> :kind and :family to the themes, and those who don't won't bother with >> that.  So I don't really see the point in supporting (:kind nil). > > :kind nil will probably not occur in practice, it is just that > `plist-get' will return nil if no :kind is specified. I know that.  I didn't say a theme will pass :kind nil, I was referring to the FIXME.  But let me try to be clearer: I don't see the point in special handling the absense of :kind. >>> +          custom-enabled-themes))) >>> +    (cond >>> +     ((length= active-color-schemes 0) >>> +      (user-error "No theme is active, cannot toggle")) >> >> This message will be confusing when there are themes whose :kind is not >> color-scheme... > > How come?  Or do you think that we should explicitly clarify that > `theme-choose-variant' is just for color-schemes? If you're filtering by :kind, and if there are themes that in the future specify another :kind value, then you'll be saying that there's no theme active but that won't be correct. I use themes for setting variables too, as a way to manage my config and change it quickly by {en|dis}abling them. If I use a theme that supports this kind of toggling (like the modus themes), I'll have to specify a :kind to my personal themes so that I can toggle with toggle-theme. So, there is already a chance that another :kind values will show up, and the message might become confusing. >>> +     ((length> active-color-schemes 1) >>> +      (user-error "More than one theme active, cannot unambiguously >>   toggle"))) >>> +    (let* ((theme (car active-color-schemes)) >>> +           (family (plist-get (get theme 'theme-properties) :family))) >>> +      (unless family >>> +        (error "Theme `%s' does not have any known variants" theme)) >> >> This will pretty much always error with themes that don't really care >> about toggling (see above).  Could you tell more about what is the >> benefit of supporting (:kind nil)? > > I guess you are right in saying that nobody will set :family without > setting :kind... But that won't change anything here, because what you > describe is intended (a theme that has no variants, cannot be toggled.) See above.  I meant to discuss the FIXME and special handling the absense of :kind.  I'd say it's not needed at all.  But of course, erroring out here is OK. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 06:12: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 To: Philip Kaludercic Cc: larsi@gnus.org, maurooaranda@gmail.com, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166572791319090 (code B ref 57639); Fri, 14 Oct 2022 06:12:01 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 06:11:53 +0000 Received: from localhost ([127.0.0.1]:35552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojDvF-0004xq-D3 for submit@debbugs.gnu.org; Fri, 14 Oct 2022 02:11:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojDvC-0004xc-Oy for 57639@debbugs.gnu.org; Fri, 14 Oct 2022 02:11:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojDv7-0002mw-D3; Fri, 14 Oct 2022 02:11:45 -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=aoh/kgMlr34TVmhxwvYxZvxeQ9c3i+/YOtk5WYjCETw=; b=CAFXONvrgDcohYK+Rchn ADrooXCAFKu9hcjA9Z3VKsAiY1EFvZ7YZwmhcK92RmDTk8l3tMDUNaqek8V2/2VTBMtaUJFnH5VN6 Dsnz10m5SM837oI8imEOh8zPXI5xQIinpJOW3X+GEWerN+Bxhf5BgniOUOAkz25nFT8FXkMV/WWvp Vf3cC7lurX3hK02eFNxPlwBf8JzLkhhRe8McJyrOJ3ByQ19a0+COPGIJN1LXbbnjg8uJSn4/3yRGn /lgTxkt0P68a7dJ0juykcLp9NbRUlpjG8HU2S/XQQA2szr3jclK21qG7HnxQJJdW8Eljx5tLK/ZdL GWGDMajZtP8Grw==; Received: from [87.69.77.57] (port=3420 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 1ojDv6-0007dL-Rs; Fri, 14 Oct 2022 02:11:45 -0400 Date: Fri, 14 Oct 2022 09:11:30 +0300 Message-Id: <83y1tj7x4d.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87czavicyf.fsf@posteo.net> (message from Philip Kaludercic on Thu, 13 Oct 2022 22:19:20 +0000) References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: Philip Kaludercic > Cc: Lars Ingebrigtsen , Eli Zaretskii , > 57639@debbugs.gnu.org, Protesilaos Stavrou > Date: Thu, 13 Oct 2022 22:19:20 +0000 > > Mauro Aranda writes: > > >> +(defun theme-choose-variant (&optional no-confirm no-enable) > >> +  "Prompt to switch from the current theme to one of its a variants. > > > > I'd say: "Command to switch..." > > Do you think it is necessary to point out that it is a command? I don't, FWIW. The doc string should describe what the command does. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 07:30: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 To: Mauro Aranda Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166573254228090 (code B ref 57639); Fri, 14 Oct 2022 07:30:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 07:29:02 +0000 Received: from localhost ([127.0.0.1]:35667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojF7t-0007Io-Oh for submit@debbugs.gnu.org; Fri, 14 Oct 2022 03:29:02 -0400 Received: from mout02.posteo.de ([185.67.36.66]:35309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojF7q-0007IL-N6 for 57639@debbugs.gnu.org; Fri, 14 Oct 2022 03:29:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CCB9A240101 for <57639@debbugs.gnu.org>; Fri, 14 Oct 2022 09:28:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665732532; bh=JIj6IoaqRNviZeBedO64Li08DASfZjL9lVKwrxL6Qp0=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=N4D22EmN9CRd3v3V0C2bHyBfeWMHcaryD7Mgw1O/RjWhNtdttxpwn0Esil1E66VrS MiLuApVUt310mbx5fjqWAvBpgY3kSrUscl7idODtSRn1HabnyrEGfk/F5Z5HzUzY6B K0kqUYC0h14kNACP/7orjuiMDEsyJRTgGiUVsfeC8mtrh7zMQHeMfBwiPsGAzaNHXv MnBHNe3sMsRF49xGNzz8vFNFMlwkXqGY8vDOEV4samFsc2FzeYzT2EfzVFsdZ5+4pa PbEsFJwLlfj1lAoSeEyWKX2sHD2sSCjGKaMdtHRehlSHZCJsBVv95hQBaaA9QmKgm/ dHV7zdr6ArBAg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpdKv4JKQz9rxF; Fri, 14 Oct 2022 09:28:51 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> (Mauro Aranda's message of "Thu, 13 Oct 2022 19:53:19 -0300") References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> 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 Date: Fri, 14 Oct 2022 07:28:51 +0000 Message-ID: <874jw6j230.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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.7 (-) Mauro Aranda writes: > Philip Kaludercic writes: > >> Mauro Aranda writes: >> >>> Hi Philip, >>> >>> Philip Kaludercic writes: >>> >>>> +Themes*} buffer.=C2=A0 The remaining arguments @var{properties} are u= sed >>>> +pass a property list with theme attributes. >>> >>> I think this added sentence is not clear. >>> >>> Also, no documentation for these special properties for toggling themes? >> >> Currently no. > > I hope there will be. I had to check the thread again, and the most that was said on the topic was in <87leqo978k.fsf@gnus.org>. So the idea would be to mention :family, :kind and :background-mode and state that anything else is undefined/shouldn't be used in case we decide to add another property in the future? We should also specify what valid values are. :family is just a symbol, :background-mode is either 'light or 'dark, but what about :kind? >>>> +(defun theme-choose-variant (&optional no-confirm no-enable) >>>> +=C2=A0 "Prompt to switch from the current theme to one of its a varia= nts. >>> >>> I'd say: "Command to switch..." >> >> Do you think it is necessary to point out that it is a command? > > OK, maybe not.=C2=A0 But why start with "Prompt to"? It is likely that it > will not prompt.=C2=A0 Why not get rid of it? Good point, so why not just Switch from the current theme to one of its a variants. >>>> +=C2=A0 (let ((active-color-schemes >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (seq-filter >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (theme) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;;= FIXME: As most themes currently do not have a `:kind' >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;;= tag, it is assumed that a theme is a color scheme by >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;;= default.=C2=A0 This should be reconsidered in the future. >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (m= emq (plist-get (get theme 'theme-properties) :kind) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 '(color-scheme nil))) >>> >>> I think that theme writers who care about this functionality will add >>> :kind and :family to the themes, and those who don't won't bother with >>> that.=C2=A0 So I don't really see the point in supporting (:kind nil). >> >> :kind nil will probably not occur in practice, it is just that >> `plist-get' will return nil if no :kind is specified. > > I know that.=C2=A0 I didn't say a theme will pass :kind nil, I was referr= ing > to the FIXME.=C2=A0 But let me try to be clearer: I don't see the point in > special handling the absense of :kind. On reflection, I agree and will remove this. >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 custom-enabled= -themes))) >>>> +=C2=A0=C2=A0=C2=A0 (cond >>>> +=C2=A0=C2=A0=C2=A0=C2=A0 ((length=3D active-color-schemes 0) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (user-error "No theme is active, canno= t toggle")) >>> >>> This message will be confusing when there are themes whose :kind is not >>> color-scheme... >> >> How come?=C2=A0 Or do you think that we should explicitly clarify that >> `theme-choose-variant' is just for color-schemes? > > If you're filtering by :kind, and if there are themes that in the future > specify another :kind value, then you'll be saying that there's no theme > active but that won't be correct. > > > I use themes for setting variables too, as a > way to manage my config and change it quickly by {en|dis}abling them. > If I use a theme that supports this kind of toggling (like the modus > themes), I'll have to specify a :kind to my personal themes so that I > can toggle with toggle-theme. > > So, there is already a chance that another :kind values will show up, > and the message might become confusing. > > >>>> +=C2=A0=C2=A0=C2=A0=C2=A0 ((length> active-color-schemes 1) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (user-error "More than one theme activ= e, cannot unambiguously >>>=C2=A0=C2=A0 toggle"))) >>>> +=C2=A0=C2=A0=C2=A0 (let* ((theme (car active-color-schemes)) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (family = (plist-get (get theme 'theme-properties) :family))) >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (unless family >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (error "Theme `%s' does no= t have any known variants" theme)) >>> >>> This will pretty much always error with themes that don't really care >>> about toggling (see above).=C2=A0 Could you tell more about what is the >>> benefit of supporting (:kind nil)? >> >> I guess you are right in saying that nobody will set :family without >> setting :kind... But that won't change anything here, because what you >> describe is intended (a theme that has no variants, cannot be toggled.) > > See above.=C2=A0 I meant to discuss the FIXME and special handling the > absense of :kind.=C2=A0 I'd say it's not needed at all.=C2=A0 But of cour= se, > erroring out here is OK. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 11:23: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 To: Philip Kaludercic Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166574655722286 (code B ref 57639); Fri, 14 Oct 2022 11:23:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 11:22:37 +0000 Received: from localhost ([127.0.0.1]:35946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojIlx-0005nO-6O for submit@debbugs.gnu.org; Fri, 14 Oct 2022 07:22:37 -0400 Received: from mail-oa1-f49.google.com ([209.85.160.49]:43954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojIlp-0005n1-9B for 57639@debbugs.gnu.org; Fri, 14 Oct 2022 07:22:36 -0400 Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1324e7a1284so5459145fac.10 for <57639@debbugs.gnu.org>; Fri, 14 Oct 2022 04:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=sXQKe5zWbWtYCYOH60T2hIFLIDLlLosAEOst8X0CX2Y=; b=ei0tcdoQUkF2P1brE7GT91MPgFUh4nowNe32nuM6UhStCbE4h3YERG4XSwDZBSsVtD XqknguUpoAzZTvXMeKyrcyjniC4HHpcLLwnzyctM3VuMDwG1UFVY31JJOz548AvSbHC0 ZAxIlIpzPdA4n094GKxrvf/r2reGOYgXJ3+Afhp9LvVaq9BnZ5z4Q2S3/WTIOpTH87ib bCffNf540jCvm0e6GpIMv/217LjphMQ02pImG7uuZpmZtxo/BDr3YBR1xzQAo7rtif5e h5kde9l2yQP1TnXIQI+decjVdlbHDikeLXVD8bj8aO110aGjEVZDy6iKrQSNiDuwtucY hG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sXQKe5zWbWtYCYOH60T2hIFLIDLlLosAEOst8X0CX2Y=; b=fgocy3R5+SKWijuqzOdLKS3CQsYXr94pMeFNymlxKd7/HrHThfOW8qaBoHf4Q7abLN fdyLicWIEGuYuvomPejXIsLBMPpGNUqMz+BQ4k2HUKPAMN7HA4V0WE0mRwlQz6hXUOXs O5wFfCezhIxP/7PpqjA006YY8tZHp7b3M4eK6JNEu8R6sFDQ2FZxN1Cf2dzeDuVBYRDJ wzZ3bUHaIehOdbLEi51uHwyhQAjstqlgb/y8HB+brx6G5NlZpEWgN3jz9UBu6+UhqknJ pAiBkG/1U2D9WwyNepIIK0yJRGvKn5iHLVutF7QPg6311feK6oK+WJ9O4A3iKgTfi/d/ jTwQ== X-Gm-Message-State: ACrzQf2vbK68ywnQhcJZN3aj2N0HKsmDv3dUX0oiiI+oxwTNfknDQDBp WbfG/XgVnxuZxG+qRVpowX8= X-Google-Smtp-Source: AMsMyM5ygN43/tfM7173Dcc1+lpveLHCkjWEvbhbRSToH/LQjzvBKl85KbqgRR3r6aTNTHECrBphhg== X-Received: by 2002:a05:6870:6586:b0:132:62a5:a663 with SMTP id fp6-20020a056870658600b0013262a5a663mr7652402oab.229.1665746543523; Fri, 14 Oct 2022 04:22:23 -0700 (PDT) Received: from [192.168.0.234] ([181.228.28.240]) by smtp.gmail.com with ESMTPSA id a19-20020a056808129300b00354b619a375sm979700oiw.0.2022.10.14.04.22.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Oct 2022 04:22:22 -0700 (PDT) Message-ID: Date: Fri, 14 Oct 2022 08:22:20 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> <874jw6j230.fsf@posteo.net> From: Mauro Aranda In-Reply-To: <874jw6j230.fsf@posteo.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.8 (-) 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.8 (--) Philip Kaludercic writes: > Mauro Aranda writes: >>>> Also, no documentation for these special properties for toggling themes? >>> >>> Currently no. >> >> I hope there will be. > > I had to check the thread again, and the most that was said on the topic > was in <87leqo978k.fsf@gnus.org>.  So the idea would be to mention > :family, :kind and :background-mode and state that anything else is > undefined/shouldn't be used in case we decide to add another property in > the future? > > We should also specify what valid values are.  :family is just a symbol, > :background-mode is either 'light or 'dark, but what about :kind? I'm not really good at this, but something like: The following properties are supported: ':family': The value should be a symbol, the name of the family that the theme is part of.  [And insert here the explanation of family that Eli gave] ':kind': The value should be a symbol.  If a theme is enabled and this property has the value color-scheme, then the theme-choose-variant command will look for other available themes that belong to the same family in order to switch the themes. I didn't include background-mode because the code does nothing with that property, AFAICT. >>>>> +(defun theme-choose-variant (&optional no-confirm no-enable) >>>>> +  "Prompt to switch from the current theme to one of its a variants. >>>> >>>> I'd say: "Command to switch..." >>> >>> Do you think it is necessary to point out that it is a command? >> >> OK, maybe not.  But why start with "Prompt to"? It is likely that it >> will not prompt.  Why not get rid of it? > > Good point, so why not just > >      Switch from the current theme to one of its a variants. I think that's better, yes.  I think the "a" between "its" and "variants" is a typo. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 15:22: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 To: Mauro Aranda Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166576090026222 (code B ref 57639); Fri, 14 Oct 2022 15:22:01 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 15:21:40 +0000 Received: from localhost ([127.0.0.1]:38354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMVI-0006os-Da for submit@debbugs.gnu.org; Fri, 14 Oct 2022 11:21:40 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMVG-0006oe-Ls for 57639@debbugs.gnu.org; Fri, 14 Oct 2022 11:21:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 94AA3240105 for <57639@debbugs.gnu.org>; Fri, 14 Oct 2022 17:21:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665760892; bh=yI4Bat3I3WwuvuA+YRu7Grt/oFWmgIIAp/BsiYJYH5Q=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=VcQyzblXT8LO5NJlrLetYCH/9lYIO03K6K847ZSd4iH1DfGasBTGaajKlF5S4pob5 P0q/FjtZa3QYjcNhLnRlHt4tZQwMFts64rBhe23ZyYabdpYOMr2v4n2O3zoyVlGT4r Tk2Bt5hqLk7qKWPD06BhNCdQgtqUaXOzSp0gwYMdvDF5FFr43/vAVoBwQTJkP91/7d TcSxSxMxVYXlNvFmZ85K73Dis5dbHr9TOZH6Jf9OYOgt+UB8rN+g0B9Sj5UxotdmZf k5g63PltVczFT+yrj5shb9Fd0nUZ7krH5H0sJfxjYPHNLlq+k5S+XdqZgus2jV1ysM BU2kKjqcyKsqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpqqG4sbcz6tr6; Fri, 14 Oct 2022 17:21:30 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Mauro Aranda's message of "Fri, 14 Oct 2022 08:22:20 -0300") References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> <874jw6j230.fsf@posteo.net> 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 Date: Fri, 14 Oct 2022 15:21:30 +0000 Message-ID: <87fsfqh1mt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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.7 (-) Mauro Aranda writes: > Philip Kaludercic writes: > >> Mauro Aranda writes: > >>>>> Also, no documentation for these special properties for toggling > themes? >>>> >>>> Currently no. >>> >>> I hope there will be. >> >> I had to check the thread again, and the most that was said on the topic >> was in <87leqo978k.fsf@gnus.org>.=C2=A0 So the idea would be to mention >> :family, :kind and :background-mode and state that anything else is >> undefined/shouldn't be used in case we decide to add another property in >> the future? >> >> We should also specify what valid values are.=C2=A0 :family is just a sy= mbol, >> :background-mode is either 'light or 'dark, but what about :kind? > > I'm not really good at this, but something like: > > The following properties are supported: > ':family': The value should be a symbol, the name of the family that the > theme is part of.=C2=A0 [And insert here the explanation of family that E= li > gave] > ':kind': The value should be a symbol.=C2=A0 If a theme is enabled and th= is > property has the value color-scheme, then the theme-choose-variant > command will look for other available themes that belong to the same > family in order to switch the themes. Sounds good, I'll try to work this in. > I didn't include background-mode because the code does nothing with that > property, AFAICT. True, but the long term idea is for Emacs to be able to use this property when the system switches between dark and light mode. >>>>>> +(defun theme-choose-variant (&optional no-confirm no-enable) >>>>>> +=C2=A0 "Prompt to switch from the current theme to one of its a var= iants. >>>>> >>>>> I'd say: "Command to switch..." >>>> >>>> Do you think it is necessary to point out that it is a command? >>> >>> OK, maybe not.=C2=A0 But why start with "Prompt to"? It is likely that = it >>> will not prompt.=C2=A0 Why not get rid of it? >> >> Good point, so why not just >> >>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Switch from the current theme to one of it= s a variants. > > I think that's better, yes.=C2=A0 I think the "a" between "its" and > "variants" is a typo. Of course, thanks for catching that! From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 18:22: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 To: Mauro Aranda Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166577166213458 (code B ref 57639); Fri, 14 Oct 2022 18:22:02 +0000 Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 18:21:02 +0000 Received: from localhost ([127.0.0.1]:38594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojPIq-0003US-Uy for submit@debbugs.gnu.org; Fri, 14 Oct 2022 14:21:02 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojPIn-0003Tz-VR for 57639@debbugs.gnu.org; Fri, 14 Oct 2022 14:20:59 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 47AA0240029 for <57639@debbugs.gnu.org>; Fri, 14 Oct 2022 20:20:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665771652; bh=yF6/RAZMGwhgvHnQu7LQwqMK7KQL0sSAuKaiU5OtatY=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Q92kCd/LwuhVtXN0vwpusDEk3iViZp7qBO4ah+2wqqwVetfvB4pyXcKScY2ALK2Bp Q5hW7GC+pjpELHqWCtWiQZNZ5pQXVkWSnvu5IYffPid8IQUx0VPjfmPZC0gZxxKpt0 1AVEwS8WqHccS54ia52JvN/5Bp46w3Hy1AwfF3bcJo2lr93j04Gm5aMYYjvGzFKq1S vK+cF82ARdpMYeJnjXOUzrPru8BJYOqNCBZ6WmW+CM9b7iImwKNw1rrlqsr1EMUK5l wQ6YKAoCbENtQHYNhvHWNCga/i4p2kuR7gg0W890dzz5TJdua/hgmsupjjm37+VZdZ oBiAeFMCDAyOA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpvpB6Zpsz6tmT; Fri, 14 Oct 2022 20:20:50 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Mauro Aranda's message of "Fri, 14 Oct 2022 08:22:20 -0300") References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> <874jw6j230.fsf@posteo.net> 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 Date: Fri, 14 Oct 2022 18:20:50 +0000 Message-ID: <87sfjq6zct.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mauro Aranda writes: > Philip Kaludercic writes: > >> Mauro Aranda writes: > >>>>> Also, no documentation for these special properties for toggling > themes? >>>> >>>> Currently no. >>> >>> I hope there will be. >> >> I had to check the thread again, and the most that was said on the topic >> was in <87leqo978k.fsf@gnus.org>.=C2=A0 So the idea would be to mention >> :family, :kind and :background-mode and state that anything else is >> undefined/shouldn't be used in case we decide to add another property in >> the future? >> >> We should also specify what valid values are.=C2=A0 :family is just a sy= mbol, >> :background-mode is either 'light or 'dark, but what about :kind? > > I'm not really good at this, but something like: > > The following properties are supported: > ':family': The value should be a symbol, the name of the family that the > theme is part of.=C2=A0 [And insert here the explanation of family that E= li > gave] > ':kind': The value should be a symbol.=C2=A0 If a theme is enabled and th= is > property has the value color-scheme, then the theme-choose-variant > command will look for other available themes that belong to the same > family in order to switch the themes. > > > I didn't include background-mode because the code does nothing with that > property, AFAICT. > >>>>>> +(defun theme-choose-variant (&optional no-confirm no-enable) >>>>>> +=C2=A0 "Prompt to switch from the current theme to one of its a var= iants. >>>>> >>>>> I'd say: "Command to switch..." >>>> >>>> Do you think it is necessary to point out that it is a command? >>> >>> OK, maybe not.=C2=A0 But why start with "Prompt to"? It is likely that = it >>> will not prompt.=C2=A0 Why not get rid of it? >> >> Good point, so why not just >> >>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Switch from the current theme to one of it= s a variants. > > I think that's better, yes.=C2=A0 I think the "a" between "its" and > "variants" is a typo. Here is the updated patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Tag-themes-with-properties.patch >From 69c77d8f5de386e5024eeaad4a20dfd9afa71cd9 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Sep 2022 20:11:42 +0200 Subject: [PATCH] Tag themes with properties * doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. (Autoload): Mention that 'deftheme' is not copied verbatim. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * etc/themes/modus-operandi-theme.el: Add properties. * etc/themes/modus-vivendi-theme.el: Add properties. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Handle 'defcustom's by extracting the properties. (Bug#57639) --- doc/emacs/custom.texi | 10 ++++ doc/lispref/customize.texi | 24 +++++++++- doc/lispref/loading.texi | 2 +- etc/themes/adwaita-theme.el | 5 +- etc/themes/deeper-blue-theme.el | 5 +- etc/themes/dichromacy-theme.el | 5 +- etc/themes/leuven-dark-theme.el | 8 +++- etc/themes/leuven-theme.el | 8 +++- etc/themes/light-blue-theme.el | 5 +- etc/themes/manoj-dark-theme.el | 5 +- etc/themes/misterioso-theme.el | 5 +- etc/themes/modus-operandi-theme.el | 2 + etc/themes/modus-vivendi-theme.el | 2 + etc/themes/tango-dark-theme.el | 7 ++- etc/themes/tango-theme.el | 6 ++- etc/themes/tsdh-dark-theme.el | 6 ++- etc/themes/tsdh-light-theme.el | 6 ++- etc/themes/wheatgrass-theme.el | 5 +- etc/themes/whiteboard-theme.el | 5 +- etc/themes/wombat-theme.el | 5 +- lisp/custom.el | 73 +++++++++++++++++++++++++++--- lisp/emacs-lisp/loaddefs-gen.el | 6 +++ 22 files changed, 179 insertions(+), 26 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..f98527bf9a 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,16 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex theme-choose-variant +Some themes have variants (most often just two: light and dark). You +can switch to another variant using @kbd{M-x theme-choose-variant}. +If the currently active theme has only one other variant, it will be +selected; if there are more variants, the command will prompt you +which one to switch to. + +Note that @code{theme-choose-variant} only works if a single theme +is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6ba35cffff..204719e942 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,12 +1428,32 @@ Custom Themes be a call to @code{deftheme}, and the last form should be a call to @code{provide-theme}. -@defmac deftheme theme &optional doc +@defmac deftheme theme &optional doc &rest properties This macro declares @var{theme} (a symbol) as the name of a Custom theme. The optional argument @var{doc} should be a string describing the theme; this is the description shown when the user invokes the @code{describe-theme} command or types @kbd{?} in the @samp{*Custom -Themes*} buffer. +Themes*} buffer. The remaining arguments @var{properties} are used +pass a property list with theme attributes. + +The following attributes are supported: + +@table @code +@item :family +A symbol designating what ``family'' a theme belongs to. A +@dfn{family} of themes is a set of similar themes that differ by minor +aspects, such as face colors that are meant for the light vs dark +background of the frame. +@item :kind +A symbol. If a theme is enabled and this property has the value +@code{color-scheme}, then the @code{theme-choose-variant} command will +look for other available themes that belong to the same family in +order to switch the themes. Other values are currently unspecified +and should not be used. +@item :background-mode +A symbol, either @code{light} or @code{dark}. This attribute is +currently unused, but should still be specified. +@end table Two special theme names are disallowed (using them causes an error): @code{user} is a dummy theme that stores the user's direct diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 4e4f12dc32..c7fbdac1d7 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -662,7 +662,7 @@ Autoload and @code{define-global-minor-mode}. @item Other definition types: -@code{defcustom}, @code{defgroup}, @code{defclass} +@code{defcustom}, @code{defgroup}, @code{deftheme}, @code{defclass} (@pxref{Top,EIEIO,,eieio,EIEIO}), and @code{define-skeleton} (@pxref{Top,Autotyping,,autotype,Autotyping}). @end table diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el index ba83a0578c..6ad8405559 100644 --- a/etc/themes/adwaita-theme.el +++ b/etc/themes/adwaita-theme.el @@ -21,10 +21,13 @@ ;;; Code: +;;;###theme-autoload (deftheme adwaita "Face colors similar to the default theme of Gnome 3 (Adwaita). The colors are chosen to match Adwaita window decorations and the -default look of the Gnome 3 desktop.") +default look of the Gnome 3 desktop." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el index 8f19147f91..48ed9ba061 100644 --- a/etc/themes/deeper-blue-theme.el +++ b/etc/themes/deeper-blue-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme deeper-blue - "Face colors using a deep blue background.") + "Face colors using a deep blue background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el index d53c075d92..fe44d520cc 100644 --- a/etc/themes/dichromacy-theme.el +++ b/etc/themes/dichromacy-theme.el @@ -21,6 +21,7 @@ ;;; Code: +;;;###theme-autoload (deftheme dichromacy "Face colors suitable for red/green color-blind users. The color palette is from B. Wong, Nature Methods 8, 441 (2011). @@ -28,7 +29,9 @@ dichromacy differentiated by individuals with protanopia or deuteranopia. Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and -Ansi-Color faces are included.") +Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) (orange "#e69f00") diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..08978a2668 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20221010.1208 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -93,11 +93,15 @@ leuven-dark-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven-dark "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'dark + :family 'leuven + :kind 'color-scheme) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..e712a79adf 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20221010.1209 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -74,11 +74,15 @@ leuven-scale-font ;;; Theme Faces. +;;;###theme-autoload (deftheme leuven "Face colors with a light background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much -more...") +more..." + :background-mode 'light + :kind 'color-scheme + :family 'leuven) (let ((class '((class color) (min-colors 89))) diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el index eeca46210c..808fcbfeb2 100644 --- a/etc/themes/light-blue-theme.el +++ b/etc/themes/light-blue-theme.el @@ -26,8 +26,11 @@ ;;; Code: +;;;###theme-autoload (deftheme light-blue - "Face colors utilizing a light blue background.") + "Face colors utilizing a light blue background." + :background-mode 'light + :kind 'color-scheme) (make-obsolete 'light-blue nil "29.1") diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index af5576386c..f9aaa97c25 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -64,10 +64,13 @@ ;;; Code: +;;;###theme-autoload (deftheme manoj-dark "Very high contrast faces with a black background. This theme avoids subtle color variations, while avoiding the -jarring angry fruit salad look to reduce eye fatigue.") +jarring angry fruit salad look to reduce eye fatigue." + :background-mode 'dark + :kind 'color-scheme) (custom-theme-set-faces 'manoj-dark diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el index 55186384ad..3fd6cdb5af 100644 --- a/etc/themes/misterioso-theme.el +++ b/etc/themes/misterioso-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme misterioso - "Predominantly blue/cyan faces on a dark cyan background.") + "Predominantly blue/cyan faces on a dark cyan background." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index 6e609c0803..0f0630a6d1 100644 --- a/etc/themes/modus-operandi-theme.el +++ b/etc/themes/modus-operandi-theme.el @@ -71,4 +71,6 @@ (provide-theme 'modus-operandi)) +;;;###theme-autoload (put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus)) + ;;; modus-operandi-theme.el ends here diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index 0983e26c78..02c2d9e129 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -71,4 +71,6 @@ (provide-theme 'modus-vivendi)) +;;;###theme-autoload (put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus)) + ;;; modus-vivendi-theme.el ends here diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..85995e4e99 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -27,10 +27,15 @@ ;;; Code: +;;;###theme-autoload (deftheme tango-dark "Face colors using the Tango palette (dark background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'dark + :kind 'color-scheme + :family 'tango) + (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..2ac1b42294 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -27,10 +27,14 @@ ;;; Code: +;;;###theme-autoload (deftheme tango "Face colors using the Tango palette (light background). Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, -Semantic, and Ansi-Color faces are included.") +Semantic, and Ansi-Color faces are included." + :background-mode 'light + :kind 'color-scheme + :family 'tango) (let ((class '((class color) (min-colors 89))) ;; Tango palette colors. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..6b1e865e42 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -19,8 +19,12 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-dark - "A dark theme used and created by Tassilo Horn.") + "A dark theme used and created by Tassilo Horn." + :background-mode 'dark + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-dark diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..ac964d66d6 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -19,9 +19,13 @@ ;;; Code: +;;;###theme-autoload (deftheme tsdh-light "A light Emacs theme. -Used and created by Tassilo Horn.") +Used and created by Tassilo Horn." + :background-mode 'light + :kind 'color-scheme + :family 'tsdh) (custom-theme-set-faces 'tsdh-light diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el index c56c8a2d8a..20e7bbbac2 100644 --- a/etc/themes/wheatgrass-theme.el +++ b/etc/themes/wheatgrass-theme.el @@ -19,11 +19,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wheatgrass "High-contrast green/blue/brown faces on a black background. Basic, Font Lock, Isearch, Gnus, and Message faces are included. The default face foreground is wheat, with other faces in shades -of green, brown, and blue.") +of green, brown, and blue." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el index f21b18b421..2f86234b32 100644 --- a/etc/themes/whiteboard-theme.el +++ b/etc/themes/whiteboard-theme.el @@ -21,8 +21,11 @@ ;;; Code: +;;;###theme-autoload (deftheme whiteboard - "Face colors similar to markers on a whiteboard.") + "Face colors similar to markers on a whiteboard." + :background-mode 'light + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el index d9fab8ac78..9bb026ead1 100644 --- a/etc/themes/wombat-theme.el +++ b/etc/themes/wombat-theme.el @@ -21,11 +21,14 @@ ;;; Code: +;;;###theme-autoload (deftheme wombat "Medium-contrast faces with a dark gray background. Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces -are included.") +are included." + :background-mode 'dark + :kind 'color-scheme) (let ((class '((class color) (min-colors 89)))) (custom-theme-set-faces diff --git a/lisp/custom.el b/lisp/custom.el index 604b1a3ff4..0d3e2e5d0c 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1152,9 +1152,11 @@ custom--sort-vars-1 ;; (provide-theme 'THEME) -(defmacro deftheme (theme &optional doc) +(defmacro deftheme (theme &optional doc &rest properties) "Declare THEME to be a Custom theme. The optional argument DOC is a doc string describing the theme. +PROPERTIES are interpreted as a property list that will be stored +in the `theme-properties' property for THEME. Any theme `foo' should be defined in a file called `foo-theme.el'; see `custom-make-theme-feature' for more information." @@ -1164,18 +1166,25 @@ deftheme ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) + (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc + (cons 'list properties)))) -(defun custom-declare-theme (theme feature &optional doc) +(defun custom-declare-theme (theme feature &optional doc properties) "Like `deftheme', but THEME is evaluated as a normal argument. -FEATURE is the feature this theme provides. Normally, this is a symbol -created from THEME by `custom-make-theme-feature'." +FEATURE is the feature this theme provides. Normally, this is a +symbol created from THEME by `custom-make-theme-feature'. The +optional argument DOC may contain the documentation for THEME. +The optional argument PROPERTIES may contain a property list of +attributes associated with THEME." (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (unless (memq theme custom-known-themes) (push theme custom-known-themes)) (put theme 'theme-feature feature) - (when doc (put theme 'theme-documentation doc))) + (when doc + (put theme 'theme-documentation doc)) + (when properties + (put theme 'theme-properties properties))) (defun custom-make-theme-feature (theme) "Given a symbol THEME, create a new symbol by appending \"-theme\". @@ -1372,6 +1381,58 @@ load-theme (enable-theme theme)) t) +(defun theme-list-variants (theme &rest list) + "Return a list of theme variants for THEME. +By default this will use all known custom themes (see +`custom-available-themes') to check for variants. This can be +restricted if the optional argument LIST containing a list of +theme symbols to consider." + (let* ((properties (get theme 'theme-properties)) + (family (plist-get properties :family))) + (seq-filter + (lambda (variant) + (and (eq (plist-get (get variant 'theme-properties) :family) + family) + (not (eq variant theme)))) + (or list (custom-available-themes))))) + +(defun theme-choose-variant (&optional no-confirm no-enable) + "Switch from the current theme to one of its variants. +The current theme will be disabled before variant is enabled. If +the current theme has only one variant, switch to that variant +without prompting, otherwise prompt for the variant to select. +See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE." + (interactive) + (let ((active-color-schemes + (seq-filter + (lambda (theme) + ;; FIXME: As most themes currently do not have a `:kind' + ;; tag, it is assumed that a theme is a color scheme by + ;; default. This should be reconsidered in the future. + (memq (plist-get (get theme 'theme-properties) :kind) + '(color-scheme nil))) + custom-enabled-themes))) + (cond + ((length= active-color-schemes 0) + (user-error "No theme is active, cannot toggle")) + ((length> active-color-schemes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car active-color-schemes)) + (family (plist-get (get theme 'theme-properties) :family))) + (unless family + (error "Theme `%s' does not have any known variants" theme)) + (let* ((variants (theme-list-variants theme)) + (choice (cond + ((null variants) + (error "`%s' has no variants" theme)) + ((length= variants 1) + (car variants)) + ((intern (completing-read "Load custom theme: " variants)))))) + (disable-theme theme) + (load-theme choice no-confirm no-enable))))) + +(defalias 'toggle-theme #'theme-choose-variant) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 964d23c770..d2654fb206 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -283,6 +283,12 @@ loaddefs-generate--make-autoload ,@(when-let ((safe (plist-get props :safe))) `((put ',varname 'safe-local-variable ,safe)))))) + ;; Extract theme properties. + ((eq car 'deftheme) + (let* ((name (car-safe (cdr-safe form))) + (props (nthcdr 3 form))) + `(put ',name 'theme-properties (list ,@props)))) + ((eq car 'defgroup) ;; In Emacs this is normally handled separately by cus-dep.el, but for ;; third party packages, it can be convenient to explicitly autoload -- 2.37.3 --=-=-=-- From unknown Fri Jun 20 18:23:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Philip Kaludercic Subject: bug#57639: closed (Re: bug#57639: [PATCH] Add new command 'toggle-theme') Message-ID: References: <87tu453y9u.fsf@posteo.net> <875yhzmz25.fsf@posteo.net> X-Gnu-PR-Message: they-closed 57639 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 57639@debbugs.gnu.org Date: Sat, 15 Oct 2022 15:25:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1665847504-8247-1" This is a multi-part message in MIME format... ------------=_1665847504-8247-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #57639: [PATCH] Add new command 'toggle-theme' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 57639@debbugs.gnu.org. --=20 57639: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D57639 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1665847504-8247-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 57639-done) by debbugs.gnu.org; 15 Oct 2022 15:24:53 +0000 Received: from localhost ([127.0.0.1]:42497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojj1x-000280-0U for submit@debbugs.gnu.org; Sat, 15 Oct 2022 11:24:53 -0400 Received: from mout02.posteo.de ([185.67.36.66]:34479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojj1v-00027m-D4 for 57639-done@debbugs.gnu.org; Sat, 15 Oct 2022 11:24:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DD3D8240103 for <57639-done@debbugs.gnu.org>; Sat, 15 Oct 2022 17:24:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665847485; bh=gBm8XxlLlkRUlNJhkfooLPBRt6dCnSyjcJq7dRrzVV4=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=AxbsVmhXxMpX+aOH4xdlSFuXyIMLhOXUvPTiVcNDiqPe0cRwKrQZpFojOnhQO/U/z hrLm1lcV00NYj172/qrCXWUOcm5zR9r7k5CmUUa1/lqP5sz9oyrFTpUOQlElef5C4l qXND0UvMpXf5cacH3c6BJuqVEIp4akJjwWFcg+UTqLVdgsSUjgZ5SKWs5lb/Qr4Omi ls9NXK3+AvAr3dKS+nm5T8Se+VgytU0xggRI0n8DaZ45x0XpLfiv+QavQgNMWTkLhk xD2ZmvvysxTWZlPsE6AN7IdTkZocMvO1ofuFoJnQcO6+jr0+sbspUbJzJWyaAYArPd fd2+hW+v71hxQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MqRrY3B5pz9rxD; Sat, 15 Oct 2022 17:24:45 +0200 (CEST) From: Philip Kaludercic To: Mauro Aranda Subject: Re: bug#57639: [PATCH] Add new command 'toggle-theme' In-Reply-To: <87sfjq6zct.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 14 Oct 2022 20:20:50 +0200") References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> <874jw6j230.fsf@posteo.net> <87sfjq6zct.fsf@posteo.net> 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 Date: Sat, 15 Oct 2022 15:24:45 +0000 Message-ID: <87tu453y9u.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57639-done Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639-done@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 (---) Philip Kaludercic writes: > Here is the updated patch: As there have been no objections I've pushed the changes. ------------=_1665847504-8247-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Sep 2022 07:19:50 +0000 Received: from localhost ([127.0.0.1]:53243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVpLi-0008VT-12 for submit@debbugs.gnu.org; Wed, 07 Sep 2022 03:19:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:59402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVpLf-0008VE-FG for submit@debbugs.gnu.org; Wed, 07 Sep 2022 03:19:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVpLa-00004w-CV for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 03:19:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVpLX-000639-Lz for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 03:19:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 16E8824002A for ; Wed, 7 Sep 2022 09:19:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662535177; bh=pZbeE2viNzs3FrR+80kOAyAzmB1HZjj2cYOO4rFTB0o=; h=From:To:Subject:Autocrypt:Date:From; b=mUxSt2LWxr5K+KGX5FgtRF1vauHd+9uAJV+hen20iU7CDz3Dw73/XNDFaO6PMIOSw dsQreAiRbVbi0hyhV1R+P3d4xHvQVNBzAbn1MYxeFEQarOtkQZdMwu12q635CDYrqg TVvCOF2aM2f2T9WT56afyurjm7aJ0sAHB/PgX1SHu7CUyrxT7iup+JrKvEU2TY+LQA 34zUxQC7qu3jmBO3g9Ubss2XLNhvT0tZtAAUN4lJscuOfFaTu5g36Q7ZhtmnCHiL5c 2xmw6zUZI79kx8Bq1YVWvmAHnKCewqhl3rVA8VY5niL8JTm9N+O0OnwoNI2ZowZqV5 kX5UPJXYrCSlA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MMttJ3P7Bz6tm9 for ; Wed, 7 Sep 2022 09:19:36 +0200 (CEST) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add new command 'toggle-theme' 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 Date: Wed, 07 Sep 2022 07:19:30 +0000 Message-ID: <875yhzmz25.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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.3 (-) 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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Find below a patch for a command that a lot of custom themes re-implement, whenever there exists a light and dark variant. In GNU Emacs 29.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-03 built on rhea Repository revision: 2763a516a048c2cbabb10a5bbe22dc3bbde561f3 Repository branch: master System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --with-pgtk --with-native-compilation --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-new-command-toggle-theme.patch >From 2f27885460095a247421431faca14bf35fae3995 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 6 Sep 2022 20:53:35 +0200 Subject: [PATCH 1/2] Add new command 'toggle-theme' * doc/emacs/custom.texi (Custom Themes): Mention it. * etc/themes/leuven-dark-theme.el (leuven-dark): Add dual theme. * etc/themes/leuven-theme.el (leuven): Add dual theme. * etc/themes/tango-dark-theme.el (tango-dark): Add dual theme. * etc/themes/tango-theme.el (tango): Add dual theme. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add dual theme. * etc/themes/tsdh-light-theme.el (tsdh-light): Add dual theme. * lisp/cus-theme.el (describe-theme-1): Say if a theme has a dual. * lisp/custom.el (toggle-theme): Add new command. --- doc/emacs/custom.texi | 5 +++++ etc/themes/leuven-dark-theme.el | 4 +++- etc/themes/leuven-theme.el | 4 +++- etc/themes/tango-dark-theme.el | 2 ++ etc/themes/tango-theme.el | 2 ++ etc/themes/tsdh-dark-theme.el | 2 ++ etc/themes/tsdh-light-theme.el | 2 ++ lisp/cus-theme.el | 2 ++ lisp/custom.el | 19 +++++++++++++++++++ 9 files changed, 40 insertions(+), 2 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ff7ab83190..3dabba9d2f 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -667,6 +667,11 @@ Custom Themes the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name. +@findex toggle-theme + Some themes have dual variants (most often these are light and dark +pairs). You can switch between these by typing @kbd{M-x +toggle-theme}. Note that this only works if only one theme is active. + @node Creating Custom Themes @subsection Creating Custom Themes @cindex custom themes, creating diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 0e162c8bab..cef40782c1 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -5,7 +5,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> ;; URL: https://github.com/fniessen/emacs-leuven-dark-theme -;; Version: 20220202.1126 +;; Version: 20220906.2016 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1083,6 +1083,8 @@ leuven-dark (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven-dark 'dual-theme 'leuven) ;see `toggle-theme' + (provide-theme 'leuven-dark) ;; This is for the sake of Emacs. diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index d9a8d5391a..73ac96d28d 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -4,7 +4,7 @@ ;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> ;; URL: https://github.com/fniessen/emacs-leuven-theme -;; Version: 20200513.1928 +;; Version: 20220906.2016 ;; Keywords: color theme ;; This file is part of GNU Emacs. @@ -1065,6 +1065,8 @@ leuven (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) +(put 'leuven 'dual-theme 'leuven-dark) ;see `toggle-theme' + (provide-theme 'leuven) ;; This is for the sake of Emacs. diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el index ef00d2ac49..f9f2692ac5 100644 --- a/etc/themes/tango-dark-theme.el +++ b/etc/themes/tango-dark-theme.el @@ -190,6 +190,8 @@ tango-dark `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango-dark 'dual-theme 'tango) ;see `toggle-theme' + (provide-theme 'tango-dark) ;;; tango-dark-theme.el ends here diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el index ecbbf03753..8d1686f05e 100644 --- a/etc/themes/tango-theme.el +++ b/etc/themes/tango-theme.el @@ -173,6 +173,8 @@ tango `(ansi-color-bright-white ((,class (:background ,alum-1 :foreground ,alum-1)))))) +(put 'tango 'dual-theme 'tango-dark) ;see `toggle-theme' + (provide-theme 'tango) ;;; tango-theme.el ends here diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index a88ad75520..ad54eb3df0 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -142,6 +142,8 @@ tsdh-dark '(widget-field ((t (:box (:line-width 2 :color "grey75" :style pressed-button))))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-dark 'dual-theme 'tsdh-light) ;see `toggle-theme' + (provide-theme 'tsdh-dark) ;;; tsdh-dark-theme.el ends here diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index d9d09b702b..64c048f7e5 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -104,6 +104,8 @@ tsdh-light '(show-paren-mismatch ((t (:background "deep pink" :weight bold)))) '(window-number-face ((t (:foreground "red" :weight bold))))) +(put 'tsdh-light 'dual-theme 'tsdh-dark) ;see `toggle-theme' + (provide-theme 'tsdh-light) ;;; tsdh-light-theme.el ends here diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 69ec837db8..04d9ed0004 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -515,6 +515,8 @@ describe-theme-1 (end-of-file nil))))) (and (eq (car-safe sexp) 'deftheme) (setq doc (nth 2 sexp))))))) + (when-let ((dual (get theme 'dual-theme))) + (princ (format " The dual theme is `%s'" dual))) (princ "\n\nDocumentation:\n") (princ (if (stringp doc) (substitute-command-keys doc) diff --git a/lisp/custom.el b/lisp/custom.el index 96dfb37d86..ec15267c62 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1374,6 +1374,25 @@ load-theme (enable-theme theme)) t) +(defun toggle-theme (&optional no-confirm no-enable) + "Toggle the current active theme by enabling its dual pair. +The current theme will be immediately disabled before the dual +theme has been enabled. If THEME is not active an error will be +raised. If theme is nil For NO-CONFIRM and NO-ENABLE, see +`load-theme'." + (interactive) + (cond + ((length= custom-enabled-themes 0) + (user-error "No theme is active, cannot toggle")) + ((length> custom-enabled-themes 1) + (user-error "More than one theme active, cannot unambiguously toggle"))) + (let* ((theme (car custom-enabled-themes)) + (dual (get theme 'dual-theme))) + (unless dual + (error "`%s' has no dual theme to toggle between" theme)) + (disable-theme theme) + (load-theme dual no-confirm no-enable))) + (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. The theme should be in the current buffer. If the user agrees, -- 2.37.2 --=-=-=-- ------------=_1665847504-8247-1-- From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 02:44: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 To: Eli Zaretskii Cc: Philip Kaludercic , larsi@gnus.org, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166614741231673 (code B ref 57639); Wed, 19 Oct 2022 02:44:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 02:43:32 +0000 Received: from localhost ([127.0.0.1]:55339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okz3M-0008En-Ab for submit@debbugs.gnu.org; Tue, 18 Oct 2022 22:43:32 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okz3I-0008EY-Vl for 57639@debbugs.gnu.org; Tue, 18 Oct 2022 22:43:30 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 76A9A80814; Tue, 18 Oct 2022 22:43:22 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E27DC805B2; Tue, 18 Oct 2022 22:43:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666147400; bh=olzZLbbgkncIhyGGnbtBUeeXOprf1tzQ/ycIgsVuZ3Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ELZsaxu/RHp+4n7noJFtcPt9LsZPazt+1Z53j4jRdZ8+xZQpiw1s33ELBwbcONqtG PhCHN9SXntPxvSI8hMu/VuL4Vv6t+F1JtjwltQhOOnSIvzhYe61rswzfKYw14UKMZA xOP58MdK3DdHeY4S17gCMdGWQDwERT/0CZHVGsgPs9gH694+FunXfRYuJmX3nso989 U+SOAKormDDyLU7Z8RWqrSfOOkWGFwBXxk7F855fnZv7HZBM8XTG34LQ5SVPSuqzmM PWqlnV78iArM8UcOAp2xK0iaKVJ0VjJeggpPgX1PYslpt0VW6Q6GauSnHTfcjLvf43 s1fKL1W+SsX5Q== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A6479120F42; Tue, 18 Oct 2022 22:43:20 -0400 (EDT) From: Stefan Monnier In-Reply-To: <83tu489fm6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 13 Oct 2022 13:34:25 +0300") Message-ID: References: <875yhzmz25.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Date: Tue, 18 Oct 2022 22:43:14 -0400 MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.120 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) >> > I think you'd basically put something like the following into >> > `loaddefs-generate--emacs-batch' -- >> > >> > (let ((lisp-mode-autoload-regexp >> > "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) Hmm... `lisp-mode-autoload-regexp` is defined as a `defconst`. If we're going to set it to some other value, we should change its definition to a `defvar`, no? Also, this code should come with a comment explaining why we're doing this silly dance (it took me a while to go from that code to here). [ I don't understand the "noexist" thingy, BTW. Is that intended to be a regexp that will never match? Should it use `regexp-unmatchable` then? Or why not just "^;;;###\\(?3:theme-autoload\\)"? ] >> > (loaddefs-generate >> > (expand-file-name "../etc/themes/" lisp-directory) >> > (expand-file-name "theme-loaddefs.el" lisp-directory))) Note that if one of those ;;;###theme-autoload cookies is placed in front of a function definition, it will still result in a broken: (autoload 'FUNCTIONNAME "etc/themes/FILENAME" ...) which fails because "etc/themes/FILENAME" isn't found in `load-path`. >> > Then you have to teach `loaddefs-generate--make-autoload' to generate >> > the correct forms as a result of the `deftheme' -- which should be some >> > `put's. >> >> OK, it looks like this worked. Just to recap, these are the proposed >> changes: > > What, if anything, does this mean for themes that aren't bundled with > Emacs? > > Also, this needs a NEWS entry. I see this got the following entry: ** Themes have special autoload cookies. All build-in themes are scraped for ;;;###theme-autoload cookies that are loaded along with the regular auto-loaded code. but I can't see any good reason why Emacs users should care about that. It seems like a purely internal hack (and given the restrictions on what can be autoloaded this way, we probably shouldn't advertise it too loudly, unless accompanied with appropriate warnings). Stefan From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 02:47: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166614758031970 (code B ref 57639); Wed, 19 Oct 2022 02:47:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 02:46:20 +0000 Received: from localhost ([127.0.0.1]:55344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okz64-0008JZ-05 for submit@debbugs.gnu.org; Tue, 18 Oct 2022 22:46:20 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okz61-0008JM-Sx for 57639@debbugs.gnu.org; Tue, 18 Oct 2022 22:46:18 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 96AB510013B; Tue, 18 Oct 2022 22:46:12 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2DDE61000E7; Tue, 18 Oct 2022 22:46:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666147571; bh=x+JF8Vl61uDFqiwE3JLf8urgrqzhmTGTbovleMBpoqg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TU+aMnZNdu1g5lVO1rlbv7/ZIqm2aDjzQhg1nRn4mhhHmVViTZHb+EBsrVV5Se9oY dRKXxNrGMWHje3BjMe1HM8fw6Qt4BfG0uBA7qOx0oj/9FXkAzbg8vG1/Xteggsal70 KV8DyBAHD9iNSbR21+VRUKp5N2kqjLg/ShDQmLfUCvvVgru1SkXaMMv3RmX0KqWJfl SicUfsSDeiS7CxxllbJiJOCVSsUrOwfdwsAJCjej6EzNs51hYPwXAQfyvffiIKaGao ySk7JgJOQTnq6SK8g7ip/GpCWIiYw2uYeUC0fYKyQa3NWa5HLXW3qMgQ+DCI6ca20H IQmJ5ekr9FuPQ== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E5DEB120EEF; Tue, 18 Oct 2022 22:46:10 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87ilkn3jgj.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 13 Oct 2022 14:07:56 +0000") Message-ID: References: <875yhzmz25.fsf@posteo.net> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> Date: Tue, 18 Oct 2022 22:46:09 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.071 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) > The fundamental issue that necessitates boilerplate is that packages are > not added to the theme load path, and adding a new cookie type doesn't > change that. We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and add the directory containing the file containing this `deftheme` to the `custom-theme-load-path`. Stefan From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 07:17: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 To: Stefan Monnier Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166616378927569 (code B ref 57639); Wed, 19 Oct 2022 07:17:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 07:16:29 +0000 Received: from localhost ([127.0.0.1]:55660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol3JV-0007Ab-H8 for submit@debbugs.gnu.org; Wed, 19 Oct 2022 03:16:29 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol3JQ-0007AG-5l for 57639@debbugs.gnu.org; Wed, 19 Oct 2022 03:16:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 17F9E240106 for <57639@debbugs.gnu.org>; Wed, 19 Oct 2022 09:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666163778; bh=3sosxBHJb+10H/ceREiB+5aIwqbjVeyofGwCAq1SzcE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=cmLuHd43LyH+79RxZX92hwg/F6bXJijWnYSP9S8jzIFxfhqhMRLl0Osd4hEKK0hB2 VE65fuuh6VacbrSpE81t/SKVyDJtfxS8wGrCI/ABZbzaF5mYBasNIiO/bqtVyv/CmT 6O8JcsOD3Vorg8ptDuTqOHwnmk6RS5U3ZX0vkCCMeNozzS2ixV2DtMM5Qv7h66pqPu hEjdlPOziGWUnYKu7fBj3czKSfB3g9v9ZimziXchiyGmIFuN06FJ7/4MVpoO/WjdAI S6eJJ5t5U4+wZ1tPcz1/MQnTBpqTBguk8mxOAdCkLkuskNwhHJ8hoHuJ2jvxzboY71 PMPzmGEU520Tw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mshq45Yvtz6tnk; Wed, 19 Oct 2022 09:16:14 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Monnier's message of "Tue, 18 Oct 2022 22:46:09 -0400") References: <875yhzmz25.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> 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 Date: Wed, 19 Oct 2022 07:16:13 +0000 Message-ID: <87ilkg472a.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) Stefan Monnier writes: >> The fundamental issue that necessitates boilerplate is that packages are >> not added to the theme load path, and adding a new cookie type doesn't >> change that. > > We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and > add the directory containing the file containing this `deftheme` to the > `custom-theme-load-path`. For packages installed using package.el or in general? If this is possible I think this would be a nice idea. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 07:21: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 To: Stefan Monnier Cc: Eli Zaretskii , larsi@gnus.org, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166616406127995 (code B ref 57639); Wed, 19 Oct 2022 07:21:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 07:21:01 +0000 Received: from localhost ([127.0.0.1]:55665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol3Nt-0007HT-5m for submit@debbugs.gnu.org; Wed, 19 Oct 2022 03:21:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol3Nr-0007HG-KR for 57639@debbugs.gnu.org; Wed, 19 Oct 2022 03:21:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E183424002A for <57639@debbugs.gnu.org>; Wed, 19 Oct 2022 09:20:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666164053; bh=YxBQa/fR7zXhwlAR6b9VigOHIVG3I2pwXpe96HzjeQ4=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=ErfyeNbhp/owmopQhmhW/6152e+OT0hSkDW3xuZZKvv7gyqJIxcU4wDyzhUX0cJrs d1qqOp/8jxWoDnAL27VsYXp3eSZmgYg96bPdwvgkJdi8S9lligf/1u9LBuvmo6Lmvf haArMNLJ51xyQS6jpq93B+0qaYDeP0zjEWDojKPdXk3SMFg3GLQZjJM6HaCP4qTe8c LmCa0yLqAy4zjWDYTiTjixC8GUyBdF4pIirqF6Q7mHyoiAmwOEOiM4qkOz7GULlcXu 9S4lFKniaFSBY27IU9zX/BBK5yx9dp2JGnemW0MOa8wCP/YFFlGA9AS3VF3bCs7oAy cQ5y74suJYXrw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MshwP1gjCz6tnr; Wed, 19 Oct 2022 09:20:53 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Monnier's message of "Tue, 18 Oct 2022 22:43:14 -0400") References: <875yhzmz25.fsf@posteo.net> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> 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 Date: Wed, 19 Oct 2022 07:20:52 +0000 Message-ID: <87edv446uj.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Stefan Monnier writes: >>> > I think you'd basically put something like the following into >>> > `loaddefs-generate--emacs-batch' -- >>> > >>> > (let ((lisp-mode-autoload-regexp >>> > "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) > > Hmm... `lisp-mode-autoload-regexp` is defined as a `defconst`. If we're > going to set it to some other value, we should change its definition to > a `defvar`, no? > > Also, this code should come with a comment explaining why we're doing > this silly dance (it took me a while to go from that code to here). > [ I don't understand the "noexist" thingy, BTW. Is that intended to be > a regexp that will never match? Should it use `regexp-unmatchable` > then? Or why not just "^;;;###\\(?3:theme-autoload\\)"? ] > >>> > (loaddefs-generate >>> > (expand-file-name "../etc/themes/" lisp-directory) >>> > (expand-file-name "theme-loaddefs.el" lisp-directory))) > > Note that if one of those ;;;###theme-autoload cookies is placed in > front of a function definition, it will still result in a broken: > > (autoload 'FUNCTIONNAME "etc/themes/FILENAME" ...) > > which fails because "etc/themes/FILENAME" isn't found in `load-path`. Oh, that sounds bad! >>> > Then you have to teach `loaddefs-generate--make-autoload' to generate >>> > the correct forms as a result of the `deftheme' -- which should be some >>> > `put's. >>> >>> OK, it looks like this worked. Just to recap, these are the proposed >>> changes: >> >> What, if anything, does this mean for themes that aren't bundled with >> Emacs? >> >> Also, this needs a NEWS entry. > > I see this got the following entry: > > ** Themes have special autoload cookies. > All build-in themes are scraped for ;;;###theme-autoload cookies that > are loaded along with the regular auto-loaded code. > > but I can't see any good reason why Emacs users should care about that. > It seems like a purely internal hack (and given the restrictions on > what can be autoloaded this way, we probably shouldn't advertise it too > loudly, unless accompanied with appropriate warnings). Hmm, I believe I agree in retrospect that this doesn't really help anyone. > > Stefan From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 11:01: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 To: Stefan Monnier Cc: philipk@posteo.net, larsi@gnus.org, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166617720426912 (code B ref 57639); Wed, 19 Oct 2022 11:01:02 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 11:00:04 +0000 Received: from localhost ([127.0.0.1]:55947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol6nr-0006zz-Rb for submit@debbugs.gnu.org; Wed, 19 Oct 2022 07:00:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol6nn-0006yu-Rb for 57639@debbugs.gnu.org; Wed, 19 Oct 2022 07:00:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol6ni-0007cJ-0y; Wed, 19 Oct 2022 06:59:54 -0400 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=kR6JSvPTUBMXcUSUmRsuicpu2/7crLzRu2ePxzhL7k8=; b=orYgxNdgB0q7 jQKwWMPd8K2SYyssIuGonAT/xEY3/lWybArgJaBDL3okZYcg6EOinl38LdOPyqdkymFhM4eDr2Wo5 fO0unO7UPRmcv0B0j7uyy7+6ZD53xHVqtiRpOfg3xZsEzbIVyEy5YheeV/hzojqteCnTBfcD3PZzO jfhMTFWOJ/xrI8+dONjgbDG56Tt3FKPIsOV7lhvJAXChy2/nuXjXRMStZyWhZFjWXsajXevU21l83 ANcz/2BnF2I2WyKV+RSXYSHYu04RVCZyqp6QTInhR7bnYdZo9jez0H3NEB5oSoJuobXRc05RkOyOj jFjQnrhwrNY71kyeYDrkxQ==; Received: from [87.69.77.57] (port=1028 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 1ol6nV-0004pz-Gn; Wed, 19 Oct 2022 06:59:51 -0400 Date: Wed, 19 Oct 2022 13:59:33 +0300 Message-Id: <83k04wyt7u.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Tue, 18 Oct 2022 22:43:14 -0400) References: <875yhzmz25.fsf@posteo.net> <87o7v97zy2.fsf@gnus.org> <87bkr9newj.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> X-Spam-Score: -2.3 (--) 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 Monnier > Cc: Philip Kaludercic , larsi@gnus.org, > 57639@debbugs.gnu.org, info@protesilaos.com > Date: Tue, 18 Oct 2022 22:43:14 -0400 > > ** Themes have special autoload cookies. > All build-in themes are scraped for ;;;###theme-autoload cookies that > are loaded along with the regular auto-loaded code. > > but I can't see any good reason why Emacs users should care about that. > It seems like a purely internal hack (and given the restrictions on > what can be autoloaded this way, we probably shouldn't advertise it too > loudly, unless accompanied with appropriate warnings). NEWS is not just for users, it is also for developers, in particular developers of themes. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 12:23: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166618212528417 (code B ref 57639); Wed, 19 Oct 2022 12:23:01 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 12:22:05 +0000 Received: from localhost ([127.0.0.1]:56092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol85E-0007OH-W3 for submit@debbugs.gnu.org; Wed, 19 Oct 2022 08:22:05 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol85C-0007NP-Qs for 57639@debbugs.gnu.org; Wed, 19 Oct 2022 08:22:03 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 48E70100189; Wed, 19 Oct 2022 08:21:57 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B70081000DC; Wed, 19 Oct 2022 08:21:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666182115; bh=1MH2OWgN2AYXBSx1PUVHUhw2sV7rqy+mDeIMhhQry40=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=URZ//eeIRjo94+8iuZ5XZq0XcX2exsb0sbHeElzJVOl6SJd6dKYN3HaJ10/+BV1uf Tx90FnHmaHLX2sVMBst1OGbd9clVwMTBNAd71jOBuDqon0S9iAGubE4pfwSgysvwAF ijrrNj7IJThO+1/cShzU0s/Z61V+Mv+Gd0LAfzZ23ekVZp4EiZ+hAAZIm8mT4DfofE a73qZeaLXUFAfaiiwOw0IUSeT1X2duicRxKsY0ARrLmzKW5LDfpEAs442Fn9aZPkTJ VFS9lhitRnk3yF47uP3nBuGyjDW0qMwVqbetoB/CJoHWJ9okNMVRnh97q6AZfP3lLZ 5fsweyyAtSM4Q== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5330D12065C; Wed, 19 Oct 2022 08:21:55 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87ilkg472a.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 19 Oct 2022 07:16:13 +0000") Message-ID: References: <875yhzmz25.fsf@posteo.net> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> <87ilkg472a.fsf@posteo.net> Date: Wed, 19 Oct 2022 08:21:54 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.072 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) Philip Kaludercic [2022-10-19 07:16:13] wrote: > Stefan Monnier writes: >>> The fundamental issue that necessitates boilerplate is that packages are >>> not added to the theme load path, and adding a new cookie type doesn't >>> change that. >> We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and >> add the directory containing the file containing this `deftheme` to the >> `custom-theme-load-path`. > For packages installed using package.el or in general? In general. For those few built-in themes, it would mean we'd repeatedly add the same dir to `custom-theme-load-path`, which is inefficient, but this inefficiency should be completely harmless (it's paid for during the preload). > If this is possible I think this would be a nice idea. It should be easy to do. Stefan From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 12:26: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 To: Eli Zaretskii Cc: philipk@posteo.net, larsi@gnus.org, info@protesilaos.com, 57639@debbugs.gnu.org Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166618235528819 (code B ref 57639); Wed, 19 Oct 2022 12:26:01 +0000 Received: (at 57639) by debbugs.gnu.org; 19 Oct 2022 12:25:55 +0000 Received: from localhost ([127.0.0.1]:56108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol88k-0007US-G7 for submit@debbugs.gnu.org; Wed, 19 Oct 2022 08:25:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol88d-0007UA-HI for 57639@debbugs.gnu.org; Wed, 19 Oct 2022 08:25:42 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2CA6F100189; Wed, 19 Oct 2022 08:25:30 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 609691000DC; Wed, 19 Oct 2022 08:25:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666182328; bh=86CXECAfjMd9enR3yZ1db4/VM1JUylqLXobfecvwGEo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ft0GTdo4tHv6EnXe0OSFlBTbkuB839GKPAta1gELlcxrrkfyFHquFAdfACautf4g2 a8Zv9/YFncfp6/8u/HZANKr8Ardaw5EJKk4XOIU/oT964co5djJx8xymGjdqXHky/8 qFBj7I13ry8hAyAW2glYOeEwWstQxNiLdXqHSn3gVf/uzfWdznwEU6qVQIr+ZQlAE0 R8DANnNtUg8zqaa7jxwpdJx5ffrWk/sDIi/zdSAzjDKeRrdLxa5Esh++WYlo21nqkh rKWNTqMDY/xEHArTZq2CRt5V85eCKPO/3B1d3DAAtR8F//dV99mrWtVaXlBpaOdqDi DW8yzUFBD0gxw== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1F021120D85; Wed, 19 Oct 2022 08:25:28 -0400 (EDT) From: Stefan Monnier In-Reply-To: <83k04wyt7u.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 19 Oct 2022 13:59:33 +0300") Message-ID: References: <875yhzmz25.fsf@posteo.net> <871qs57yai.fsf@gnus.org> <87y1udlzlt.fsf@posteo.net> <87o7v953uf.fsf@gnus.org> <87tu50nca7.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <83k04wyt7u.fsf@gnu.org> Date: Wed, 19 Oct 2022 08:25:26 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.072 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 [2022-10-19 13:59:33] wrote: >> From: Stefan Monnier >> Cc: Philip Kaludercic , larsi@gnus.org, >> 57639@debbugs.gnu.org, info@protesilaos.com >> Date: Tue, 18 Oct 2022 22:43:14 -0400 >> >> ** Themes have special autoload cookies. >> All build-in themes are scraped for ;;;###theme-autoload cookies that >> are loaded along with the regular auto-loaded code. >> >> but I can't see any good reason why Emacs users should care about that. >> It seems like a purely internal hack (and given the restrictions on >> what can be autoloaded this way, we probably shouldn't advertise it too >> loudly, unless accompanied with appropriate warnings). > > NEWS is not just for users, it is also for developers, in particular > developers of themes. But the above is only potentially useful for those themes that are built-in. That's a mighty small audience, if you ask me, and IIUC that audience was already part of the discussion that introduced this change, so they won't learn it from etc/NEWS :-( Stefan From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 16:41: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 To: Stefan Monnier Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166628402821619 (code B ref 57639); Thu, 20 Oct 2022 16:41:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Oct 2022 16:40:28 +0000 Received: from localhost ([127.0.0.1]:36024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olYaq-0005cd-2V for submit@debbugs.gnu.org; Thu, 20 Oct 2022 12:40:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]:59559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olYan-0005cF-Ug for 57639@debbugs.gnu.org; Thu, 20 Oct 2022 12:40:26 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3D32B240106 for <57639@debbugs.gnu.org>; Thu, 20 Oct 2022 18:40:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666284020; bh=SYUavsmDUw+ihZtDri5eEPoqHsVz9Np0bXFnppUO4R8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=hTkdPh7htDm8ei23cSWw82AA+CQIw3VILDKaJeMVWIBGKYjXwIaqrwuvy4gALuNrb lBbQHL4VvZXGEdPtiTjkYiGS90hboL8A1FiDN1Yy0uMLn+hCL6HO5xWIPPJs+Na0XX dYJfjjw4ec9Fyan9DqW4vaW7cPpSSDPn/8XDaikt2RVcoVBJ4JbJx6R+mvvKh4hE2m Na2WWkourHRKjPLpfkL80KuxMbcdyz3IzboaWCjHBcCuMGwitZMUjkjmDsnVByRIzI kPybLnR6QNTqrtQvHOTA0xutRPnGt9F/pSRp5+Kdn9OsdivnYPlNwDG3pSqDo3hPlL CtpzT+A2Ank5A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MtYHQ71zpz9rxM; Thu, 20 Oct 2022 18:40:18 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Monnier's message of "Wed, 19 Oct 2022 08:21:54 -0400") References: <875yhzmz25.fsf@posteo.net> <87a6652lyb.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> <87ilkg472a.fsf@posteo.net> 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 Date: Thu, 20 Oct 2022 16:40:18 +0000 Message-ID: <87a65qla8d.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Stefan Monnier writes: > Philip Kaludercic [2022-10-19 07:16:13] wrote: >> Stefan Monnier writes: >>>> The fundamental issue that necessitates boilerplate is that packages are >>>> not added to the theme load path, and adding a new cookie type doesn't >>>> change that. >>> We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and >>> add the directory containing the file containing this `deftheme` to the >>> `custom-theme-load-path`. >> For packages installed using package.el or in general? > > In general. For those few built-in themes, it would mean we'd > repeatedly add the same dir to `custom-theme-load-path`, which is > inefficient, but this inefficiency should be completely harmless (it's > paid for during the preload). > >> If this is possible I think this would be a nice idea. > > It should be easy to do. Sadly I am stumped on how this could be done, as I have little experience with the bootstrapping process. Could you give me a few pointers? From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 17:05: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166628549224057 (code B ref 57639); Thu, 20 Oct 2022 17:05:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Oct 2022 17:04:52 +0000 Received: from localhost ([127.0.0.1]:36055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olYyR-0006Fw-Rk for submit@debbugs.gnu.org; Thu, 20 Oct 2022 13:04:52 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olYyF-0006FY-LA for 57639@debbugs.gnu.org; Thu, 20 Oct 2022 13:04:50 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CD3B780976; Thu, 20 Oct 2022 13:04:33 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3BB18807AF; Thu, 20 Oct 2022 13:04:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666285472; bh=CyD2CUt6cKaUWSxkmVOpseaij878iwrhkBcODo4/DAs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SQOChr66/d9PdVjYlKdgoaS61UUdLnUBA61SwBby5vE+5wrwDJhjwymScw3jtRiKR ByQLs6lCy6fV+m4J2gEysQ6WYzpH/y2bp+DKV898hKItP5/taHIYDerqnQcDXbj1zM bPCg8RtOGoC3YNYwe8NUYIWs8XbDClWgcntEevnU8PiLtYNRKwDzVybcP4x3aCZ1PO k6yqJfJ6rAuzj77m1/yIG/p4I2jnCtVodU5oP5eZnISgExE+o23RPqay+31RkT8k/Q +N6xnCi68QLPGtZ/IYeHWcdwmnM2tf5V6yYxMWQ4T0JUZmv9V9kJjOR2S6vBOYrIk9 wltFDXfIvc5lQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0E47C120EC8; Thu, 20 Oct 2022 13:04:32 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87a65qla8d.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 20 Oct 2022 16:40:18 +0000") Message-ID: References: <875yhzmz25.fsf@posteo.net> <875ygtqdho.fsf@gnus.org> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> <87ilkg472a.fsf@posteo.net> <87a65qla8d.fsf@posteo.net> Date: Thu, 20 Oct 2022 13:04:28 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.176 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) >>>> We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and >>>> add the directory containing the file containing this `deftheme` to the >>>> `custom-theme-load-path`. >>> If this is possible I think this would be a nice idea. >> It should be easy to do. > Sadly I am stumped on how this could be done, as I have little > experience with the bootstrapping process. Could you give me a few pointers? I was thinking of something like the patch below. Stefan diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index ecc5f7e47bd..a07d0e9ad61 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -286,8 +286,16 @@ loaddefs-generate--make-autoload ;; Extract theme properties. ((eq car 'deftheme) (let* ((name (car-safe (cdr-safe form))) - (props (nthcdr 3 form))) - `(put ',name 'theme-properties (list ,@props)))) + (props (nthcdr 3 form)) + (dir (file-name-directory file))) + `(progn + (add-to-list 'custom-theme-load-path + ,(if dir + `(expand-file-name ,dir + (file-name-directory + (macroexp-file-name))) + `(file-name-directory (macroexp-file-name)))) + (put ',name 'theme-properties (list ,@props))))) ((eq car 'defgroup) ;; In Emacs this is normally handled separately by cus-dep.el, but for From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 17: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 To: Stefan Monnier Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166628778127636 (code B ref 57639); Thu, 20 Oct 2022 17:43:02 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Oct 2022 17:43:01 +0000 Received: from localhost ([127.0.0.1]:36084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olZZM-0007Bf-Qy for submit@debbugs.gnu.org; Thu, 20 Oct 2022 13:43:01 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olZZL-0007BQ-B8 for 57639@debbugs.gnu.org; Thu, 20 Oct 2022 13:43:00 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CEE9C240106 for <57639@debbugs.gnu.org>; Thu, 20 Oct 2022 19:42:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666287773; bh=tOW7qiu8j1bVE2pyM1WvJBDc+l0fDdSLNte+t0lsndo=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=BA/EdZca4Y49oEoIHzNpuwobE8EIY/DhmnM2Gv2PBfZ4iutGCHSMCUUBEJHkqCDnQ g9fY6fb6Kn5ZgvfTnDFixgDFNORssLi2Ol/6GLHma1rmgd8zJ2fzEjIpZZwozbhxar lmOa8qTQM1WsXIZSVtVW7HPVZSY6lE/b9Tn3NXb2/d+D2G4mnBM14qZfVJIwzfgMxY eAt6RLPfGyT8is76lOLEjV32qq39I8b+EYLVvmdUHUQ08aEXxa22xiEzz9ZeznN5NT 7aUFGgvBRKkXL8ZyYXFUvYwIcGduaY2zFyZ48kRwqAoJ+qeNX5ddm3/7Jp3LYEp5m/ w8kfEekFxkbjw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MtZgc3XWCz9rxd; Thu, 20 Oct 2022 19:42:52 +0200 (CEST) From: Philip Kaludercic In-Reply-To: (Stefan Monnier's message of "Thu, 20 Oct 2022 13:04:28 -0400") References: <875yhzmz25.fsf@posteo.net> <87wn99114w.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> <87ilkg472a.fsf@posteo.net> <87a65qla8d.fsf@posteo.net> 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 Date: Thu, 20 Oct 2022 17:42:52 +0000 Message-ID: <87wn8ujsrn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (-) Stefan Monnier writes: >>>>> We could arrange for `autoload/loaddefs-gen` to recognize `deftheme` and >>>>> add the directory containing the file containing this `deftheme` to the >>>>> `custom-theme-load-path`. >>>> If this is possible I think this would be a nice idea. >>> It should be easy to do. >> Sadly I am stumped on how this could be done, as I have little >> experience with the bootstrapping process. Could you give me a few pointers? > > I was thinking of something like the patch below. > > > Stefan > > > diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el > index ecc5f7e47bd..a07d0e9ad61 100644 > --- a/lisp/emacs-lisp/loaddefs-gen.el > +++ b/lisp/emacs-lisp/loaddefs-gen.el > @@ -286,8 +286,16 @@ loaddefs-generate--make-autoload > ;; Extract theme properties. > ((eq car 'deftheme) > (let* ((name (car-safe (cdr-safe form))) > - (props (nthcdr 3 form))) > - `(put ',name 'theme-properties (list ,@props)))) > + (props (nthcdr 3 form)) > + (dir (file-name-directory file))) > + `(progn > + (add-to-list 'custom-theme-load-path > + ,(if dir > + `(expand-file-name ,dir > + (file-name-directory > + (macroexp-file-name))) > + `(file-name-directory (macroexp-file-name)))) > + (put ',name 'theme-properties (list ,@props))))) > > ((eq car 'defgroup) > ;; In Emacs this is normally handled separately by cus-dep.el, but for Ah, I see. Initially my assumption was that you were talking about the automatic scraping of unannotated (deftheme ...) forms. I'll try this patch out, see how it works and report back. From unknown Fri Jun 20 18:23:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 20:02: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 To: Philip Kaludercic Cc: Eli Zaretskii , 57639@debbugs.gnu.org, Stefan Kangas , larsi@gnus.org, info@protesilaos.com Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166629607916855 (code B ref 57639); Thu, 20 Oct 2022 20:02:01 +0000 Received: (at 57639) by debbugs.gnu.org; 20 Oct 2022 20:01:19 +0000 Received: from localhost ([127.0.0.1]:36198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olbjD-0004Nn-74 for submit@debbugs.gnu.org; Thu, 20 Oct 2022 16:01:19 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olbjB-0004NZ-P0 for 57639@debbugs.gnu.org; Thu, 20 Oct 2022 16:01:18 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F18371001D4; Thu, 20 Oct 2022 16:01:11 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D71A210011D; Thu, 20 Oct 2022 16:01:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666296069; bh=sOt83F6VOzHgt2PcQafOrwfcoKfr8OkvTID8HgER13w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=akUKMSCRKGyUuqpHXdFL8tZKOzUNVtncxUQHR7Xcf5v3nmTokLvmoBIZYl2RSvsdw jbJzYWA5bl2TbYlvsAew0vI8EIYNfAh1QLyZ2zjbyloeDor3ChgzFlHFIPZmRs1GaH phdqGAl8MjRhOzU0V5C5O1soc2itp50ml8YI09DcpG4ibI2Ou/rDKOscynI/c6Frnk HD4rkg3pLpgD+TC7Wv8lklKXWiB0NJSM9xuYzXlLTntdb4sChrT0DqT11FEFGBrWQ2 gEP37sZydksTkwtTWbCpyeES9rPkjijWq2tmLXNn0jj3h3peQbbq9QzM00ln4jHv3+ 3smCgxx0OsaFg== Received: from alfajor (modemcable160.79-202-24.mc.videotron.ca [24.202.79.160]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 96B69120E74; Thu, 20 Oct 2022 16:01:09 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87wn8ujsrn.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 20 Oct 2022 17:42:52 +0000") Message-ID: References: <875yhzmz25.fsf@posteo.net> <87wn98nlhq.fsf@gnus.org> <87lepo9c1e.fsf@posteo.net> <87r0zfkxzx.fsf@gnus.org> <87pmeyg24x.fsf@posteo.net> <87edvef8nc.fsf@gnus.org> <871qre2l63.fsf@posteo.net> <875ygqf7pc.fsf@gnus.org> <87r0ze15rt.fsf@posteo.net> <871qref5mq.fsf@gnus.org> <875ygohztx.fsf@posteo.net> <83tu489fm6.fsf@gnu.org> <8735bs3ta0.fsf@posteo.net> <87ilkn3jgj.fsf@posteo.net> <87ilkg472a.fsf@posteo.net> <87a65qla8d.fsf@posteo.net> <87wn8ujsrn.fsf@posteo.net> Date: Thu, 20 Oct 2022 16:01:08 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.318 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) > Ah, I see. Initially my assumption was that you were talking about the > automatic scraping of unannotated (deftheme ...) forms. I'll try this > patch out, see how it works and report back. Ah, I guess we could do that as well, but it's more work and it doesn't seem super important. Stefan