From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas S. Dye Subject: Re: [PATCH] Re: What is the best way to set #+DATE to today's date? Date: Thu, 06 Aug 2015 12:12:07 -1000 Message-ID: References: <87bnekmknk.fsf@gmx.us> <86egjg3wx8.fsf@example.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNTOn-0005Yb-Bj for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 18:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNTOi-0004GE-62 for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 18:12:29 -0400 Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:34882) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZNTOh-0004Fq-Ut for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 18:12:24 -0400 In-reply-to: <86egjg3wx8.fsf@example.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Fabrice Niessen Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Thanks Fabrice, very helpful. A second patch is attached. All the best, Tom Fabrice Niessen writes: >> Doesn't it get its information from a timestamp in #+DATE? >> >>> I think you missed out explaining what {{{time(FORMAT)}}} does. > > You might be interested by `date', `time' and `modification-time', > depending on what you want to achieve. I've put some examples in my > Org-macros project about those: > > https://github.com/fniessen/org-macros > > Best regards, > Fabrice --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-More-date-and-time-macro-edits.patch Content-Description: Second patch >From cb30697627afacc8950ef85b839f47d48371f39b Mon Sep 17 00:00:00 2001 From: tsdye Date: Thu, 6 Aug 2015 12:08:34 -1000 Subject: [PATCH 2/2] More date and time macro edits --- doc/org.texi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index b5ababb..30c1987 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -10216,18 +10216,21 @@ export. @item @{@{@{date@}@}@} @itemx @{@{@{date(@var{FORMAT})@}@}@} -@itemx @{@{@{time(@var{FORMAT})@}@}@} @cindex date, macro -@cindex time, macro -These macros refer to information associated with the @code{#+DATE} keyword. -The @var{FORMAT} argument, which is optional for the @{@{@{date@}@}@} macro, -should be a format string understood by @code{format-time-string}. Note that -it will only be used if @code{#+DATE} is a single timestamp. +This macro refers to information associated with the @code{#+DATE} keyword. +The optional @var{FORMAT} argument should be a format string understood by +@code{format-time-string}. Note that it will only be used if @code{#+DATE} +is a single timestamp. +@itemx @{@{@{time(@var{FORMAT})@}@}@} @itemx @{@{@{modification-time(@var{FORMAT})@}@}@} @cindex modification time, macro +@cindex time, macro -This macro refers to the modification time of the file being exported. +These macros refer to the current date and time when the document is being +exported and to the modification time of the file being exported, +respectively. The @var{FORMAT} argument should be a format string understood +by @code{format-time-string}. @item @{@{@{input-file@}@}@} @cindex input file, macro -- 2.4.5 --=-=-= Content-Type: text/plain -- Thomas S. Dye http://www.tsdye.com --=-=-=--