From mboxrd@z Thu Jan 1 00:00:00 1970 From: Iannis Zannos Subject: Run commands after html export Date: Sat, 12 Oct 2013 18:33:29 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b62226cec917a04e88cf427 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV1C7-0003JU-IB for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 11:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV1C6-0004kx-Ax for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 11:33:31 -0400 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:40219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV1C6-0004kr-0I for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 11:33:30 -0400 Received: by mail-ee0-f52.google.com with SMTP id c41so2473622eek.39 for ; Sat, 12 Oct 2013 08:33:29 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7b62226cec917a04e88cf427 Content-Type: text/plain; charset=ISO-8859-1 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 > > > --047d7b62226cec917a04e88cf427 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Hello Jarmo,=A0

it may be usefu= l to look into the publishing scheme of org-mode.=A0
Export =3D export a single file
Publish =3D publish a set of files. More extensive configu= ration capabilities. Can also be used to publish single file.=A0

Publish provides very extensive config= uration capabilities, which include a preparation-function and a completion= -function hook. The completion function can be used to ftp or rsync or othe= rwise copy data to the target directory. Have a look at:=A0

http://orgmode.org/worg= /doc.html search for:=A0org-publish-project-alist. In that section you = will find following passage:=A0

=A0 `:publishing-function&= #39;

= =A0 =A0 Function to publish file. =A0Each back-end may define its
=A0 =A0 own (i.e. `org-latex-publish-to-pdf'= ,
=A0 =A0 `org-html-publish-to-html'). = =A0May be a list of functions, in
=A0 =A0 w= hich case each function in the list is invoked in turn.

Another pro= perty allows you to insert code that prepares
a project for publishing. =A0For example, you could call GNU Make
<= div class=3D"gmail_extra"> on a certain makefile, to ensure published files are built up to
date.

=A0 `:preparation-function'

=A0 =A0 Function to be called before p= ublishing this project. =A0This
=A0 =A0 may= also be a list of functions.

=A0 `:completion-function'

=A0 =A0 Function to be called after publishing thi= s project. =A0This
=A0 =A0 may also be a li= st of functions.

You will find more info in the orgmode manual here:=A0<= /div>
and here:=A0
and in further related parts linked-to from the above.=A0
<= div>
Hopefully the above is usefu= l.=A0

Best,=A0
Iannis Zannos


On Sat, Oct 12, 2013 at 2:11 PM, Jarmo Hurri &= lt;jarmo.hurri@syk.= fi> 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




--047d7b62226cec917a04e88cf427--