emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Emanuel Berg via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: Re: using header data in document
Date: Wed, 16 Sep 2020 17:18:15 +0200	[thread overview]
Message-ID: <87363hsqbs.fsf@ebih.ebihd> (raw)
In-Reply-To: 87zh5pssfb.fsf@ucl.ac.uk

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	other threads:[~2020-09-16 15:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 21:03 using header data in document Emanuel Berg via General discussions about Org-mode.
2020-09-15 21:41 ` Corwin Brust
2020-09-15 22:08   ` Emanuel Berg via General discussions about Org-mode.
2020-09-16 14:35     ` Eric S Fraga
2020-09-16 15:18       ` Emanuel Berg via General discussions about Org-mode. [this message]
2020-09-16 15:34         ` Eric S Fraga
2020-09-16 15:56           ` Emanuel Berg via General discussions about Org-mode.
2020-09-16 16:02             ` Eric S Fraga
2020-09-16 17:14               ` Emanuel Berg via General discussions about Org-mode.
2020-09-17 12:29                 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87363hsqbs.fsf@ebih.ebihd \
    --to=emacs-orgmode@gnu.org \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).