emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Insert git hash into exported document


From: Michael Welle
Subject: Re: [O] Insert git hash into exported document
Date: Sat, 24 Dec 2016 10:07:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux)

Hello,

Eric S Fraga <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]