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 15:52:27 +0300 Message-ID: <83a66wzvxw.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> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36358"; 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 14:53:24 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 1oZtnW-0009GF-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 14:53:22 +0200 Original-Received: from localhost ([::1]:38060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZtnV-0006vg-NV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 08:53:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZtnH-0006uO-HK for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:53:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZtnC-0003c0-GJ for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:53:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZtnC-0000aN-C4 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 08:53:02 -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 12:53: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.16635055582209 (code B ref 57639); Sun, 18 Sep 2022 12:53:02 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 18 Sep 2022 12:52:38 +0000 Original-Received: from localhost ([127.0.0.1]:48311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtmo-0000ZZ-2f for submit@debbugs.gnu.org; Sun, 18 Sep 2022 08:52:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZtmk-0000ZG-7H for 57639@debbugs.gnu.org; Sun, 18 Sep 2022 08:52:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZtme-0003U5-Ti; Sun, 18 Sep 2022 08:52:28 -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=9VDhEXmX0QJxmagumbiKQcJkhGtEII4DTp+Tz0COfGc=; b=KF+H+nqmUOT0 YiTWWy97aRoWnFjNEcYBSmrpehCUgLCO+SscnC1Rle3pey/dIzr/xcVgPOiFciYSs2M7bloSPWC24 zLgY0DWwCeVGGX4prfWkhDyEt9jew0PrvFQh/hng8+dxUgJeh3muQXQXTjj5djucavgqME9hKCsP5 rhvSrs0ebm3TK/1v+ZmbHN4OImdqoHPC6zBxilOksTCGWomqiW+wHJdbjg+j86bclSz4wsj1bpRNX Kf9ETGeBESdf/samLRlp1GT6EBTmVckL/Jdbe7oEYu8mpQbkLZSg3yh65tWGYLItFvtoyqHkt4wp7 Cg3MuydX8lCUSLV4tZdVRQ==; Original-Received: from [87.69.77.57] (port=1986 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 1oZtme-0001ig-Cd; Sun, 18 Sep 2022 08:52:28 -0400 In-Reply-To: <87h715dnut.fsf@posteo.net> (message from Philip Kaludercic on Sun, 18 Sep 2022 09:38:02 +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:242987 Archived-At: > 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.