[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH 3/3] mark o-b-default-header-args:R as a safe local under
From: |
Eric Schulte |
Subject: |
Re: [O] [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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
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 <address@hidden> 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