From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Byte-compilation of custom themes Date: Tue, 30 Jan 2018 22:16:59 +0000 Message-ID: <87vafjhu04.fsf@tcd.ie> References: <87efmk2qk0.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1517350697 16212 195.159.176.226 (30 Jan 2018 22:18:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2018 22:18:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 30 23:18:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egeDy-0002nC-Pn for ged-emacs-devel@m.gmane.org; Tue, 30 Jan 2018 23:17:54 +0100 Original-Received: from localhost ([::1]:39566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egeFz-00082L-NC for ged-emacs-devel@m.gmane.org; Tue, 30 Jan 2018 17:19:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egeEI-0007Xh-Qt for emacs-devel@gnu.org; Tue, 30 Jan 2018 17:18:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egeDD-0004ga-Su for emacs-devel@gnu.org; Tue, 30 Jan 2018 17:18:14 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:52932) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egeDD-0004dY-1L for emacs-devel@gnu.org; Tue, 30 Jan 2018 17:17:07 -0500 Original-Received: by mail-wm0-x22e.google.com with SMTP id g1so4261200wmg.2 for ; Tue, 30 Jan 2018 14:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sAPWUjPlSXRoMEB9hspuTLwE75l8hoc8GoiOsoGTumE=; b=Cu/u6A9w7X/7fUX7UQ1NudDK9Tff/21caH9nYufhDe6vcXEkhOmie9v1qBrGJEO/q4 +0fMdq8ZOuUWFnEElmnRzVPM8Tiokr7Szon3VSFaRwrqoFeK/5vgsYHeedH1cSxxvvYt fWxo6n5GQYb77uTVUszVia1TzQymg0lLSS0RIrKqHkBGuVCOBgZFKQONVMRcUVzRVKU1 UFz5E6UoHSZhgRQr4BcdZKV0JWlhFfriHyzb3FgRRL5WzEpqnSgARUxr2qRCFejFkUT7 TZuxTT1JT8vJ8GHoUfmVTvoPnakPDPfKUDCslTF81BxxP7r9mc1P/myqPtTPaX68QPZN meOg== 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; bh=sAPWUjPlSXRoMEB9hspuTLwE75l8hoc8GoiOsoGTumE=; b=LZi2M83yw/Uz9D6O2V/TON2+UHbUmTB6UhSwDYerIZBkrUPVruELi848Abry1NkBbl rtbN3hbMQJfrNG3BEWxt8KFypYpCjO3C2wJcKbdvbXc+YmcUUkpii7r0mBeYh768UKMZ t1HCPzdhOnU16dgDTYQM6eA7k68Jy00aFlF/S20N/2K0nXKCFHTbppKOhN+mY/69Or0o NCMmktDkzCCju9BrR3jCzjiz1BpuB8egAp+0uNA+HjSOgfMY4f4yWEXcPCt9t6z8N+tY And1Hv35tuLGoS8RLXHbmnGGlJGfU0xNJsYdr/LUW68uu1nnTV8ehE+QmYahxJJjNfFu no/A== X-Gm-Message-State: AKwxytcHihD7MClpMMNcg3W52ZpWh1P7yxeFKav2C8H6RCe0PiY43nSn 02cQv5Jp4oiUdnS4ZJAsgDOtFfwy X-Google-Smtp-Source: AH8x225pIA4HilDHu2fIfem9M6WCvaS78CXpwgFtJrKdW97yQOnx7XxjW71bwy7dq1YA5h8Qt+v7cg== X-Received: by 10.80.131.231 with SMTP id 94mr48761420edi.139.1517350625627; Tue, 30 Jan 2018 14:17:05 -0800 (PST) Original-Received: from localhost ([2a02:8084:4f41:8c80:9c34:da08:a010:edfc]) by smtp.gmail.com with ESMTPSA id f11sm8325278edf.26.2018.01.30.14.17.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2018 14:17:04 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 24 Jan 2018 11:16:17 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222319 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >> Is this "aversion" to byte-compilation of custom themes intentional? > > I think it's due to the idea that users might download theme files from > random places without realizing that it contains arbitrary Lisp code > (contrary to normal Emacs packages where we consider that users should > know that it contains arbitrary Lisp code). So we prompt users to > confirm that they think the theme file is safe, and users can't be > expected to assess the safety of a .elc file, so we insist on using the > .el file, which the user can inspect without nearly as much pain. Ah, that makes sense. Do you think it would be worthwhile clarifying this in the manual? Is there a clearer way of saying the following? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=foo.diff diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6c7ca260ab..7fea507fd0 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1432,7 +1432,9 @@ Custom Themes would be evaluated when loading the theme, but that is bad form. To protect against loading themes containing malicious code, Emacs displays the source file and asks for confirmation from the user -before loading any non-built-in theme for the first time. +before loading any non-built-in theme for the first time. As +such, themes are not ordinarily byte-compiled, and source files +always take precedence when Emacs is looking for a theme to load. The following functions are useful for programmatically enabling and disabling themes: --=-=-= Content-Type: text/plain Why are built-in themes not exempt to this safety net, though? Diminishing returns? Finally, would you care to post your helpful explanation as an answer to my Stack Exchange question, or would you rather I paraphrased this thread? Thanks, -- Basil --=-=-=--