From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Fri, 14 Oct 2022 08:22:20 -0300 Message-ID: References: <12653550-6233-db76-c8a4-70bd80173a9b@gmail.com> <87czavicyf.fsf@posteo.net> <4dd18eb5-6f4c-3d14-c32a-f682c2dcd56d@gmail.com> <874jw6j230.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 13:25:27 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojIog-0002gs-BR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 13:25:26 +0200 Original-Received: from localhost ([::1]:53236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojIod-0004vU-OR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 07:25:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojImQ-0003At-Dr for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 07:23:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojImM-0000Nz-Hv for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 07:23:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojImM-0005oK-5C for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 07:23:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166574655722286 (code B ref 57639); Fri, 14 Oct 2022 11:23:02 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 11:22:37 +0000 Original-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 Original-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 Original-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) Original-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) Content-Language: en-US In-Reply-To: <874jw6j230.fsf@posteo.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245402 Archived-At: 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.