From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: Byte-compilation of custom themes
Date: Thu, 01 Feb 2018 00:45:54 +0000 [thread overview]
Message-ID: <87po5po7ul.fsf@tcd.ie> (raw)
In-Reply-To: <jwvwozy939j.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 30 Jan 2018 21:26:37 -0500")
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Clarify-byte-compilation-of-Custom-Themes-in-Elisp-m.patch --]
[-- Type: text/x-diff, Size: 1270 bytes --]
From 49288975a810d1f2186f656cede92db93ee85c56 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 31 Jan 2018 23:23:49 +0000
Subject: [PATCH] Clarify byte-compilation of "Custom Themes" in Elisp manual
* doc/lispref/customize.texi (Custom Themes): Clarify status of
byte-compiled custom themes. Suggested in
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00824.html.
---
doc/lispref/customize.texi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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:
--
2.15.1
[-- Attachment #2: Type: text/plain, Size: 1747 bytes --]
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> 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:
>
> Sounds good to me.
I attach a patch with this amendment. If it is up to scratch, would
someone please push it?
>> Why are built-in themes not exempt to this safety net, though?
>
> They're not? There is code which tries to exempt them, so if they're
> not, it's a bug in that code.
Sorry, I should have been clearer. As documented, load-theme indeed
exempts built-in themes from the custom-theme-load-confirm check. What
I meant to ask is why built-in themes are not byte-compiled in addition
to being considered safe. Are there any arguments against doing this,
other than any performance gain being negligible?
>> 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?
>
> Feel free to post my answer there,
Done: https://emacs.stackexchange.com/a/38510/15748.
Thanks,
--
Basil
next prev parent reply other threads:[~2018-02-01 0:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 21:01 Byte-compilation of custom themes Basil L. Contovounesios
2018-01-24 16:16 ` Stefan Monnier
2018-01-30 22:16 ` Basil L. Contovounesios
2018-01-31 2:26 ` Stefan Monnier
2018-02-01 0:45 ` Basil L. Contovounesios [this message]
2018-02-02 14:25 ` Stefan Monnier
2018-05-10 2:49 ` Basil L. Contovounesios
2018-05-10 2:54 ` Basil L. Contovounesios
2018-05-11 14:07 ` Eli Zaretskii
2018-05-11 14:02 ` Eli Zaretskii
2018-05-11 15:16 ` Basil L. Contovounesios
2018-05-11 16:03 ` Stefan Monnier
2018-05-11 20:03 ` Basil L. Contovounesios
2018-05-11 17:32 ` Eli Zaretskii
2018-05-11 20:43 ` Basil L. Contovounesios
2018-05-12 7:04 ` Eli Zaretskii
2018-06-01 20:48 ` Basil L. Contovounesios
2018-06-01 21:07 ` Basil L. Contovounesios
2018-06-02 11:24 ` Eli Zaretskii
2018-06-02 18:53 ` Basil L. Contovounesios
2018-06-02 19:32 ` Eli Zaretskii
2018-06-02 20:02 ` Basil L. Contovounesios
2018-06-03 3:52 ` Stefan Monnier
2018-06-03 11:21 ` Basil L. Contovounesios
2018-06-03 15:11 ` Eli Zaretskii
2018-06-03 16:08 ` Basil L. Contovounesios
2018-06-03 16:16 ` Eli Zaretskii
2018-06-03 17:48 ` Basil L. Contovounesios
2018-06-03 20:22 ` Stefan Monnier
2018-06-04 1:33 ` Basil L. Contovounesios
2018-07-03 7:57 ` Basil L. Contovounesios
2018-07-11 1:40 ` Stefan Monnier
2018-07-11 6:05 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87po5po7ul.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.