From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: ODT preferred format option per-file? Date: Sun, 02 Sep 2012 11:25:38 +0200 Message-ID: <87r4qkbwtp.fsf@gmail.com> References: <877gsfr7a5.wl%jamshark70@dewdrop-world.net> <87sjb1fuq5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T86Uq-0000WV-EU for emacs-orgmode@gnu.org; Sun, 02 Sep 2012 05:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T86Up-0005nD-6b for emacs-orgmode@gnu.org; Sun, 02 Sep 2012 05:29:36 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:52640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T86Uo-0005n8-V9 for emacs-orgmode@gnu.org; Sun, 02 Sep 2012 05:29:35 -0400 Received: by weys10 with SMTP id s10so2661751wey.0 for ; Sun, 02 Sep 2012 02:29:34 -0700 (PDT) In-Reply-To: <87sjb1fuq5.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 02 Sep 2012 00:15:06 +0530") 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: Jambunathan K Cc: James Harkins , emacs-orgmode@gnu.org Hello, Jambunathan K writes: > James Harkins writes: > >> I have one particular org file that I would like to export to PDF by >> way of ODT. (I already set up outline styling in LibreOffice and I >> would like to use that, instead of trying to reconfigure a similar >> look in LaTeX. For fun, I did try the LaTeX pdf export and the output >> format is not what I need for this case.) >> >> But I may want to export other org files to ODT *without* converting them to PDF. >> >> http://orgmode.org/manual/Extending-ODT-export.html >> >> This says I can customize the org-export-odt-preferred-output-format >> variable. This works beautifully, but it's a global setting that will >> apply to every ODT export. >> >> So my question is -- is there any export option for the preferred >> format, per file? Something like: >> >> #+ODT_PREFERRED_FORMAT: pdf >> >> I couldn't find any documentation in the ODT export section of the >> manual for an option like this. >> >> Alternately, I suppose I could write a lisp function that would set >> the variable and call the export, but that would definitely be a hack. > > Old exporter > ============ > > If you are using org-odt.el, then you can use file local variables. I > have pushed a fix which makes string values of this variable safe. > > M-x add-file-local-variable RET org-export-odt-preferred-output-format > RET "pdf" RET > > Or > > Add the following to your Org file. Remember to re-visit the file to > activate the newly installed value. > > # Local Variables: > # org-export-odt-preferred-output-format: "pdf" > # End: > > > New exporter > ============ > > The above local variable trick will fail in case of org-e-odt.el. When > I get some time I will introduce a per-buffer keyword for this variable. Note that Org provides a BIND mechanism for such cases. So, adding: #+BIND: org-e-export-opt-preferred-output-format "pdf" somewhere in the buffer should be enough. Regards, -- Nicolas Goaziou