From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Insert git hash into exported document Date: Fri, 23 Dec 2016 19:47:42 +0000 Message-ID: <878tr6whpd.fsf@ucl.ac.uk> References: <16430f8b1ffe49dc987db8e599900630@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKcsz-0005ww-6n for emacs-orgmode@gnu.org; Fri, 23 Dec 2016 22:20:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKcsw-0003K2-1R for emacs-orgmode@gnu.org; Fri, 23 Dec 2016 22:20:41 -0500 Received: from mail-db5eur01on0109.outbound.protection.outlook.com ([104.47.2.109]:28475 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKcsv-0003IR-MN for emacs-orgmode@gnu.org; Fri, 23 Dec 2016 22:20:37 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Friday, 23 Dec 2016 at 17:34, David Talmage wrote: > 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. Anything you can do in a shell could be exported to LaTeX. E.g. I do the following with mercurial in one of my documents: #+begin_src org ,* Recent change history ,#+name: changehistoryshellblock ,#+begin_src shell :exports results :results output hg log --template "{date|shortdate} {desc|firstline}\n" --limit 10 fres= a.org ,#+end_src #+end_src HTH, eric =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWF1/XgAKCRDIkZPY//z2 fYYJAJ9LLVvp+Tkahez8+fwYApf54ix5HgCfVyx4YVXkcy5W1yLzDvBbURVQr80= =3pb5 -----END PGP SIGNATURE----- --=-=-=--