[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] What is the best way to set #+DATE to today's date?

From: Kaushal
Subject: Re: [O] What is the best way to set #+DATE to today's date?
Date: Thu, 6 Aug 2015 15:25:24 -0400

@Nick That works! Thank you!

I used the below instead (learned that I needed to escape that comma).

#+DATE: {{{time(%b %d %Y\, %a)}}}

I had read about {{{date}}} but assumed that {{{time}}} does the same thing as {{{date}}} because they are put together with the same description. The documentation actually doesn't tell what {{{time}}} does: http://orgmode.org/manual/Macro-replacement.html

@John: Looks like I will not need any elisp hacks :)

Kaushal Modi

On Thu, Aug 6, 2015 at 2:18 PM, John Kitchin <address@hidden> wrote:
I use a function like that here:

and to set the filetag as you suggest you would call it like this:

#+BEGIN_SRC emacs-lisp
(gb-set-filetag "DATE" (format-time-string "%b %d %Y, %a" (current-time)))

You could put that in some hook function if you like.

Kaushal writes:

>> Why don't you just use a timestamp?
> But that would need me to insert the timestamp manually each time before
> exports
>> You can update whenever you want or using
>>    (org-insert-time-stamp (current-time))
>> at the right spot.
> Wouldn't that too need manual navigation to #+date: and then eval that
> elisp form?

Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

reply via email to

[Prev in Thread] Current Thread [Next in Thread]