emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: Insert git hash into exported document
Date: Sat, 24 Dec 2016 10:07:11 +0100	[thread overview]
Message-ID: <87a8blofuo.fsf@luisa.c0t0d0s0.de> (raw)
In-Reply-To: <878tr6whpd.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Fri, 23 Dec 2016 19:47:42 +0000")

Hello,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> 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 fresa.org
>   ,#+end_src
> #+end_src
do you have some mechanism that warns you if you try to export
uncommitted changes? I'm not sure how such a process should be designed.
I think most of the time you publish preliminary revisions and then you
will hate such a warning. On the other hand, I often do work twice when
publishing the final revision, because I forget to checkin and then the
history in the export is wrong.

Regards
hmw

  reply	other threads:[~2016-12-24  9:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <16430f8b1ffe49dc987db8e599900630@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-23 19:47 ` Insert git hash into exported document Eric S Fraga
2016-12-24  9:07   ` Michael Welle [this message]
     [not found]   ` <47796546026040e08345d06e9988e8dd@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-03 12:13     ` Eric S Fraga
2017-01-05 16:06       ` Michael Welle
2016-12-23 17:34 David Talmage
2016-12-23 20:13 ` Daniele Pizzolli
2016-12-28 19:12   ` David Talmage

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=87a8blofuo.fsf@luisa.c0t0d0s0.de \
    --to=mwe012008@gmx.net \
    --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).