emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: Karl Voit <news1142@karl-voit.at>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: :EXPORT_FILE_NAME: containing a date-stamp
Date: Wed, 7 Feb 2018 18:06:20 +0000	[thread overview]
Message-ID: <BF4D1445-F636-4201-9C8C-CF6994D75E8D@ucsd.edu> (raw)
In-Reply-To: <CAFyQvY33A67d1OxPam87mecqGmrDnymQrAJa510jzu-M_6UfNg@mail.gmail.com>



> On Feb 7, 2018, at 9:37 AM, Kaushal Modi <kaushal.modi@gmail.com> wrote:
> 
> On Wed, Feb 7, 2018 at 12:22 PM Berry, Charles <ccberry@ucsd.edu> wrote:
> Use an `eval' macro.
> 
> In a more recent version than you use, this works:
> 
> * abc
>   :PROPERTIES:
>   :EXPORT_TITLE: {{{etitle(my title)}}}
>   :END:
> 
> #+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1))
> 
> That works for EXPORT_TITLE!
> 
> So I tried for EXPORT_FILE_NAME, but it doesn't work there, because org-export-output-file-name should be getting called internally *before* the macro expansion is done.

I missed that. 

Further, `org-export-file-name' gets called before `org-export-as' so there is no hope of using export hooks or filters or other gambits like that.

I don't see a clean way to do date stamp the file name without writing your own export-to-file function that handles date-stamping the file arg sent to `org-export-to-file' or replacing/advicing `org-export-file-name' to do that.

Chuck

      reply	other threads:[~2018-02-07 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 15:31 :EXPORT_FILE_NAME: containing a date-stamp Karl Voit
2018-02-07 16:41 ` Kaushal Modi
2018-02-07 17:05 ` Berry, Charles
2018-02-07 17:37   ` Kaushal Modi
2018-02-07 18:06     ` Berry, Charles [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BF4D1445-F636-4201-9C8C-CF6994D75E8D@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=news1142@karl-voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).