emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Marcelo de Moraes Serpa <celoserpa@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87sk14kfb7.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <AANLkTimm148kxPssrcFbsr=9KWekbKsMe-30-dc9HkPy@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]

On Sat, 18 Sep 2010 22:59:59 -0500, Marcelo de Moraes Serpa <celoserpa@gmail.com> 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

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

      reply	other threads:[~2010-09-20  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-19  3:59 Emacs hangs forever when running in batch mode and calling a export org function Marcelo de Moraes Serpa
2010-09-20  8:08 ` Eric S Fraga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sk14kfb7.wl%ucecesf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=celoserpa@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).