* populating macros by parsing file name?
@ 2016-05-25 15:29 Stig Brautaset
0 siblings, 0 replies; only message in thread
From: Stig Brautaset @ 2016-05-25 15:29 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-25 21:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 15:29 populating macros by parsing file name? Stig Brautaset
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).