emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] populating macros by parsing file name?


From: Stig Brautaset
Subject: [O] populating macros by parsing file name?
Date: Wed, 25 May 2016 16:29:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Hello!

Currently I have these three lines at the start of my invoices:

#+BEGIN_EXAMPLE
#+macro: invoice-no 11
#+date: 2016-06-01
#+title: Invoice #{{{invoice-no}}}
#+END_EXAMPLE

However, sometimes I forget to update the invoice number or date when copying
the old invoice. Since I name my invoices in the format =NN_YYYY-mm-dd.org=
I'm wondering if there's any way I can automatically populate the =invoice-no=
and date macros by parsing the file name? I found the {{{input-file}}}
macro, but I haven't been able to do anything useful with it.

Any help appreciated!

Stig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]