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: Sun, 18 Sep 2022 12:56:30 +0000 Message-ID: <87illk4z9d.fsf@posteo.net> 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> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <83a66wzvxw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14275"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57639@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 18 14:57:11 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 1oZtrC-0003bp-P6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 14:57:10 +0200 Original-Received: from localhost ([::1]:53148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZtrB-0000Kt-PV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 08:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZtr4-0000KQ-3U for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZtr3-0004HM-RF for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZtr3-0000iC-Le for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:57: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: Sun, 18 Sep 2022 12:57: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.16635058002688 (code B ref 57639); Sun, 18 Sep 2022 12:57:01 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 12:56:40 +0000 Original-Received: from localhost ([127.0.0.1]:48329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtqi-0000hH-9o for submit@debbugs.gnu.org; Sun, 18 Sep 2022 08:56:40 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:42305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtqg-0000h3-Qp for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 08:56:39 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1B694240026 for <57639@debbugs.gnu.org>; Sun, 18 Sep 2022 14:56:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663505793; bh=bRT4H+VdldrUQzDjBD02nP+FLAQUdwQ/RLlhV9dmles=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=mpNFbWWdDAbRVYnIyHKI093EOSimAV0k+TiOhKJJ3nykr1s4staVA0kZYiEj7h4S1 JARoUBVPyK+EaXAECC3adGnQ1inmhCbUhVr51o1a1lQz9GF96MZBXNgHwe7RZbo2qN fcMD2zRM7ms9Mxmj8bf5FGKp+Sajhq2qpbDPExOdkDWG6aPb/IvTqM1Tocq823o6z0 9S6+uR1L3tjQEeH1otU3h0SEXNjB1LXo+L69Z/3W1QfaIIXZHxiV1C4o3P2d1S6sj2 TYZXxQ35ZNgKDVXoBx+CbQYf9r43aVNvhrgU6xZFVZH81xa4ChsBE2RFrRWAsA8yMJ 45k+yEeeFXqcA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MVnr017hpz9rxH; Sun, 18 Sep 2022 14:56:31 +0200 (CEST) In-Reply-To: <83a66wzvxw.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Sep 2022 15:52:27 +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:242990 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: larsi@gnus.org, 57639@debbugs.gnu.org >> Date: Sun, 18 Sep 2022 09:38:02 +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 >> >> I get what you mean... how about >> >> (error "Theme `%s' is not part of a family of variants" theme) >> >> ? > > Theme `%s' is not part of a family of theme variants > >> >> +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. >> >> My intention was for this to be an explanation. The issue is that >> variants and family are mutually recursive concepts: >> >> - A variant of a theme are those which are part of the same family >> - A family of themes is the set of all variants of a theme. >> >> Perhaps it is just easier to collapse both concepts into either variant >> of family and just "expose" by documenting it. I've tried doing so >> below. > > Here's an attempt to explain what is a "family", in case it can still > be of interest: > > A @dfn{family} of themes is a set of similar themes that differ by > minor aspects, such as face colors that are meant for the light vs > dark background of the frame. I personally think it is better to omit this for now. Perhaps this can be mentioned if or when the theme tags are formalised.