David Talmage writes:
> I'd like to insert the git hash of HEAD in the org-mode documents that I
> export. Is there an easy way? I'm exporting to LaTeX.
...
#+NAME: hash-from-lisp
#+BEGIN_SRC emacs-lisp
(shell-command-to-string "git rev-parse HEAD" )
#+END_SRC
#+RESULTS: hash-from-lisp
: 099b6ceee7264832b8e13f1156974b8017e6e4bb
You can hide the result using proper headers or the noexport tag and
then print the result in a verbose way:
The latest commit hash is src_emacs-lisp[:var i=hash-from-lisp]{(format "%s" i)}