GNU bug report logs - #57639
[PATCH] Add new command 'toggle-theme'

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Wed, 7 Sep 2022 07:20:01 UTC

Severity: wishlist

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philip Kaludercic <philipk <at> posteo.net>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>, Protesilaos Stavrou <info <at> protesilaos.com>, 57639 <at> debbugs.gnu.org
Subject: bug#57639: [PATCH] Add new command 'toggle-theme'
Date: Fri, 14 Oct 2022 15:21:30 +0000
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>> Mauro Aranda <maurooaranda <at> gmail.com> 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 <at> 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.

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)
>>>>>> +  "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.

Of course, thanks for catching that!




This bug report was last modified 2 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.