From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: The `risky-local-variable' blacklist
Date: 31 Aug 2004 18:43:52 -0400 [thread overview]
Message-ID: <m1sma3ndd0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0408311503520.31548-200000@x-mail.lanl.gov>
>> So the "risky" annotation was only added in order to enable potentially
>> dangerous things like "eval" in that variable.
> We may be speaking at cross-purposes, but are you sure about that?
You do not understand. I was speaking very specifically about the
timeclock-mode-string. My comments only apply to variables used as
mode-line-string.
> I realize now that my example about timeclock is silly, because
> `timeclock-mode-string' wasn't dangerous before and isn't now, since it
> has never been included in `mode-line-format' except as a symbol, and
> those are not evaluated twice (so as to execute a form set as its value).
I don't think you understand the reason why timeclock-mode-string was not
dangerous before: timeclock-mode-string can have a value of the form
(:eval <foo>) which means "evaluate <foo> to get the string to display".
So there's clearly something dangerous here. Such evalution-in-mode-string
is new in Emacs-21, so most foo-mode-line-string variable have suddenly been
made dangerous. Instead of going through all those vars and marking them
risky, Emacs-21 decided that "if the var is not marked `risky', then ignore
any of those new :eval special forms". I.e. it's safe either way. but in
order to be able to use the new feature, you need to mark the var as
"risky".
I didn't discuss your general point about risky variables (because I mostly
agree with it).
Stefan
next prev parent reply other threads:[~2004-08-31 22:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 2:13 The `risky-local-variable' blacklist Davis Herring
2004-08-31 14:01 ` Stefan
2004-08-31 21:42 ` Davis Herring
2004-08-31 22:43 ` Stefan [this message]
2004-08-31 23:18 ` Davis Herring
2004-08-31 22:07 ` Richard Stallman
2004-08-31 23:07 ` Davis Herring
2004-09-01 19:24 ` Richard Stallman
2004-09-01 7:11 ` Kim F. Storm
2004-09-01 14:36 ` Stefan Monnier
2004-09-02 4:53 ` Richard Stallman
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=m1sma3ndd0.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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.