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#45068: [PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible) Date: Fri, 11 Dec 2020 20:39:20 +0200 Message-ID: <83lfe4192f.fsf@gnu.org> References: <87im9fgm27.fsf@protesilaos.com> <87zh2ozer4.fsf@tcd.ie> <87ft4edret.fsf@protesilaos.com> <87zh2ldgtf.fsf@protesilaos.com> <87k0toof83.fsf@mail.linkov.net> <83wnxo1mcr.fsf@gnu.org> <83v9d81khh.fsf@gnu.org> <83mtyk1hq3.fsf@gnu.org> <87czzgbapt.fsf@protesilaos.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contovob@tcd.ie, 45068@debbugs.gnu.org, stefankangas@gmail.com, juri@linkov.net To: Protesilaos Stavrou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 11 19:50:57 2020 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 1knnVJ-0001e2-Fq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 19:50:57 +0100 Original-Received: from localhost ([::1]:55486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knnVI-0006tw-Ey for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 13:50:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knnKj-0006az-TB for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 13:40:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knnKj-0008DL-Kr for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 13:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knnKj-0000Tc-HP for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 13:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Dec 2020 18:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45068-submit@debbugs.gnu.org id=B45068.16077119941815 (code B ref 45068); Fri, 11 Dec 2020 18:40:01 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 11 Dec 2020 18:39:54 +0000 Original-Received: from localhost ([127.0.0.1]:42912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knnKb-0000TC-7x for submit@debbugs.gnu.org; Fri, 11 Dec 2020 13:39:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knnKV-0000Sv-Nj for 45068@debbugs.gnu.org; Fri, 11 Dec 2020 13:39:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51845) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knnKN-00087V-W8; Fri, 11 Dec 2020 13:39:40 -0500 Original-Received: from [176.228.60.248] (port=1616 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1knnKM-0005JR-2t; Fri, 11 Dec 2020 13:39:38 -0500 In-Reply-To: <87czzgbapt.fsf@protesilaos.com> (message from Protesilaos Stavrou on Fri, 11 Dec 2020 17:53:34 +0200) 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:195795 Archived-At: > From: Protesilaos Stavrou > Cc: Stefan Kangas , juri@linkov.net, > contovob@tcd.ie, 45068@debbugs.gnu.org > Date: Fri, 11 Dec 2020 17:53:34 +0200 > > >> > What theme-related files need to be byte-compiled, and why? > >> > >> I believe the issues involved are explained in some detail in the first > >> message in this bug report. > > > > If they are, I'm missing that. All I see is an assertion that the > > files must be byte-compiled: > > > >> The problem with contributing this new code to Emacs is that it cannot > >> work if it is placed in ../etc/themes/. Instead, the files need to be > >> in a path that handles byte-compilation, like ../lisp/modus-themes/. > > > > I'm probably missing something, and that is what I'm asking to > > elaborate on. > > There now are four *.el files that make up the project: > > + modus-themes.el contains all defcustom, color palettes as alists, > helper functions, and the face specs. > > + modus-themes-core.el contains a macro that 'let' binds the > aforementioned alists around 'custom-theme-set-faces' and > 'custom-theme-set-variables'. > > + modus-{operandi-vivendi}-theme.el contain a 'deftheme' and concomitant > 'provide-theme' referencing each of them and just expand the macro. > > - Each of those files has (require 'modus-themes) and > (eval-when-compile (require 'modus-themes-core)). Though I also > tried without the eval-when-compile part. > > When I attempted to place all four files in etc/themes/ and then start a > new 'emacs -Q' session, M-x load-theme RET modus-{operandi,vivendi} > would throw an error: > > Cannot open load file: No such file or directory, modus-themes So this is not about byte-compiling, it's about being able to load some of the files that constitute this group of themes? If so, I see several possibilities: . make a single file with all the functionalities . invent a new function custom-require that would search the custom load-path, and use that instead of 'require' . don't consider this a "theme", but a normal Lisp package (since it basically violates the conventions for writing a theme)