GNU bug report logs -
#45068
[PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible)
Previous Next
Reported by: Protesilaos Stavrou <info <at> protesilaos.com>
Date: Sun, 6 Dec 2020 12:25:02 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #107 received at 45068 <at> debbugs.gnu.org (full text, mbox):
On 2021-02-27, 10:15 +0200, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Protesilaos Stavrou <info <at> protesilaos.com>
>> Cc: 45068 <at> 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.
Thank you for the feedback (and sorry for putting you through the
trouble)! I will try again using that approach.
> 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?
Yes, that was the problem. So the "modus-themes.el" dependency could
not be placed in etc/themes/ as (require 'modus-themes) would not find
it.
> 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?
Indeed, with the function I provided all I had to change was 'require'
to 'require-theme-base'.
--
Protesilaos Stavrou
protesilaos.com
This bug report was last modified 4 years and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.