From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: modus-themes ELPA and etc/themes Date: Sun, 21 Mar 2021 00:49:24 +0200 Message-ID: <8735wpxwy3.fsf@protesilaos.com> References: <8335wpd166.fsf@gnu.org> <874kh54in7.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5455"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 20 23:50:45 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lNkQf-0001L2-EC for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Mar 2021 23:50:45 +0100 Original-Received: from localhost ([::1]:48970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNkQe-0003mW-G5 for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Mar 2021 18:50:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNkPV-0002uU-Bt for emacs-devel@gnu.org; Sat, 20 Mar 2021 18:49:33 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNkPT-00042q-FE for emacs-devel@gnu.org; Sat, 20 Mar 2021 18:49:33 -0400 X-Originating-IP: 94.46.225.161 Original-Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id B5EEC20003; Sat, 20 Mar 2021 22:49:26 +0000 (UTC) In-Reply-To: <874kh54in7.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 20 Mar 2021 21:31:08 +0000") Received-SPF: none client-ip=217.70.183.200; envelope-from=info@protesilaos.com; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266679 Archived-At: On 2021-03-20, 21:31 +0000, "Basil L. Contovounesios" wrote: > Stefan Monnier writes: > >> OK, so it's a definite no for moving `etc/themes`. >> >> How 'bout moving just `modus-themes.el` (it's a fresh new file, so the >> forensics aspect shouldn't matter that much, especially since the real >> Git history is in the upstream repository rather than in emacs.git >> anyway)? Part of the reason why `modus-themes.el` could be treated >> differently is that it actually contains a fair bit of ELisp code, so it >> would make sense to compile it. > > [Just for posterity - this was touched on in bug#45068 to an extent.] A very short summary of that bug, as pertains to this point: + A file that resides in etc/themes cannot be loaded with just a (require) call because it is not in the load-path. + We need such a functionality to load the main modus-themes.el from within modus-{operandi,vivendi}-theme.el. The former contains the bulk of the code, while the latter two expand the relevant parts into actual themes. + To make everything work inside etc/themes we had to use the new 'require-theme' function, which accounts for that directory. -- Protesilaos Stavrou protesilaos.com