From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Handling errors in command line exporting of agenda? Date: Mon, 8 Aug 2011 15:31:39 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWUE-0000wA-BH for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:31:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqWU9-0006rN-42 for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:31:46 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:44828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqWU8-0006pR-UX for emacs-orgmode@gnu.org; Mon, 08 Aug 2011 16:31:41 -0400 Received: by ewy9 with SMTP id 9so753529ewy.0 for ; Mon, 08 Aug 2011 13:31:39 -0700 (PDT) In-Reply-To: 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: suvayu ali Cc: emacs-orgmode On Mon, Aug 8, 2011 at 3:22 PM, suvayu ali wrote: > Hi John, > > On Mon, Aug 8, 2011 at 9:48 PM, John Hendy wrote: >> -batch -l ~/.emacs -eval > > Your problem is the long options are wrong. According to the manpages, > there should be 2 hyphens. > > --eval and --batch. Well, that might be *a* problem, but it's not *the* problem. This produces the same results: ,--- | emacs --batch -l ~/.emacs --eval '(find-file-read-only "~/org/*.org" t)' \ | --eval '(org-batch-agenda "e")' > ~/org/aux/agenda-export.txt `--- I get this from the command line: ,--- | ...~/org/rigor.org locked by jwhendy... (pid 10935): (s, q, p, ?)? `--- Which means that when executed from cron, it won't proceed. Also, good to know re. the man pages... however Worg is wrong, then. Directly from Worg [1]: ,---------- | Let's say you generate an export from the command line, such as the following: | ,--- | | emacs -batch -l ~/.emacs -eval '(org-batch-agenda "e")' | `--- | | or | | ,--- | |emacs -batch -l ~/.emacs -eval '(org-publish-all)' | `--- `---------- The manual contains the same syntax. [2] [1] http://orgmode.org/worg/org-faq.html (see How can I preserve faces when I export an agenda from the command line?). [2] http://orgmode.org/manual/Extracting-agenda-information.html#Extracting-agenda-information Best regards, John > > GL > > -- > Suvayu > > Open source is the future. It sets us free. >