From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Why may some Org regexps be risky when set as buffer-local variables? Date: Sat, 29 Mar 2014 14:54:37 +0100 Message-ID: <87siq1m7oi.fsf@gmail.com> References: <87wqfdmdm4.fsf@gmail.com> <87lhvtkvev.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTthc-0004uq-2d for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 09:53:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTthQ-0004tz-Vj for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 09:53:40 -0400 Received: from plane.gmane.org ([80.91.229.3]:58560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTthQ-0004tn-Ok for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 09:53:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTthP-0008Vj-Nb for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 14:53:27 +0100 Received: from e178058099.adsl.alicedsl.de ([85.178.58.99]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 14:53:27 +0100 Received: from tjolitz by e178058099.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 14:53:27 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nick Dokos writes: > Thorsten Jolitz writes: > >> Hi List, >> >> there are dozens of regexps that are set as buffer-local variables when >> org-mode is turned on as major-mode, but other regexps are defined and >> set only once as global variables when e.g. org.el is loaded, and the >> docstring of these variables often reads like this: >> >> ,--------------------------------------------------------------- >> | org-block-regexp is a variable defined in `org.el'. >> | Its value is [...] >> | >> | This variable may be risky if used as a file-local variable. >> | >> | Documentation: >> | Regular expression for hiding blocks. >> `--------------------------------------------------------------- >> >> >> Why are these variables considered risky when used as a file-local >> variables? Was this "risk" the prime reason to make them global - or are >> they global simply because there was no special reason to make them >> buffer-local? > > All it means is that nobody has gone to the trouble of certifying them > as safe. By default, file local variable are considered risky. See > > (info "(emacs) Safe File Variables") > > for more. Ok, then as long as these variables hold strings there is no risk anyway since e.g. (eval "(+ 2 2)") gives "(+ 2 2)" and not 4. Thanks. -- cheers, Thorsten