[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: source block evaluation in #+DATE line
From: |
Eric S Fraga |
Subject: |
Re: source block evaluation in #+DATE line |
Date: |
Wed, 11 May 2022 17:50:19 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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*)
#+END_SRC
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---
HTH,
eric
--
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50
Re: source block evaluation in #+DATE line, Timothy, 2022/05/11