emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Change title and export filename based on code value?
@ 2013-05-08 18:06 Gary Oberbrunner
  2013-05-09  8:23 ` Nicolas Goaziou
  2013-05-10  6:36 ` Carsten Dominik
  0 siblings, 2 replies; 3+ messages in thread
From: Gary Oberbrunner @ 2013-05-08 18:06 UTC (permalink / raw)
  To: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

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).

...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?

-- 
Gary

[-- Attachment #2: Type: text/html, Size: 867 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change title and export filename based on code value?
  2013-05-08 18:06 Change title and export filename based on code value? Gary Oberbrunner
@ 2013-05-09  8:23 ` Nicolas Goaziou
  2013-05-10  6:36 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2013-05-09  8:23 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: Orgmode Mailing List

Hello,

Gary Oberbrunner <garyo@oberbrunner.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Change title and export filename based on code value?
  2013-05-08 18:06 Change title and export filename based on code value? Gary Oberbrunner
  2013-05-09  8:23 ` Nicolas Goaziou
@ 2013-05-10  6:36 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2013-05-10  6:36 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: Orgmode Mailing List


On 8.5.2013, at 20:06, Gary Oberbrunner <garyo@oberbrunner.com> wrote:

> 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).
> 
> ...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?

As Nicolas says, there is no support for this.
But if you are exporting specific subtrees, you can give export file names for subtrees using the EXPORT_FILE_NAME property.

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-10  6:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 18:06 Change title and export filename based on code value? Gary Oberbrunner
2013-05-09  8:23 ` Nicolas Goaziou
2013-05-10  6:36 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).