emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Why may some Org regexps be risky when set as buffer-local varia


From: Thorsten Jolitz
Subject: Re: [O] Why may some Org regexps be risky when set as buffer-local variables?
Date: Sat, 29 Mar 2014 14:54:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Thorsten Jolitz <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]