From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: source block evaluation in #+DATE line
Date: Wed, 11 May 2022 05:15:29 +0200 [thread overview]
Message-ID: <87h75w69pq.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: CAFyQvY1DW1QfSJb2hnPFLsbWmQgjAh1UwhsWjvbevYWss4-UJA@mail.gmail.com
Hi Kaushal and Jeremie,
Thanks for the comments. And sorry for the misleading example. I do not
want to use source blocks to insert a date. In fact I want to include
the current git commit hash on the title slide.
So, something like this:
src_sh[:exports results :results output wrap replace]{git describe --always --dirty}
But that is not evaluated...
Any hint?
Thanks,
Andreas
Kaushal Modi <kaushal.modi@gmail.com> writes:
> Also check out the {{{time}}} macro if you want complete control on
> the formatting of the date string.
>
> Example Org snippet:
>
> =====
>
> #+date: {{{time(%Y-%m-%d)}}}
> #+options: toc:nil author:nil
>
>
> See the ~{{{time}}}~ macro in [[info:org#Macro Replacement][org#Macro
> Replacement]].
>
> The format passed to the ~time~ macro is same as that understood by
> [[help:format-time-string]].
>
> - Note :: Remember to escape the commas. \\
> Example: ~#+date: {{{time(%b %e %Y\, %a)}}}~.
>
> #+begin_src emacs-lisp
> (org-export-as 'ascii)
> #+end_src
>
> =====
next prev parent reply other threads:[~2022-05-11 3:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 11:50 source block evaluation in #+DATE line Andreas Leha
2022-05-10 20:11 ` Jeremie Juste
2022-05-10 20:26 ` Kaushal Modi
2022-05-11 3:15 ` Andreas Leha [this message]
2022-05-11 16:50 ` Eric S Fraga
2022-05-11 17:07 ` Eric S Fraga
2022-05-12 7:53 ` Andreas Leha
2022-05-11 17:12 ` Timothy
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=87h75w69pq.fsf@med.uni-goettingen.de \
--to=andreas.leha@med.uni-goettingen.de \
--cc=emacs-orgmode@gnu.org \
/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).