From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Using built-in modus themes Date: Fri, 4 Mar 2022 17:15:39 +0100 Message-ID: References: <87fsnyunlo.fsf@posteo.net> <87r17im6z3.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8304"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, Philip Kaludercic , Tor Kringeland To: Protesilaos Stavrou Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 04 17:17:37 2022 Return-path: Envelope-to: geh-help-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 1nQAca-0001vT-A9 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Mar 2022 17:17:36 +0100 Original-Received: from localhost ([::1]:50972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQAcZ-0005qC-92 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Mar 2022 11:17:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQAav-0005q2-Fc for help-gnu-emacs@gnu.org; Fri, 04 Mar 2022 11:15:53 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:57353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQAat-00043P-AT for help-gnu-emacs@gnu.org; Fri, 04 Mar 2022 11:15:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1646410539; bh=YDPqR8yGfmcrjPSJhJbj11YYYQK5WPCXIBza4ay1zEU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OpB8G4upLBCgvLSeWt828VfPIejUjKCAq3GPHKwxy3j5yOtF5LpKNpjzNYr+8KuXU w7cS2v5GYSdkCibYkNeg70VbLVodn5135IMcfGSyy1rSGLmOCXJ5AKBxfiV6JMbMIL y/fA/U/eXADyTH3UJUh95k4DdJSajABhOITNn4DM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs06.server.lan [172.19.170.174]) (via HTTP); Fri, 4 Mar 2022 17:15:39 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87r17im6z3.fsf@protesilaos.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:pW8PWaWvBpOfiaF4hINf6A5MBkHR4wkHGIG+pIlck4gePuoTpNlHtrSpS6+fmbOpXVkpT 6wvwSxnhLdYs3dnHygZbUOXIxdVe0cymtV61jG1RLGcr5RSgrEYj6tyNp6pasCE5F7sQprBzthfv 52ctAyh48MRllIUigKWr5JGyRNgezhwRedo3z7RCrz5StqaaSdCYkjCYlMmlo2izh30aGkFYpscf s+KydhX2+qgYxUcq9sj7D7whhpGPYEdw/0ixJZYbmW69+K0/fj3krpa3eA8FZISLiMQsoPLXJw+t XY= X-UI-Out-Filterresults: notjunk:1;V03:K0:1H4WRts1hhk=:9sGSrt/g5aV+YpTd+sxD/k 3C0zuWgghauoblNosFFgdtz1baIUQxoKIKy53402aq/3qHNFO2I5GfkBt3PU2SZF1O3tj+lBs uQEo+dmaDgbWEai/qyVZqyb8Ed+PK9sHc7vhBLwV5GqhKcdz7aB/gtdVQ7XbVLNXa31b4MDQF QA9Bdbbv3ZnuEqZl1wme11Pakf/5Bpkqxcrpn0X05N2R8R/S0DVm4Cp241A2APXB9hpRfmBBY M/22JOgcgnWG7ethlp/5LqpIGZZJbOkM+LShRIapJTa/JwaRWAhTL+/BLjj6dUpNb5KEe3I2p 7BnfHB1Hlfxtod+DNVovHOfjl2Y9p7Ywi3q61dLZgiCYQbz0GsS+qpUDae7xRq53dpzyUYBWx vsebdG+33f42Aej11zsNsANR8JL8s8z/Q7LsjKYP8Zn2gY2AhVTIqCn3+vnQAvHERs7mR17x8 nYcEfFIe7e8drydkEHKPWsOwfY9ZR6uIUutK1/On6kFOiRNgZa+Vkxg3kdJ4R9blfLv77s8Sg Q6JVmymfqZXd7iJfyF162c8zxMJbsNjrn6EV3E+DY5fu8EZErITAH/BY2Ai0JDBiGugyWagv/ BKubfV9cErZRKwveubR0VqcEnklq/JCsDhAdb4Xtgiat9MS2EuUImC3u8spUX7puWo7zI0q3C 3rNn3V1KEdMH1o664Tz/6io2h567kf47o5tGDT8RYKu5Cv3XERcmZJ2ZYpRSd7VMX5YSK6Hh0 v7KayOnU6RYGuYrR9+8pG9Wg5fLe79Pxzoid5hibAy+ExChrmrZtcjjEgiL6OlDUxTmDd1l9 Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136362 Archived-At: > Sent: Friday, March 04, 2022 at 8:56 PM > From: "Protesilaos Stavrou" > To: "Philip Kaludercic" , "Tor Kringeland" > Cc: help-gnu-emacs@gnu.org > Subject: Re: Using built-in modus themes > > On 2022-03-04, 08:29 +0000, Philip Kaludercic wrote= : > > > Tor Kringeland 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 th= e > >> above yields no error. > >> > >> Shouldn't running the above work since the themes are part of Emacs n= ow > >> (so that I could put it in my config)? I'm running `emacs -Q' and th= is > >> 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 ("" . 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 "") #'modus-themes-toggle) > ``` > > ### Packaged version > [...] > > Tor, can you please tell me if this works for you? > > -- > Protesilaos Stavrou > https://protesilaos.com > >