Hello Jarmo, it may be useful to look into the publishing scheme of org-mode. Export = export a single file Publish = publish a set of files. More extensive configuration capabilities. Can also be used to publish single file. Publish provides very extensive configuration capabilities, which include a preparation-function and a completion-function hook. The completion function can be used to ftp or rsync or otherwise copy data to the target directory. Have a look at: http://orgmode.org/worg/doc.html search for: org-publish-project-alist. In that section you will find following passage: `:publishing-function' Function to publish file. Each back-end may define its own (i.e. `org-latex-publish-to-pdf', `org-html-publish-to-html'). May be a list of functions, in which case each function in the list is invoked in turn. Another property allows you to insert code that prepares a project for publishing. For example, you could call GNU Make on a certain makefile, to ensure published files are built up to date. `:preparation-function' Function to be called before publishing this project. This may also be a list of functions. `:completion-function' Function to be called after publishing this project. This may also be a list of functions. You will find more info in the orgmode manual here: http://orgmode.org/manual/Configuration.html#Configuration and here: http://orgmode.org/manual/Sources-and-destinations.html#Sources-and-destinations and in further related parts linked-to from the above. Hopefully the above is useful. Best, Iannis Zannos On Sat, Oct 12, 2013 at 2:11 PM, Jarmo Hurri wrote: > > Answering my own question... > > > What I would like to do now is to automatically run some commands > > after I have exported an org file as html. > > I ended up circumventing the problem - that is, the exporter - by > creating a code block in which I first run org-html-export-to-html and > then do my git stuff. I no longer use the exporter, I just evaluate the > block. > > Lesson learned. > > Jarmo > > >