From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Fri, 14 Oct 2022 15:21:30 +0000 Message-ID: <87fsfqh1mt.fsf@posteo.net> 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 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23726"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Eli Zaretskii , Protesilaos Stavrou , 57639@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 17:44:16 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 1ojMrA-00060U-6i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 17:44:16 +0200 Original-Received: from localhost ([::1]:39160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojMr9-0000Nd-71 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 11:44:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojMVe-0004Yw-At for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojMVe-0000WO-15 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojMVd-0006pV-Rm for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 11:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: 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 Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166576090026222 (code B ref 57639); Fri, 14 Oct 2022 15:22:01 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 14 Oct 2022 15:21:40 +0000 Original-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 Original-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 Original-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== Original-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) In-Reply-To: (Mauro Aranda's message of "Fri, 14 Oct 2022 08:22:20 -0300") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245457 Archived-At: 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!