From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Export an org file from the command line in the background Date: Wed, 19 Oct 2011 21:57:55 +0530 Message-ID: <81fwip3q0k.fsf@gmail.com> References: <20111019162146.GA24998@client199-154.wlan.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGZ08-0002Wn-W8 for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 12:28:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGZ07-0003Lf-W3 for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 12:28:20 -0400 Received: from mail-pz0-f47.google.com ([209.85.210.47]:39499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGZ07-0003LZ-Q0 for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 12:28:19 -0400 Received: by pzd13 with SMTP id 13so5141627pzd.6 for ; Wed, 19 Oct 2011 09:28:19 -0700 (PDT) In-Reply-To: <20111019162146.GA24998@client199-154.wlan.hu-berlin.de> (Viktor Rosenfeld's message of "Wed, 19 Oct 2011 18:21:46 +0200") 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 C-h v org-export-run-in-background > Hi, > > is it possible to export an org file from the command line, so that a > currently running Emacs instance is not disturbed? I want to export the > attached org file and run the included source blocks, so I have an > activity report in the end. I use the shell script pasted below, but > there are two problems: > > - my Emacs instance is blocked during the execution of the shell > scripts contained in the file > - the script globally sets org-confirm-babel-evaluate to nil for my > Emacs instance > > The second problem could possibly be solved with a local file variable. > But the first problem remains. If I use emacs instead of emacsclient, it > complains about a running Emacs instance. > > #!/bin/sh > > emacsclient -c \ > --eval "(progn > (find-file \"macports.org\")) > (setq org-confirm-babel-evaluate nil) > (org-export-as-html 3) > (kill-buffer) > (delete-frame))" > > I'm using Org-Mode 7.7. > > Cheers, > Viktor > --