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.bugs Subject: bug#45068: [PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible) Date: Fri, 05 Mar 2021 08:34:10 +0200 Message-ID: <877dmmcdnh.fsf@protesilaos.com> References: <87im9fgm27.fsf@protesilaos.com> <83v9agryuz.fsf@gnu.org> <87tupyw83e.fsf@protesilaos.com> <83zgzqncxx.fsf@gnu.org> <874khwn1qf.fsf@protesilaos.com> <603b8171.1c69fb81.aa664.7f40@mx.google.com> <87mtvoxsvs.fsf@protesilaos.com> <603b9b9d.1c69fb81.f37aa.cb7c@mx.google.com> <83eegz7xcx.fsf@gnu.org> <87o8g3exjv.fsf@protesilaos.com> <603d053a.1c69fb81.f4cb8.fb14@mx.google.com> <87h7luga3p.fsf@protesilaos.com> <87o8g2bg89.fsf@tcd.ie> <87r1kyrtrl.fsf@protesilaos.com> <878s75x2uk.fsf@tcd.ie> <87o8g0ryfz.fsf@tcd.ie> <6040d37e.1c69fb81.63467.ad62@mx.google.com> <87wnun9dgo.fsf_-_@protesilaos.com> <87ft1aoj74.fsf@tcd.ie> <87eeguab7o.fsf@protesilaos.com> <60415a04.1c69fb81.63f7a.3bc2@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28458"; 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" , 45068@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 07:35:23 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 1lI43X-0007Hi-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 07:35:23 +0100 Original-Received: from localhost ([::1]:34838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI43W-0005Xp-2r for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 01:35:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI43C-0005Qh-NA for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 01:35:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI43C-0001kZ-1j for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 01:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lI43B-00052i-Sc for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 01:35:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 06:35:01 +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.161492606319322 (code B ref 45068); Fri, 05 Mar 2021 06:35:01 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 5 Mar 2021 06:34:23 +0000 Original-Received: from localhost ([127.0.0.1]:60830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI42Z-00051a-4J for submit@debbugs.gnu.org; Fri, 05 Mar 2021 01:34:23 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI42V-00051L-SL for 45068@debbugs.gnu.org; Fri, 05 Mar 2021 01:34:21 -0500 X-Originating-IP: 94.46.225.161 Original-Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8DF2C1C000A; Fri, 5 Mar 2021 06:34:11 +0000 (UTC) In-Reply-To: <60415a04.1c69fb81.63f7a.3bc2@mx.google.com> (Mauro Aranda's message of "Thu, 04 Mar 2021 19:06:57 -0300") 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:201497 Archived-At: On 2021-03-04, 19:06 -0300, Mauro Aranda wrote: > Protesilaos Stavrou writes: > >> On 2021-03-04, 13:53 -0300, Mauro Aranda wrote: >> >>>> ;;;###autoload >>>> (when (and (boundp 'custom-theme-load-path) load-file-name) >>>> (add-to-list 'custom-theme-load-path >>>> (file-name-as-directory (file-name-directory load-file-name)))) >>> >>> A nit: I think this code should avoid adding the value of >>> custom-theme-directory or the built-in theme directory name to >>> custom-theme-load-path , if `custom-theme-directory' (for the former) or >>> t (for the latter) are already present in custom-theme-load-path. In >>> particular, a theme distributed with Emacs should at least check for t, >>> to avoid a repeated entry. >>> >>> I've noticed that the leuven theme has a similar code as well: I think >>> that is a (really minor) bug. >> >> I have removed that form altogether. It makes sense for packages but >> here they are safe themes. Is that okay, or have I misunderstood >> something? > > Sounds OK to me; for themes that are only distributed with Emacs, it > doesn't seem to be needed. That is my impression as well. > But if you plan to keep distributing them as packages via ELPA, then > it might make sense to keep it. I don't know what's the plan, so I > can't say for sure if the form should stay or not. My original plan was to update the themes in emacs.git and then figure out what needs to be done for elpa.git to treat them as ":core" packages instead of ":external". So I had this and would have used a similar technique for the above-quoted code: (if (and (>= emacs-major-version 28) (functionp 'require-theme)) (require-theme 'modus-themes) (require 'modus-themes)) But that produced a major bug of not loading the desired theme in certain setups.[1] I suspect it is because 'require' needs to be at the top level? Not sure... Maybe there is some clean way to fix that, though I would need more time to research and test it; a time frame that I cannot estimate right now. [1]: . So I prefer to use files that 100% work in emacs.git and then I will treat elpa.git separately. Using all those untested conditional clauses will give me trouble. Perhaps the themes in elpa.git should not be ":core" after all? Keeping them as ":external", though updated to the newest release, seems like the most reliable path forward. Ultimately this means more work for me, though I prefer to not have to deal with packaging-related bugs (notwithstanding the fact that I need to ask for someone else to push changes for me in Emacs/ELPA and I would rather not bother them). >> Thanks again! > > Thanks to you! I appreciate your contributions ("your" singular and plural). For me this is all part of a learning process and am happy to be part of a community that (i) tolerates my errors and (ii) helps me learn through them without making any discounts on technical requirements. -- Protesilaos Stavrou protesilaos.com