* Why may some Org regexps be risky when set as buffer-local variables?
@ 2014-03-29 11:46 Thorsten Jolitz
2014-03-29 13:04 ` Nick Dokos
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2014-03-29 11:46 UTC (permalink / raw)
To: emacs-orgmode
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?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why may some Org regexps be risky when set as buffer-local variables?
2014-03-29 11:46 Why may some Org regexps be risky when set as buffer-local variables? Thorsten Jolitz
@ 2014-03-29 13:04 ` Nick Dokos
2014-03-29 13:54 ` Thorsten Jolitz
0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2014-03-29 13:04 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@gmail.com> 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.
--
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why may some Org regexps be risky when set as buffer-local variables?
2014-03-29 13:04 ` Nick Dokos
@ 2014-03-29 13:54 ` Thorsten Jolitz
0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Jolitz @ 2014-03-29 13:54 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Thorsten Jolitz <tjolitz@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-29 13:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29 11:46 Why may some Org regexps be risky when set as buffer-local variables? Thorsten Jolitz
2014-03-29 13:04 ` Nick Dokos
2014-03-29 13:54 ` Thorsten Jolitz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).