From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#45068: [PATCH] Modus themes 1.2.0 Date: Fri, 05 Mar 2021 17:11:34 +0000 Message-ID: <87czwdikzd.fsf@tcd.ie> References: <87im9fgm27.fsf@protesilaos.com> <87h7m0n0em.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> 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="20786"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45068@debbugs.gnu.org, Mauro Aranda To: Protesilaos Stavrou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 18:58:20 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 1lIEiS-0005Hz-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 18:58:20 +0100 Original-Received: from localhost ([::1]:50932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIEiQ-00013a-VH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 12:58:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIDze-0002k0-6b for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 12:12:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIDzd-0005ru-VY for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 12:12:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lIDzd-0006pj-Qa for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 12:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 17:12: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.161496430526238 (code B ref 45068); Fri, 05 Mar 2021 17:12:01 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 5 Mar 2021 17:11:45 +0000 Original-Received: from localhost ([127.0.0.1]:35343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIDzM-0006p8-NG for submit@debbugs.gnu.org; Fri, 05 Mar 2021 12:11:45 -0500 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:34849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIDzL-0006ou-2J for 45068@debbugs.gnu.org; Fri, 05 Mar 2021 12:11:43 -0500 Original-Received: by mail-wm1-f51.google.com with SMTP id m7so2102388wmq.0 for <45068@debbugs.gnu.org>; Fri, 05 Mar 2021 09:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=wqKDSYqkMAVwLKn7yCdH1mYDCJI+STXrDNabcLpDKB4=; b=HIGK/w4wT3AFOHpWcgLwrrx7k0X2ZhkUyYa0fjrRuI5g2OQbviLZb8OdR/5BME1HvR m00v4pdoR5ofX4tU+5AE/CoE83puAnw8a5RAVvdoDzEBiQa9l7LW/IlPPoFD8u9oY9i7 J7eNvAlLVKj8VZLe/lQuvnZgSJTVcX+9ctpST/Y0nmNLpXqTUtot2VGoVke+EpAPb+mR S/hMsXTolTMg5GuAswJBlleAgnPoHjz66RL19G2s/uS3GhkoYlgKgPSs8fLo7OhbORnQ r5fP2JshzC0imCBc2AOSY5eKJswZ/IaqVwQybtPqzjBUizb/zPcPqS2t5qWP5Wk++BOQ XzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=wqKDSYqkMAVwLKn7yCdH1mYDCJI+STXrDNabcLpDKB4=; b=YYhsGV2CsWbk5el/ikMtFqwm9kAPgL2h8f8HhuBhH6AUjTmMCtR4hTGNWjKHqnsbJk nd6A8LPF2OuOLhIvsVmfHpSS+s9Ty0w8v5VWVkzP1/rBaeLvtBGWHt4Veb8YrlR44mIP dPGtP02MrlbqfhFsoy0lwe1PHszFrqX7Tf0gcHVxxTY3ma0E9SHiFLJW6cHvHrqpfsyQ v9g7PD+IVEaej/+mkuvhiTegB6KOH7Ja0zGP+mKFxW2eQ5dBLhhvG12kpjG8iDhAB80I ew1jDbiIw36Y5923RGw9H+x3jrguvarzrfYVTeazKx/DZ/h6NUNHfdn6Do9Eh6qawaXH aeSg== X-Gm-Message-State: AOAM533+wx9NJRKwYPoFpKcaKSqnjEeWcq1uc0iUVP5zrNodfgrgXmSN HYkqD90JkBLVNL8Hl1jyIJfQUA== X-Google-Smtp-Source: ABdhPJxu58GYqk6VL/qbenyFx6wEMSTOqF2igEdQoDUlILljgn7rGKRP4MOUxAewsV+YHOgYNQ45zA== X-Received: by 2002:a7b:c0d5:: with SMTP id s21mr10026698wmh.30.1614964297075; Fri, 05 Mar 2021 09:11:37 -0800 (PST) Original-Received: from localhost ([51.37.127.115]) by smtp.gmail.com with ESMTPSA id j30sm6205277wrj.62.2021.03.05.09.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 09:11:36 -0800 (PST) In-Reply-To: <87eeguab7o.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Thu, 04 Mar 2021 22:57:31 +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:201564 Archived-At: Protesilaos Stavrou writes: > On 2021-03-04, 18:41 +0000, "Basil L. Contovounesios" w= rote: > >> Protesilaos Stavrou writes: >> > I updated the language to disambiguate the use-cases. If you think it > needs further work, I will rewrite it. I think it's fine now, thanks. >>> ++ Ideas and user feedback :: Aaron Jensen, Adam Spiers, Adrian Manea, >>> + Alex Griffin, Alex Peitsinis, Alexey Shmalko, Alok Singh, Anders >>> + Johansson, Andr=C3=A9 Alexandre Gomes, Arif Rezai, Basil L. Contovou= nesios, >> ^^ >> Hopefully Org's Texinfo export can one day be taught that this is not >> the end of a sentence ;). > > Ah yes, I recall noticing that! Can we circumvent it somehow? Perhaps > by omitting the space? Or the 'L. ' wholesale, but using @: as you've done is also fine ;). >>> +(deftheme modus-vivendi >>> + "Accessible and customizable light theme (WCAG AAA standard). >> ^^^^^ >> dark > > Fixed! > > [ Answer only if it is easy: how do you draw those ^^^ below the text? ] If the answer is easy, or drawing the circumflexes is easy? ;) Either way, the answer is boring: I create a new line, add the appropriate indentation e.g. using indent-relative, and then add the circumflexes manually. Maybe someone else knows a faster trick. > 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-n= ame)))) >> >> 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? If you don't mind the (minor) maintenance overhead of removing the form in emacs.git, then that's fine. Alternatively, a more DWIM approach could be something like this: ;;;###autoload (when load-file-name (let ((dir (file-name-directory load-file-name))) (unless (equal dir (expand-file-name "themes/" data-directory)) (add-to-list 'custom-theme-load-path dir)))) I'm not sure if this works on non-GNU/Linux platforms, though. Does anyone else know or have a better suggestion? It could probably use file-in-directory-p instead, but that's quite a bit slower than file-name-directory + expand-file-name, at least in relative terms. Let me know what works best for you. Following the discussion in: https://gitlab.com/protesilaos/modus-themes/-/issues/162 I'm preparing to update emacs.git to Modus version 1.2.2. I just want to clarify a thing here and there first, so stay tuned. Thanks, --=20 Basil