From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: :EXPORT_FILE_NAME: containing a date-stamp Date: Wed, 7 Feb 2018 18:06:20 +0000 Message-ID: References: <2018-02-07T16-21-12@devnull.Karl-Voit.at> <990C9C49-F7EB-42F6-B925-A1E299B4F1F9@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejU7T-0002a6-N3 for emacs-orgmode@gnu.org; Wed, 07 Feb 2018 13:06:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejU7O-0004V1-PB for emacs-orgmode@gnu.org; Wed, 07 Feb 2018 13:06:55 -0500 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:55166) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejU7O-0004TZ-94 for emacs-orgmode@gnu.org; Wed, 07 Feb 2018 13:06:50 -0500 In-Reply-To: Content-Language: en-US Content-ID: 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" To: Kaushal Modi Cc: Karl Voit , "emacs-orgmode@gnu.org" > On Feb 7, 2018, at 9:37 AM, Kaushal Modi wrote: >=20 > On Wed, Feb 7, 2018 at 12:22 PM Berry, Charles wrote: > Use an `eval' macro. >=20 > In a more recent version than you use, this works: >=20 > * abc > :PROPERTIES: > :EXPORT_TITLE: {{{etitle(my title)}}} > :END: >=20 > #+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1)) >=20 > That works for EXPORT_TITLE! >=20 > So I tried for EXPORT_FILE_NAME, but it doesn't work there, because org-e= xport-output-file-name should be getting called internally *before* the mac= ro expansion is done. I missed that.=20 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 t= o `org-export-to-file' or replacing/advicing `org-export-file-name' to do t= hat. Chuck=