From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: org-export-async-init-file Date: Sun, 29 Sep 2013 20:51:41 +0200 Message-ID: <87k3hzv4ua.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQM65-0006g2-9I for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 14:52:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQM5z-000582-2c for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 14:52:01 -0400 Received: from plane.gmane.org ([80.91.229.3]:32786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQM5y-00057y-Rt for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 14:51:54 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VQM5x-00046C-H0 for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 20:51:53 +0200 Received: from dynamic-adsl-94-34-148-18.clienti.tiscali.it ([94.34.148.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Sep 2013 20:51:53 +0200 Received: from rasmus by dynamic-adsl-94-34-148-18.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Sep 2013 20:51:53 +0200 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 tsd@tsdye.com (Thomas S. Dye) writes: > My question: how to change the value of org-export-async-init-file when I > export the subtree? Perhaps babel and org-element? I'm not sure of the order of execution, but perhaps you can can check the title and set the init file condtional on that. In any case based on your example—which may be a simplified reflection of reality or which I may have misunderstood—it is not necessary to change the init file to load different packages. Example 1: * main doc lorem ipsum * supplementary material :noexport: :PROPERTIES: :EXPORT_LATEX_HEADER: \usepackage{test} :END: more txt Alternatively, since you're using different LATEX_CLASSes you could load different packages here. > In the spirit of an ECM, I offer the following EIM to illustrate what > I'm trying to do. > > #+TITLE: Paper > #+LATEX_CLASS: journal-article > > * Paper Section 1 > * Paper Section 2 > * Supplementary Material > > Describe supplementary material ... > > ** Supplementary Material Document :noexport: > :PROPERTIES: > :EXPORT_FILE_NAME: supplementary-material > :EXPORT_TITLE: Supplementary Material for Paper > :EXPORT_LATEX_CLASS: journal-article-supplement > :END: > > * Editing setup :noexport: > #+name: editing-setup > #+begin_src emacs-lisp > (require 'ox-latex) > (setq org-export-in-background t) > (setq org-export-async-debug t) > (setq org-export-async-init-file (expand-file-name "init-journal-article.el")) > ... > #+end_src > > * Initialization File for Journal Article :noexport: > > #+name: export-setup-journal-article > #+header: :tangle init-journal-article.el > #+begin_src emacs-lisp > (setq org-latex-packages-alist nil) > (add-to-list 'org-latex-packages-alist '("" "setspace")) > ... > #+end_src > > * Initialization File for Journal Article Supplementary Material :noexport: > > #+name: export-setup-journal-article-supplement > #+header: :tangle init-journal-article-supplement.el > #+begin_src emacs-lisp > (setq org-latex-packages-alist nil) > (add-to-list 'org-latex-packages-alist '("" "setspace")) > (add-to-list 'org-latex-packages-alist '("" "attachfile")) > ... > #+end_src -- You people at the NSA are becoming my new best friends!