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 for Modus themes 1.1.1? Date: Sat, 27 Feb 2021 10:15:54 +0200 Message-ID: <83zgzqncxx.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> <83lfe4192f.fsf@gnu.org> <83im9814oh.fsf@gnu.org> <87sg6po0yd.fsf_-_@protesilaos.com> <83czxt2fpd.fsf@gnu.org> <87h7m0n0em.fsf@protesilaos.com> <83v9agryuz.fsf@gnu.org> <87tupyw83e.fsf@protesilaos.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45068@debbugs.gnu.org To: Protesilaos Stavrou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 27 09:17:11 2021 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 1lFumj-00086O-WD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Feb 2021 09:17:10 +0100 Original-Received: from localhost ([::1]:41290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFumi-0001er-Db for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Feb 2021 03:17:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFumc-0001df-KY for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 03:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFumc-00062r-Bp for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 03:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFumc-0007Qz-6h for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 03:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Feb 2021 08:17:02 +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.161441377228514 (code B ref 45068); Sat, 27 Feb 2021 08:17:02 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 27 Feb 2021 08:16:12 +0000 Original-Received: from localhost ([127.0.0.1]:43145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFuln-0007Pq-KY for submit@debbugs.gnu.org; Sat, 27 Feb 2021 03:16:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFull-0007Pa-Jt for 45068@debbugs.gnu.org; Sat, 27 Feb 2021 03:16:10 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56974) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFule-0005G5-Tp; Sat, 27 Feb 2021 03:16:03 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3403 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lFule-0000o2-9E; Sat, 27 Feb 2021 03:16:02 -0500 In-Reply-To: <87tupyw83e.fsf@protesilaos.com> (message from Protesilaos Stavrou on Sat, 27 Feb 2021 04:35:49 +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:200928 Archived-At: > From: Protesilaos Stavrou > Cc: 45068@debbugs.gnu.org > Date: Sat, 27 Feb 2021 04:35:49 +0200 > > > A simple implementation that checks whether a theme is already loaded, > > and if not, looks it up in a suitable list of directories and loads > > when found. The main part is to make sure themes are looked up in the > > directories where we expect them to be, as opposed to load-path, which > > is where 'require' looks for files to load. A Lisp implementation > > should be fine, I think. > > > > Let me know if you need further clarifications. > > Hello Eli, > > This is what I could come up with. It is not what you stipulated, as it > only accounts for the default themes' directory instead of checking the > 'custom-theme-load-path'. Hmm... I'm surprised. What I had in mind was a simple use of locate-file, which already accepts a path argument, so you could pass custom-theme-load-path to it, and it would do the job. Maybe I misunderstand or misremember the problem which led us here. Wasn't the problem that 'load' and 'require' search along load-path instead of custom-theme-load-path? IOW, could you show the code you'd use to load the other components of the theme if you could use 'load' and 'require'? My idea was simply to replace (require 'foo-themes) with (require-theme 'foo-themes) Would that solve your original problem, assuming that require-theme would look for and load foo-themes.el? Thanks.