From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: PATCH: New options for latex src code export Date: Wed, 16 Feb 2011 12:12:27 +0100 Message-ID: <87hbc4teqs.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=49219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ppk5l-0005TR-Gu for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 11:19:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ppk5g-0004xf-WA for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 11:18:57 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:51044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ppk5g-0004x1-Qx for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 11:18:56 -0500 Received: by bwz16 with SMTP id 16so1637760bwz.0 for ; Wed, 16 Feb 2011 08:18:55 -0800 (PST) In-Reply-To: (Dan Davison's message of "Wed, 02 Feb 2011 19:42:37 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs org-mode mailing list --=-=-= Content-Type: text/plain Hi Dan, Dan Davison writes: > My questions are > > 1. It would be nice if users didn't have to worry about step 4. Can > anyone suggest a sensible way to have the "-shell-escape" option > passed to pdflatex under the appropriate circumstances? These > conditions include: > 1. minted is being used for export > 2. pdflatex is being used, a.o.t. e.g. rubber or some other latex > make tool. A bit hackish, but maybe the attached patch would do? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-latex-add-shell-escape-pdflatex.patch diff --git a/lisp/org-latex.el b/lisp/org-latex.el index c558043..f9b2c1c 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -984,7 +984,13 @@ when PUB-DIR is set, use this as the publishing directory." (file (buffer-file-name lbuf)) (base (file-name-sans-extension (buffer-file-name lbuf))) (pdffile (concat base ".pdf")) - (cmds org-latex-to-pdf-process) + (cmds (if (eq org-export-latex-listings 'minted) + ;; automatically add -shell-escape when needed + (mapcar (lambda (cmd) + (replace-regexp-in-string + "pdflatex " "pdflatex -shell-escape" cmd)) + org-latex-to-pdf-process) + org-latex-to-pdf-process)) (outbuf (get-buffer-create "*Org PDF LaTeX Output*")) (bibtex-p (with-current-buffer lbuf (save-excursion --=-=-= Content-Type: text/plain -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--