emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 0/3] Safe local variable declarations
Date: Mon, 28 Oct 2013 16:19:00 -0400	[thread overview]
Message-ID: <1382991543-14273-1-git-send-email-aaronecay@gmail.com> (raw)

In
<http://mid.gmane.org/CANtbJLFJ84FixMJr_4BAC=iXrPQoZm44dFxAaK6Z1fBTbrqzdw@mail.gmail.com>,
Klaus-Dieter pointed out that many export variables are not marked as
safe locals, which makes it annoying to use them as file-local
variables, especially in collaborative situations.  Here are 3 patches
that make a start at marking some variables safe, when they are in
fact safe.

With respect to the LaTeX export variables specifically, there are
many string variables that inject LaTeX code into the output
(`org-latex-active-timestamp-format', to give just one example).
Currently the patch takes a conservative approach, not touching these
variables.

LaTeX code can run arbitrary shell commands, *only if* the user passes
a command line flag to latex to explicitly enable that functionality.
I think a decision has to be made about whether to allow these string
variables to be marked as safe.  There are two failsafes (the
default-unsafe nature of these variables and the LaTeX command line
switch); marking the variables as safe would remove one of them.  But
it would also lower the barrier to collaborating on reproducible
documents significantly, I think.

Obviously, if people like this approach the other export backends and
org-babel languages should be gone through and have safe variable
predicates added to them.

Aaron Ecay (3):
  Mark ox-latex variables safe locals under proper conditions
  Mark some org-babel variables as safe locals under proper conditions
  mark o-b-default-header-args:R as a safe local under proper conditions

 lisp/ob-R.el     | 16 ++++++++++++++++
 lisp/ob-core.el  | 31 +++++++++++++++++++++++++++++++
 lisp/ox-latex.el | 18 ++++++++++++------
 3 files changed, 59 insertions(+), 6 deletions(-)

--
1.8.4.1

             reply	other threads:[~2013-10-28 20:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 20:19 Aaron Ecay [this message]
2013-10-28 20:19 ` [PATCH 1/3] Mark ox-latex variables safe locals under proper conditions Aaron Ecay
2013-10-29  8:24   ` Nicolas Goaziou
2013-10-30  4:15     ` Aaron Ecay
2013-10-30  8:35       ` Nicolas Goaziou
2013-10-28 20:19 ` [PATCH 2/3] Mark some org-babel variables as " Aaron Ecay
2013-10-30  1:50   ` Eric Schulte
2013-10-30  4:19     ` Aaron Ecay
2013-10-30 18:02       ` Eric Schulte
2013-10-28 20:19 ` [PATCH 3/3] mark o-b-default-header-args:R as a safe local " Aaron Ecay
2013-10-30  1:54   ` Eric Schulte

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382991543-14273-1-git-send-email-aaronecay@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@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 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).