From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Change title and export filename based on code value? Date: Thu, 09 May 2013 10:23:46 +0200 Message-ID: <87txmco92l.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaM8i-0005VF-4w for emacs-orgmode@gnu.org; Thu, 09 May 2013 04:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaM8h-0000LT-2z for emacs-orgmode@gnu.org; Thu, 09 May 2013 04:23:48 -0400 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:46581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaM8g-0000It-TL for emacs-orgmode@gnu.org; Thu, 09 May 2013 04:23:47 -0400 Received: by mail-wg0-f51.google.com with SMTP id b13so2660843wgh.18 for ; Thu, 09 May 2013 01:23:45 -0700 (PDT) In-Reply-To: (Gary Oberbrunner's message of "Wed, 8 May 2013 14:06:14 -0400") 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: Gary Oberbrunner Cc: Orgmode Mailing List Hello, Gary Oberbrunner writes: > I'd like to change the title of my report, and the exported pdf filename, > based on a value I can change in the org-mode source. > > I have a source block like this: > > #+NAME: reporttype > #+BEGIN_SRC elisp :results value silent :exports results > "Foo" > #+END_SRC > > I figured out how to do the title: > > #+TITLE My Report: call_reporttype()[:results raw] Results > > which is pretty neat (but wasn't easy to figure out, I'll work on that in > the doc). Using a macro is another option: #+MACRO: my-title Foo #+TITLE: My Report: {{{my-title}}} Results > ...but I'd also like to set the exported PDF filename based on the > reporttype, but I'm not sure there is an option for that. Is there? And > if there is, is there a way to interpolate my reporttype into it? No there isn't. Org expects the produced file to sit in the same directory with a similar name. You have to rename it yourself after the export. Regards, -- Nicolas Goaziou