emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Aaron Ecay <aaronecay@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH 3/3] mark o-b-default-header-args:R as a safe local under proper conditions
Date: Tue, 29 Oct 2013 19:54:21 -0600	[thread overview]
Message-ID: <87zjprbk03.fsf@gmail.com> (raw)
In-Reply-To: 1382991543-14273-4-git-send-email-aaronecay@gmail.com

I think `mapcar' should be replaced with `org-every'.  Otherwise
wouldn't *every* list value for `org-babel-default-header-args:R' be
safe?

Additionally, I think this should be done in a way which can be easily
repeated across every ob-*.el file.

Thanks,

Aaron Ecay <aaronecay@gmail.com> writes:

> * lisp/ob-R.el (org-babel-default-header-args:R): mark as a safe local
> variable
> ---
>  lisp/ob-R.el | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/lisp/ob-R.el b/lisp/ob-R.el
> index 74d7513..2086622 100644
> --- a/lisp/ob-R.el
> +++ b/lisp/ob-R.el
> @@ -66,6 +66,22 @@
>    "R-specific header arguments.")
>  
>  (defvar org-babel-default-header-args:R '())
> +(put 'org-babel-default-header-args:R 'safe-local-variable
> +     (lambda (value)
> +       (and (listp value)
> +	    (and (mapcar
> +		  (lambda (pair)
> +		    (and (consp pair)
> +			 (or (org-babel-one-header-arg-safe-p pair)
> +			     (memq (car pair)
> +				   '(:width :height :bg
> +					    :units :pointsize :antialias
> +					    :quality :compression :res
> +					    :type :family :title :fonts
> +					    :version :paper :encoding
> +					    :pagecentre :colormodel
> +					    :useDingbats :horizontal)))))
> +		  value)))))
>  
>  (defcustom org-babel-R-command "R --slave --no-save"
>    "Name of command to use for executing R code."

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

      reply	other threads:[~2013-10-30  1:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 20:19 [PATCH 0/3] Safe local variable declarations Aaron Ecay
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 [this message]

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=87zjprbk03.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=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).