emacs-orgmode
[Top][All Lists]
Advanced

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

Re: using header data in document


From: Emanuel Berg
Subject: Re: using header data in document
Date: Wed, 16 Sep 2020 17:18:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Eric S Fraga wrote:

> On Wednesday, 16 Sep 2020 at 00:08, Emanuel Berg via
> "General discussions about Org-mode." wrote:
>
>> Hm, date? Maybe that can be used to do a line like
>> the LaTeX's
>>
>>   Last modified: \today
>>
>> or how would one do that?
>
> Check out the info manual: [[info:org#Macro
> Replacement]] but you should be able to use
> {{{date(%D)}}} to get the date.

{{{date()}}} works as does {{{date(%D)}}} in a sense,
only the format string doesn't seem to influence the
output, which is "September 16, 2020".

(info "(org) Macro replacement")

  ‘{{{date}}}’
  ‘{{{date(FORMAT)}}}’
       This macro refers to the ‘#+DATE’ keyword.  FORMAT is an optional
       argument to the ‘{{{date}}}’ macro that will be used only if
       ‘#+DATE’ is a single timestamp.  FORMAT should be a format string
       understood by ‘format-time-string’.

(describe-function #'format-time-string)

  [...]
  %D is like "%m/%d/%y".
  [...]

So it should work according to these parts of the
documentation...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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