Hello,

Eric S Fraga <e.fr...@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 via email to