From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: [PATCH 1/3] Mark ox-latex variables safe locals under proper conditions Date: Mon, 28 Oct 2013 16:19:01 -0400 Message-ID: <1382991543-14273-2-git-send-email-aaronecay@gmail.com> References: <1382991543-14273-1-git-send-email-aaronecay@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatHW-0000ay-PL for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VatHM-00079k-3p for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:19:22 -0400 Received: from mail-qe0-x233.google.com ([2607:f8b0:400d:c02::233]:42253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatHL-00079a-Vp for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:19:12 -0400 Received: by mail-qe0-f51.google.com with SMTP id q19so4371481qeb.38 for ; Mon, 28 Oct 2013 13:19:11 -0700 (PDT) In-Reply-To: <1382991543-14273-1-git-send-email-aaronecay@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * lisp/ox-latex.el (org-latex-with-hyperref, org-latex-default-table-mode, org-latex-tables-booktabs, org-latex-tables-centered, org-latex-table-caption-above, org-latex-listings): add safe local variable properties --- lisp/ox-latex.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index b0cc4bb..235d092 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -343,7 +343,8 @@ the toc:nil option, not to those generated with #+TOC keyword." (defcustom org-latex-with-hyperref t "Toggle insertion of \\hypersetup{...} in the preamble." :group 'org-export-latex - :type 'boolean) + :type 'boolean + :safe #'booleanp) ;;;; Headline @@ -488,12 +489,14 @@ When modifying this variable, it may be useful to change :type '(choice (const :tag "Table" table) (const :tag "Matrix" math) (const :tag "Inline matrix" inline-math) - (const :tag "Verbatim" verbatim))) + (const :tag "Verbatim" verbatim)) + :safe (lambda (s) (memq s '(table math inline-math verbatim)))) (defcustom org-latex-tables-centered t "When non-nil, tables are exported in a center environment." :group 'org-export-latex - :type 'boolean) + :type 'boolean + :safe #'booleanp) (defcustom org-latex-tables-booktabs nil "When non-nil, display tables in a formal \"booktabs\" style. @@ -504,13 +507,15 @@ attributes." :group 'org-export-latex :version "24.4" :package-version '(Org . "8.0") - :type 'boolean) + :type 'boolean + :safe #'booleanp) (defcustom org-latex-table-caption-above t "When non-nil, place caption string at the beginning of the table. Otherwise, place it near the end." :group 'org-export-latex - :type 'boolean) + :type 'boolean + :safe #'booleanp) (defcustom org-latex-table-scientific-notation "%s\\,(%s)" "Format string to display numbers in scientific notation. @@ -670,7 +675,8 @@ into previewing problems, please consult :type '(choice (const :tag "Use listings" t) (const :tag "Use minted" 'minted) - (const :tag "Export verbatim" nil))) + (const :tag "Export verbatim" nil)) + :safe (lambda (s) (memq s '(t nil minted)))) (defcustom org-latex-listings-langs '((emacs-lisp "Lisp") (lisp "Lisp") (clojure "Lisp") -- 1.8.4.1