emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: source block evaluation in #+DATE line
Date: Wed, 11 May 2022 17:50:19 +0100	[thread overview]
Message-ID: <875ymchv3o.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87h75w69pq.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 11 May 2022 05:15:29 +0200")

On Wednesday, 11 May 2022 at 05:15, Andreas Leha wrote:
> 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.

I do this by:

--8<---------------cut here---------------start------------->8---
#+NAME: mydateline
#+BEGIN_SRC emacs-lisp
(format "#+DATE: \\copyright{} %s\n" *this*) 

src_shell[:post mydateline() :results raw]{echo -n $(date +%Y) '@@latex:\\ \vspace*{0.1cm} \tiny \color{gray}@@' version $(git log --format=format:"%ad %h" --date=short | head -1 )} 
--8<---------------cut here---------------end--------------->8---

: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50

  reply	other threads:[~2022-05-11 16:58 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
2022-05-11 16:50       ` Eric S Fraga [this message]
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:

  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=875ymchv3o.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \


* 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


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).