From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: The `risky-local-variable' blacklist Date: 31 Aug 2004 18:43:52 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1093992272 19993 80.91.224.253 (31 Aug 2004 22:44:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2004 22:44:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 01 00:44:18 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C2HMQ-0005IW-00 for ; Wed, 01 Sep 2004 00:44:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2HRJ-0003lo-Ku for ged-emacs-devel@m.gmane.org; Tue, 31 Aug 2004 18:49:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2HRC-0003lh-BH for emacs-devel@gnu.org; Tue, 31 Aug 2004 18:49:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2HRB-0003lH-5i for emacs-devel@gnu.org; Tue, 31 Aug 2004 18:49:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2HRB-0003lE-12 for emacs-devel@gnu.org; Tue, 31 Aug 2004 18:49:13 -0400 Original-Received: from [206.47.199.166] (helo=simmts8-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C2HM1-00069E-QT for emacs-devel@gnu.org; Tue, 31 Aug 2004 18:43:54 -0400 Original-Received: from empanada-wifi.home ([67.71.25.232]) by simmts8-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040831224225.FXYR1692.simmts8-srv.bellnexxia.net@empanada-wifi.home>; Tue, 31 Aug 2004 18:42:25 -0400 Original-Received: by empanada-wifi.home (Postfix, from userid 502) id AE6292D740A; Tue, 31 Aug 2004 18:43:52 -0400 (EDT) Original-To: Davis Herring In-Reply-To: Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:26662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26662 >> 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 ) which means "evaluate 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