From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Sun, 18 Sep 2022 09:53:53 +0300 Message-ID: <83h715yxz2.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57639@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 18 08:55:18 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 1oZoCz-0002c9-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 08:55:18 +0200 Original-Received: from localhost ([::1]:59810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZoCy-0007ll-Q1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 02:55:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZoCk-0007lM-1J for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 02:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZoCj-00078c-PA for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 02:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZoCj-0006o7-KW for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 02:55:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166348404526101 (code B ref 57639); Sun, 18 Sep 2022 06:55:01 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 06:54:05 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: <871qs9fzz5.fsf@posteo.net> (message from Philip Kaludercic on Sat, 17 Sep 2022 21:33:18 +0000) 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:242927 Archived-At: > 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.