From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Emacs hangs forever when running in batch mode and calling a export org function Date: Mon, 20 Sep 2010 09:08:28 +0100 Message-ID: <87sk14kfb7.wl%ucecesf@ucl.ac.uk> References: Reply-To: e.fraga@ucl.ac.uk Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Mon_Sep_20_09:08:28_2010-1" Return-path: Received: from [140.186.70.92] (port=41388 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxcFj-0000Y7-9J for emacs-orgmode@gnu.org; Mon, 20 Sep 2010 05:01:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxcFh-0003yE-Uw for emacs-orgmode@gnu.org; Mon, 20 Sep 2010 05:01:35 -0400 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:45983) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxcFh-0003y2-Qe for emacs-orgmode@gnu.org; Mon, 20 Sep 2010 05:01:33 -0400 In-Reply-To: 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: Marcelo de Moraes Serpa Cc: Org Mode --Multipart_Mon_Sep_20_09:08:28_2010-1 Content-Type: text/plain; charset=US-ASCII On Sat, 18 Sep 2010 22:59:59 -0500, Marcelo de Moraes Serpa wrote: > > Hello all, > > So, I was trying to create a simple bash script to export my org items > as iCal, upload it somewhere and subscribe to it from iCal / Google > Calendar. Here's what I came with: > > emacs --batch --eval \ > "(progn \ > (add-to-list 'load-path \"~/.emacs.d/vendor/org/lisp\") \ > (load-file \"~/.emacs.d/vendor/org/lisp/org.el\") > (load-file \"~/.emacs.d/vendor/org/lisp/org-icalendar.el\") \ > (setq org-combined-agenda-icalendar-file \"~/org/org.ics\") \ > (setq org-agenda-files (quote (\"~/org/gtd/gtd.org\"))) > )" \ > -f org-export-icalendar-combine-agenda-files > > If I run the exact same code on a vanilla emacs, it works. If I try to > run this command in the shell, I get the following output: > > sh org-ical-export.sh > Loading /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/org.el (source)... > Loading subst-ksc... > Loading subst-gb2312... > Loading subst-big5... > Loading subst-jis... > Loading /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/org-icalendar.el > (source)... > > And it hangs forever. No error message nothing. > > I've checked the Activity Monitor, and this specific instance of emacs > quickly starts using ~100% of the CPU. However, I can't really debug > what's wrong. > > I am on OSX Snow Leopard, GNU Emacs 23.2.1 (x86_64-apple-darwin, NS > apple-appkit-1038.29) of 2010-05-08, org release_7.01h-524-gcf5f. > > Any ideas? > > Thanks, > > Marcelo. I use the following within a shell script: --8<---------------cut here---------------start------------->8--- DIARY=${HOME}/git/notes/diary emacs -Q --batch --debug-init \ --directory=${HOME}/s/emacs --directory=/usr/share/emacs/site-lisp/auctex \ --load=esf-org.el --visit=${DIARY}.org --eval='(org-export-icalendar-this-file)' scp ${DIARY}.ics SOMEWHERE_ON_THE_INTERNET --8<---------------cut here---------------end--------------->8--- I have all relevant settings for org in the file esf-org.el and, because that file makes use of some auctex variables/functions, I have to specify a load path for auctex. The debug-init is not necessary but I just never got around to deleting it... I am on Debian Linux (testing/unstable) with emacs 23.2.x and up-to-date org. HTH, eric --Multipart_Mon_Sep_20_09:08:28_2010-1 Content-Type: text/plain; charset=US-ASCII -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D --Multipart_Mon_Sep_20_09:08:28_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Multipart_Mon_Sep_20_09:08:28_2010-1--