From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: M-x toggle-theme Date: Tue, 22 Nov 2022 18:08:18 +0000 Message-ID: <87mt8iamlp.fsf@posteo.net> References: <875yf9xvja.phibqa@vnoxvs.kbxpyjyhg.info> <8735abj43k.fsf@dataswamp.org> <87wn7niiaf.fsf@codeisgreat.org> <87v8n79b80.fsf@posteo.net> <878rk2x4ml.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29996"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Akib Azmain Turja Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 22 19:09:40 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxXiG-0007ZO-Kk for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 19:09:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxXh7-0001S9-Se; Tue, 22 Nov 2022 13:08:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxXh1-0001Np-3s for help-gnu-emacs@gnu.org; Tue, 22 Nov 2022 13:08:24 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxXgz-0000N1-10 for help-gnu-emacs@gnu.org; Tue, 22 Nov 2022 13:08:22 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AC18A240105 for ; Tue, 22 Nov 2022 19:08:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669140498; bh=Bs1kt/8wBVf9vBnnIOxrHQh+gGNqn3PwH57G+MQfKuE=; h=From:To:Cc:Subject:Date:From; b=IeMPKqCc+dwe/pSRLVgwL54rnM77QP7z41bsa+4X1v1qeVLXb5eqX47Xt/VXWKWFP Cm7sX/A3kJK2+WD0IBPWvvE45eKVl1z4ITZLanAy8acrKZex3DSdypjVrJLlrVL9Mk SQHr/g2AG5FArL/veTUUealwS0f9HvZGHm5ErvX2Kn3dp98UF7Ou29FB/KCSAzZIj5 LdjSlYFgDVeEjmvcK1LbcIKoKjqLLxV9lPCy5IwsUx9Ni/vyRLpKEF1TwadK8GCXrT 15vVxkZ0LveN19D8ntXftBz3l70tmkZifWX/Scv2JbuZSU0ndOWQJ0GWdWN5wTOk2Y LMjjZR+ciuqsw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NGsgk155gz9rxM; Tue, 22 Nov 2022 19:08:17 +0100 (CET) In-Reply-To: <878rk2x4ml.fsf@disroot.org> (Akib Azmain Turja's message of "Tue, 22 Nov 2022 23:48:02 +0600") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141110 Archived-At: Akib Azmain Turja writes: > Philip Kaludercic writes: > >> Jean Louis writes: >> >>> * Pankaj Jangid [2022-11-22 10:03]: >>>> 2. Earlier I wrote a function to toggle themes. Now it is builtin. >>> >>> I have just tried: M-x toggle-theme and I get error: >>> >>> toggle-theme: Theme =E2=80=98light-blue=E2=80=99 does not have any know= n variants >>> >>> This may be because=20 >>> >>> '(custom-enabled-themes '(light-blue)) >>> >>> So toggle-theme should have better working. >> >> You misunderstand the mechanism by which toggle-theme works. A theme >> may declare a family: >> >> (deftheme tsdh-light >> "A light Emacs theme. >> Used and created by Tassilo Horn." >> :background-mode 'light >> :kind 'color-scheme >> :family 'tsdh) >> >> When a theme of this family is enabled, M-x toggle-theme will either >> prompt the user or toggle the theme to some other member of the family >> automatically (the latter works if there are only two themes to switch >> between). >> > > This is nice, no need for modus-themes-toggle in modus-themes. There was an attempt to deprecate that command in favour of toggle-theme, but Prot decided against it: https://lists.sr.ht/~protesilaos/modus-themes/%3C877d116lh4.fsf%40posteo.ne= t%3E#%3C87y1tdeeyw.fsf@protesilaos.com%3E