From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: Re: Error when trying to use --batch to export agenda ical: cl-block-nil error Date: Sat, 24 Jan 2015 09:44:31 -0500 Message-ID: <878ugsjl0w.fsf@gmail.com> References: <87d264jmc6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF1wx-0005gp-B8 for emacs-orgmode@gnu.org; Sat, 24 Jan 2015 09:44:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YF1ww-0006he-6w for emacs-orgmode@gnu.org; Sat, 24 Jan 2015 09:44:35 -0500 Received: from mail-yh0-x230.google.com ([2607:f8b0:4002:c01::230]:48425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF1ww-0006ha-1J for emacs-orgmode@gnu.org; Sat, 24 Jan 2015 09:44:34 -0500 Received: by mail-yh0-f48.google.com with SMTP id a41so716620yho.7 for ; Sat, 24 Jan 2015 06:44:33 -0800 (PST) In-Reply-To: <87d264jmc6.fsf@gmail.com> (Tory S. Anderson's message of "Sat, 24 Jan 2015 09:16:09 -0500") 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: orgmode list Okay, so the obvious fix was to load my org init file as in the following: emacs --batch --user $USER --eval "(progn (org-agenda-list nil nil 'year) (org-icalendar-combine-agenda-files))" Now, the wiki page at http://www.emacswiki.org/emacs/BatchMode mentinos that packages don't get loaded, so that is where the obvious fix comes from. But then my question becomes, how does it know what my agenda files are in the first place? And why does org seem to break out-of-the-box with the cl-block error if I don't manually do a '(require 'cl-lib) ? torys.anderson@gmail.com (Tory S. Anderson) writes: > When I try to export my agenda to ics (ical) from the command line, I use the following command: > emacs --batch --user $USER --eval "(progn (org-agenda-list nil nil 'year) (org-icalendar-combine-agenda-files))" > > But this fails because, it says > No catch for tag: --cl-block-nil--, org-agenda-date-weekend > > and it fails to produce an ics file. > > However, when I'm actually executing the year-view and `org-icalendar-combine-agenda-files` in my running session of emacs, it works fine. I used to have that problem but someone here helped me solve it by adding '(require 'cl-lib) to one of my init files. But why isn't this working to prevent the cl-block error when I run the batch mode? Ideas?