From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas S. Dye Subject: [PATCH] Re: What is the best way to set #+DATE to today's date? Date: Thu, 06 Aug 2015 10:51:56 -1000 Message-ID: References: <87bnekmknk.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNS9B-0002J3-UP for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 16:52:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNS96-0000vu-Ll for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 16:52:17 -0400 Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:57549) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZNS96-0000tn-FI for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 16:52:12 -0400 In-reply-to: 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: Kaushal Cc: ndokos@gmail.com, emacs-org list , Rasmus , John Kitchin --=-=-= Content-Type: text/plain OK, here is a patch that tries to do that. All the best, Tom Kaushal writes: > Yeah, the documentation definitely needs refining. > > {{{date}}} / {{{date(FORMAT)}}} [FORMAT is optional] - Inserts the > #+DATE keyword value; > optionally formats as per FORMAT (Refer `format-time-string` function for > syntax.){{{time(FORMAT)}}} - Inserts the current time stamp as per the > FORMAT {{{modification-time(FORMAT)}}} - Inserts modification time of the > file being exported as per the FORMAT --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Edit-date-and-time-macros.patch Content-Description: Patch for org.texi >From cf8ba2d13a4b733e358b28fe2ad8d83f0018fca9 Mon Sep 17 00:00:00 2001 From: tsdye Date: Thu, 6 Aug 2015 10:47:07 -1000 Subject: [PATCH] Edit date and time macros --- doc/org.texi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index d420259..b5ababb 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -10217,15 +10217,17 @@ export. @item @{@{@{date@}@}@} @itemx @{@{@{date(@var{FORMAT})@}@}@} @itemx @{@{@{time(@var{FORMAT})@}@}@} -@itemx @{@{@{modification-time(@var{FORMAT})@}@}@} @cindex date, macro @cindex time, macro -@cindex modification time, macro -These macros refer to the @code{#+DATE} keyword, the current date, and the -modification time of the file being exported, respectively. @var{FORMAT} +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 -@var{FORMAT} is an optional argument to the @code{@{@{@{date@}@}@}} macro, -and that it will only be used if @code{#+DATE} is a single timestamp. +it will only be used if @code{#+DATE} is a single timestamp. + +@itemx @{@{@{modification-time(@var{FORMAT})@}@}@} +@cindex modification time, macro + +This macro refers to the modification time of the file being exported. @item @{@{@{input-file@}@}@} @cindex input file, macro -- 2.4.5 --=-=-= Content-Type: text/plain -- Thomas S. Dye http://www.tsdye.com --=-=-=--