From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: Export an org file from the command line in the background Date: Wed, 19 Oct 2011 22:14:37 +0200 Message-ID: <20111019201437.GA28039@kenny.fritz.box> References: <20111019162146.GA24998@client199-154.wlan.hu-berlin.de> <81fwip3q0k.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGcXF-0003fK-DT for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 16:14:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGcXE-00055g-2G for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 16:14:45 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:64961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGcXD-00055W-NM for emacs-orgmode@gnu.org; Wed, 19 Oct 2011 16:14:43 -0400 Received: by bkbzu5 with SMTP id zu5so3016383bkb.0 for ; Wed, 19 Oct 2011 13:14:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <81fwip3q0k.fsf@gmail.com> 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 Hi, Jambunathan K wrote: > > C-h v org-export-run-in-background This only works for org-export, but not for org-export-as-XXX. Additionally, it appears that setting org-confirm-babel-evaluate locally does not have an effect on background exports. Even setting it globally in a running Emacs instance won't work; the command has to be in a file that is loaded during Emacs startup. The help contains the following text which I don't understand: This variable is safe as a file local variable if its value satisfies the predicate which is byte-compiled expression. Cheers, Viktor > > > 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 > > > > -- >