From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#45068: [PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible) Date: Tue, 02 Mar 2021 08:03:49 -0300 Message-ID: <603e1b98.1c69fb81.7221b.9c4c@mx.google.com> References: <87im9fgm27.fsf@protesilaos.com> <83lfe4192f.fsf@gnu.org> <83im9814oh.fsf@gnu.org> <87sg6po0yd.fsf_-_@protesilaos.com> <83czxt2fpd.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18013"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) Cc: Protesilaos Stavrou , 45068@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 02 12:05:13 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 1lH2q1-0004U9-38 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 12:05:13 +0100 Original-Received: from localhost ([::1]:49732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH2pz-00031S-Hm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 06:05:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH2pq-0002yh-3D for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH2pp-0006Y6-QY for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:05:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lH2pp-0002sM-Ky for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Mar 2021 11:05: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.161468304110967 (code B ref 45068); Tue, 02 Mar 2021 11:05:01 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 2 Mar 2021 11:04:01 +0000 Original-Received: from localhost ([127.0.0.1]:51958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH2oq-0002ql-WD for submit@debbugs.gnu.org; Tue, 02 Mar 2021 06:04:01 -0500 Original-Received: from mail-qv1-f41.google.com ([209.85.219.41]:37623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH2op-0002qY-4Z for 45068@debbugs.gnu.org; Tue, 02 Mar 2021 06:03:59 -0500 Original-Received: by mail-qv1-f41.google.com with SMTP id n4so7346271qvl.4 for <45068@debbugs.gnu.org>; Tue, 02 Mar 2021 03:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:references:date:in-reply-to :user-agent:mime-version; bh=sO3UkyvjdGwEE2Byagq439S5R0dsh8zT7+n0ezHjGuA=; b=Edx4ZUGCreIKTbH98BlyC9u9E6I1okSXQSZ9ed7Qi+C6eDMLa1iWolYzk+tRoVw4/k hZQ9wfg4IHu/qsZbPsQpMRjiVgznc45xqFtPBIi+X31AR1RpxCRnc7sDgy2UYNI3oXyl X/ezwZI3HKeK11/QcGXrxAqPDKktt6uwDopnwAcSDE5P67sQSQj2NdTp4w39I5wXeJUu K/RH7dN+bhcJ2oqQ4LYGAvY0fIup1aEp9TfIu2/E2Y0xzCgMgZo5Lz3KA02fLgZqc/fw 5LQO+yECvJjfOtQA80/6mJO0rZ/XYImcS7Ktf7rWcaGjlzREHoIk5irQisUljpqunFII PcpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:references:date :in-reply-to:user-agent:mime-version; bh=sO3UkyvjdGwEE2Byagq439S5R0dsh8zT7+n0ezHjGuA=; b=R/STqmISuLY3sSxfRGbg7xj2aM/ABvJct3kPpWKcwkZxaEKIAIYTh1mGCfEHa6dYUw wPYVxhUFyGwlgtuV1xBUNn39RQGizjVwGAwKOL1F8IPxfr6EulrlwSOnLLvTaF0BW0/a O3ZOfJiuyv+di8Mtu3ZI2GwmEdY/PtMFOXIRFKyxDeJbzmZoHzVQjafLhNtxfI14ZHVY pKagNkghGLQN1BH/e+UMTEb0bO9q07MrD56vD1+eKGOpdrPmoymFAa7VmdnVJpPuBpCE of3NqsWtju9uRGO2lA4+Qg2AlO/jiCOfnKZmmVEf8iw5pwvWGlyh6c1pHuQud+CcXHg1 V4jA== X-Gm-Message-State: AOAM531EZiimIRzu1eLDOEHo29K0GigQl1NtPIsjelxOnlXVA93A5EHG fz8HZm+7hKiDrgMzi2rAXZXbI+AnGKXQOA== X-Google-Smtp-Source: ABdhPJwEL/+GQgwPeuAqcuUWTQfHIEyYjSm2wIuEAWK4wyqUs2Rm/f0g9GIWD1skjaF71IUv1ZIzUw== X-Received: by 2002:a0c:83a4:: with SMTP id k33mr19054305qva.1.1614683033186; Tue, 02 Mar 2021 03:03:53 -0800 (PST) Original-Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id m190sm14706379qkc.66.2021.03.02.03.03.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Mar 2021 03:03:52 -0800 (PST) X-Google-Original-Message-ID: <87blc1rf56.fsf@maurooaranda@gmail.com> In-Reply-To: <878s75x2uk.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 02 Mar 2021 10:32:51 +0000") 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:201207 Archived-At: "Basil L. Contovounesios" writes: > Protesilaos Stavrou writes: > >> On 2021-03-01, 23:34 +0000, "Basil L. Contovounesios" wrote: >>> BTW, do we need to warn anywhere that require-theme may unconditionally >>> load files from custom-theme-load-path, or somehow protect against this? >> >> That would be consistent with load-theme. > > Right, but I'm wondering whether require-theme ought to be consistent in > this regard. > > load-theme is a user-level command, and arbitrary themes are considered > risky Lisp, so it has to (conditionally) display the code and ask the > user if they think it looks okay. > > require-theme, OTOH, sounds like it's a behind-the-scenes noninteractive > plumbing function to be used by themes themselves, so wouldn't the user > be prompted twice if a theme called require-theme on an element of > custom-available-themes? IOW, it seems to me like require-theme's > "safety" should already be handled/covered by the theme using it. I was the one that raised the question about loading a theme via require-theme unconditionally (Protesilaos had a NO-CONFIRM non-nil in one of the early versions of the patch), so if that bit of the patch is wrong I'm the one to blame. I'll just say that I raised the question because (usually) theme files are just settings, so for a user to check the safety it is normally enough to go through the custom-theme-set-* functions and see what the theme is setting. Now the user would be asked to check a require-theme call for its safety, and since a call to require-theme looks a lot like require, it might not be obvious that it can load (and enable) any theme it wants. And if a theme uses require-theme to do that, it can "hide" the "unsafe theme" settings, because the first element of custom-enabled-themes will just be the "safe" theme. Those were my reasons, feel free to ignore them if you think they make no sense.