From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: export-latex-final-hook Date: Mon, 19 Apr 2010 22:28:45 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O43Cj-0002O5-3f for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 22:28:49 -0400 Received: from [140.186.70.92] (port=41721 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O43Ch-0002Mk-PG for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 22:28:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O43Cg-0007lt-SN for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 22:28:47 -0400 Received: from mail-iw0-f176.google.com ([209.85.223.176]:53965) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O43Cg-0007lo-OR for emacs-orgmode@gnu.org; Mon, 19 Apr 2010 22:28:46 -0400 Received: by iwn6 with SMTP id 6so3756341iwn.26 for ; Mon, 19 Apr 2010 19:28:46 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs-orgmode@gnu.org, Carsten Dominik Thanks to Dan and Carsten, I now have this: (defun mwp/push-latex-to-odt () "takes the exported tex file from org-mode and converts it to odt, then launches openoffice" (shell-command (format "mk4ht oolatex %s.tex" (file-name-sans-extension (buffer-name)))) (shell-command (format "ooffice %s.odt &" (file-name-sans-extension (buffer-name))))) (add-hook 'org-export-latex-final-hook 'mwp/push-latex-to-odt) which works fine. The only issue is that the first shell command, mk4ht oolatex, sometimes takes a while to finish processing & would be nice to have running in the background. Should just write a shell script that runs the two commands, and then fork that process? Or is there a slightly more elegant way that keeps all of the programming contained in a lisp file? Thanks again, matt