* Using built-in modus themes @ 2022-03-03 18:03 Tor Kringeland 2022-03-04 8:29 ` Philip Kaludercic 0 siblings, 1 reply; 5+ messages in thread From: Tor Kringeland @ 2022-03-03 18:03 UTC (permalink / raw) To: help-gnu-emacs I'm trying to configure and use the modus themes as described in [1]. I'm on a build of Emacs 29 so these are built in. While I can enable the themes by using `load-theme', if I execute (require 'modus-themes) as described in [1] I get an error saying that the file is missing. However if I first load a theme using `load-theme', then executing the above yields no error. Shouldn't running the above work since the themes are part of Emacs now (so that I could put it in my config)? I'm running `emacs -Q' and this fails then. - [1] https://gitlab.com/protesilaos/modus-themes ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using built-in modus themes 2022-03-03 18:03 Using built-in modus themes Tor Kringeland @ 2022-03-04 8:29 ` Philip Kaludercic 2022-03-04 8:56 ` Protesilaos Stavrou 0 siblings, 1 reply; 5+ messages in thread From: Philip Kaludercic @ 2022-03-04 8:29 UTC (permalink / raw) To: Tor Kringeland; +Cc: help-gnu-emacs, public Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes: > I'm trying to configure and use the modus themes as described in [1]. > I'm on a build of Emacs 29 so these are built in. While I can enable > the themes by using `load-theme', if I execute > > (require 'modus-themes) > > as described in [1] I get an error saying that the file is missing. > However if I first load a theme using `load-theme', then executing the > above yields no error. > > Shouldn't running the above work since the themes are part of Emacs now > (so that I could put it in my config)? I'm running `emacs -Q' and this > fails then. I agree, it should, an I have also had issues with this problem. From what I see, the "issue" is that modus-themes is not in the `load-path'. When you `load-theme' one of the two modus-themes, `modus-themes' is also added to `features', the list maintaining activated features. `require' checks this list before loading a feature, and as it has already been added, no error is thrown and it appears to work. One way this could be solved would be to add the themes directory to `load-path', but I suspect there is some reason this hasn't been done already. (I have CC'ed Protesilaos to see what he has to say). -- Philip Kaludercic ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using built-in modus themes 2022-03-04 8:29 ` Philip Kaludercic @ 2022-03-04 8:56 ` Protesilaos Stavrou 2022-03-04 16:15 ` Christopher Dimech 2022-03-04 16:39 ` Tor Kringeland 0 siblings, 2 replies; 5+ messages in thread From: Protesilaos Stavrou @ 2022-03-04 8:56 UTC (permalink / raw) To: Philip Kaludercic, Tor Kringeland; +Cc: help-gnu-emacs On 2022-03-04, 08:29 +0000, Philip Kaludercic <philipk@posteo.net> wrote: > Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes: > >> I'm trying to configure and use the modus themes as described in [1]. >> I'm on a build of Emacs 29 so these are built in. While I can enable >> the themes by using `load-theme', if I execute >> >> (require 'modus-themes) >> >> as described in [1] I get an error saying that the file is missing. >> However if I first load a theme using `load-theme', then executing the >> above yields no error. >> >> Shouldn't running the above work since the themes are part of Emacs now >> (so that I could put it in my config)? I'm running `emacs -Q' and this >> fails then. > > I agree, it should, an I have also had issues with this problem. > > From what I see, the "issue" is that modus-themes is not in the > `load-path'. When you `load-theme' one of the two modus-themes, > `modus-themes' is also added to `features', the list maintaining > activated features. `require' checks this list before loading a > feature, and as it has already been added, no error is thrown and it > appears to work. > > One way this could be solved would be to add the themes directory to > `load-path', but I suspect there is some reason this hasn't been done > already. > > (I have CC'ed Protesilaos to see what he has to say). Thank you Philip for including me in this exchange! Yes, adding the "etc/themes" directory to the 'load-path' would fix this issue. Though note that this is not my decision to make: it should be brought before the Emacs maintainers. [ In my opinion, built-in themes are no different than other .el files. They should be accessible via 'M-x find-library', be byte compiled, included in the 'load-path', etc. ] I updated the project's README accordingly (will do the same for the manual). ## Quick setup for the latest version ### Built-in version For the themes that are built into Emacs you cannot `require` the package. Use the following instead. With `use-package`: ```elisp (use-package emacs :init ;; Add all your customizations prior to loading the themes (setq modus-themes-italic-constructs t modus-themes-bold-constructs nil modus-themes-region '(bg-only no-extend)) :config (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) :bind ("<f5>" . modus-themes-toggle) ``` Without `use-package`: ```elisp ;; Add all your customizations prior to loading the themes (setq modus-themes-italic-constructs t modus-themes-bold-constructs nil modus-themes-region '(bg-only no-extend)) ;; Load the theme of your choice: (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) (define-key global-map (kbd "<f5>") #'modus-themes-toggle) ``` ### Packaged version [...] Tor, can you please tell me if this works for you? -- Protesilaos Stavrou https://protesilaos.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using built-in modus themes 2022-03-04 8:56 ` Protesilaos Stavrou @ 2022-03-04 16:15 ` Christopher Dimech 2022-03-04 16:39 ` Tor Kringeland 1 sibling, 0 replies; 5+ messages in thread From: Christopher Dimech @ 2022-03-04 16:15 UTC (permalink / raw) To: Protesilaos Stavrou; +Cc: help-gnu-emacs, Philip Kaludercic, Tor Kringeland > Sent: Friday, March 04, 2022 at 8:56 PM > From: "Protesilaos Stavrou" <public@protesilaos.com> > To: "Philip Kaludercic" <philipk@posteo.net>, "Tor Kringeland" <tor.a.s.kringeland@ntnu.no> > Cc: help-gnu-emacs@gnu.org > Subject: Re: Using built-in modus themes > > On 2022-03-04, 08:29 +0000, Philip Kaludercic <philipk@posteo.net> wrote: > > > Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes: > > > >> I'm trying to configure and use the modus themes as described in [1]. > >> I'm on a build of Emacs 29 so these are built in. While I can enable > >> the themes by using `load-theme', if I execute > >> > >> (require 'modus-themes) > >> > >> as described in [1] I get an error saying that the file is missing. > >> However if I first load a theme using `load-theme', then executing the > >> above yields no error. > >> > >> Shouldn't running the above work since the themes are part of Emacs now > >> (so that I could put it in my config)? I'm running `emacs -Q' and this > >> fails then. > > > > I agree, it should, an I have also had issues with this problem. > > > > From what I see, the "issue" is that modus-themes is not in the > > `load-path'. When you `load-theme' one of the two modus-themes, > > `modus-themes' is also added to `features', the list maintaining > > activated features. `require' checks this list before loading a > > feature, and as it has already been added, no error is thrown and it > > appears to work. > > > > One way this could be solved would be to add the themes directory to > > `load-path', but I suspect there is some reason this hasn't been done > > already. > > > > (I have CC'ed Protesilaos to see what he has to say). > > Thank you Philip for including me in this exchange! > > Yes, adding the "etc/themes" directory to the 'load-path' would fix this > issue. Though note that this is not my decision to make: it should be > brought before the Emacs maintainers. Have brought this up with emacs maintainers several times, without result. > [ In my opinion, built-in themes are no different than other .el files. > They should be accessible via 'M-x find-library', be byte compiled, > included in the 'load-path', etc. ] > > I updated the project's README accordingly (will do the same for the > manual). > > ## Quick setup for the latest version > > ### Built-in version > > For the themes that are built into Emacs you cannot `require` the > package. Use the following instead. > > With `use-package`: > > ```elisp > (use-package emacs > :init > ;; Add all your customizations prior to loading the themes > (setq modus-themes-italic-constructs t > modus-themes-bold-constructs nil > modus-themes-region '(bg-only no-extend)) > > :config > (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) > :bind ("<f5>" . modus-themes-toggle) > ``` > > Without `use-package`: > > ```elisp > ;; Add all your customizations prior to loading the themes > (setq modus-themes-italic-constructs t > modus-themes-bold-constructs nil > modus-themes-region '(bg-only no-extend)) > > ;; Load the theme of your choice: > (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) > > (define-key global-map (kbd "<f5>") #'modus-themes-toggle) > ``` > > ### Packaged version > [...] > > Tor, can you please tell me if this works for you? > > -- > Protesilaos Stavrou > https://protesilaos.com > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Using built-in modus themes 2022-03-04 8:56 ` Protesilaos Stavrou 2022-03-04 16:15 ` Christopher Dimech @ 2022-03-04 16:39 ` Tor Kringeland 1 sibling, 0 replies; 5+ messages in thread From: Tor Kringeland @ 2022-03-04 16:39 UTC (permalink / raw) To: Protesilaos Stavrou, Philip Kaludercic; +Cc: help-gnu-emacs Protesilaos Stavrou <public@protesilaos.com> writes: > Tor, can you please tell me if this works for you? Thank you, Protesilaos, it works for me now. Also thank you for making those two wonderful themes! ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-04 16:39 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-03-03 18:03 Using built-in modus themes Tor Kringeland 2022-03-04 8:29 ` Philip Kaludercic 2022-03-04 8:56 ` Protesilaos Stavrou 2022-03-04 16:15 ` Christopher Dimech 2022-03-04 16:39 ` Tor Kringeland
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).