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:56:22 -0300 Message-ID: <603e27e9.1c69fb81.a4fa1.2a87@mx.google.com> References: <87im9fgm27.fsf@protesilaos.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="20765"; mail-complaints-to="usenet@ciao.gmane.io" Cc: info@protesilaos.com, 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:57:10 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 1lH3eH-0005G2-WE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 12:57:10 +0100 Original-Received: from localhost ([::1]:56778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH3eG-0006kj-VA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 06:57:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH3eA-0006kb-IW for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH3eA-0005Ls-B7 for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lH3eA-0004EH-8q for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 06:57:02 -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:57:02 +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.161468619316221 (code B ref 45068); Tue, 02 Mar 2021 11:57:02 +0000 Original-Received: (at 45068) by debbugs.gnu.org; 2 Mar 2021 11:56:33 +0000 Original-Received: from localhost ([127.0.0.1]:52005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH3dg-0004DZ-Rp for submit@debbugs.gnu.org; Tue, 02 Mar 2021 06:56:33 -0500 Original-Received: from mail-qt1-f170.google.com ([209.85.160.170]:45318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH3df-0004DN-Ru for 45068@debbugs.gnu.org; Tue, 02 Mar 2021 06:56:32 -0500 Original-Received: by mail-qt1-f170.google.com with SMTP id a2so14452998qtw.12 for <45068@debbugs.gnu.org>; Tue, 02 Mar 2021 03:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:in-reply-to:date:mime-version; bh=BTfugoUT+1FtwKUdM6gKeglIMr6IDOqkltijOaLJ0ew=; b=uipVDIHgc/EgQDytZWUULEVkmhJ1a2ddcKP07ip0rxxezLIhUW5GiesySH+hWcv9cb 8CtZkSo1j4STrx4QnwX+C6PBNougcO7hlk084Z6nv4ishRmKNh0Agy1VVxkHI1Sl4AhC NcBp0ka6fvv265HoRqfbgWm9bsLN14Rvm1s29iFfvHXjnPMy54ZFVMKIljaILO0Zj2EC WGAshx0dScF006JWs8CyHIBFR75ZhI67UcTdAxuot9lEw8WvEzko73eeSmzNh6K+zAGn nq1H8maasXLPlw5yP35NWOQ3GsIYrCCTU92ErMKv7k0bqjpgZIcpE0WLlJ3b3AqTFbcL 6cbA== 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:in-reply-to:date :mime-version; bh=BTfugoUT+1FtwKUdM6gKeglIMr6IDOqkltijOaLJ0ew=; b=Cyae92Aeouzmab84VncpGgVag9d2TemrvSOnxWWFkYhz2riSBmcpZ3d50Vzg0upEiu 37SEB3OFXwoMhgFXvl3jWXCxbZ50Mrfow+n60PuwwrqJ8fSqXK1r5YRWXaSmPDhKtV8e wCrXbdLMKJO4TUrBbGKb1U3w7txYmLAS/5sK5ZCoHdizANx9a++tp0uAKe+pr5vssxoL 1irR1meZEPvuwb8Xp32frG0fh56lVjv+LIYm3S0mbr46k9Xx/cc5p9FXQokXVsYtuO1o Ok5sqdCtIncqZ6/2+UL5LR1eBoVU5jqdLj7PTyq0ArCNwVZedHfYRBRE1d8HR69xiNtZ Xo6w== X-Gm-Message-State: AOAM533dkP6h5N0FEcJFS4zBjaCj/2YHg2yxaqVRxej+y9eS/7ARcgB6 XLw2yLHOSH/YLqGIDrNBl5Srdtqnwb8OMA== X-Google-Smtp-Source: ABdhPJymK9job8s9xjhtWEkbHOIv2ga/DySgvODC/T+9vMd998YHDH9wWDnjW7K9QmznAsBEN4EmWw== X-Received: by 2002:a05:622a:3:: with SMTP id x3mr17518322qtw.42.1614686185857; Tue, 02 Mar 2021 03:56:25 -0800 (PST) Original-Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id j11sm13550858qtk.63.2021.03.02.03.56.24 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Mar 2021 03:56:25 -0800 (PST) X-Google-Original-Message-ID: <875z29rcpl.fsf@maurooaranda@gmail.com> In-Reply-To: <87h7ltvl8l.fsf@tcd.ie> (contovob@tcd.ie) 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:201209 Archived-At: "Basil L. Contovounesios" writes: > Mauro Aranda writes: > >> 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. > > I'm suggesting that require-theme never enables any themes. And to the > eyes of the user, it would be no different than a call to require or > load, which we already don't warn a second time about. Then there's no reason for me to worry at all. >> 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. > > Sorry, I'm not sure what you mean, could you please elaborate on the > steps involved? With the require-theme posted that included a (load-theme t) call, I thought about the following steps: The user enables super-safe-theme which hasn't been marked as safe. The theme has a call to require-theme: (require-theme 'should-be-safe-theme) and the user thinks it's fine because should-be-safe-theme comes from the same author as super-safe-theme. The user doesn't check should-be-safe-theme.el (shame on him), and is neither prompted because of the NO-CONFIRM non-nil. should-be-safe-theme.el has this call: (require-theme 'not-so-safe-theme) and the user is again not prompted for this theme. After all the loading and enabling, custom-enabled-themes looks like this: (super-safe should-be-safe not-so-safe) and it's not entirely obvious which setting came from which theme. Of course all of this is already possible, but the theme has to put a (load-theme t) call in front of the user eyes. But anyway, if you're thinking about a require-theme that never enables any theme, this is not relevant anymore.