emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: org batch job using emacsclient?


From: Stefan Vollmar
Subject: Re: [Orgmode] Re: org batch job using emacsclient?
Date: Tue, 17 Nov 2009 01:12:09 +0100

Gentlemen,

thanks for the many helpful replies!

To start with, it now works for me and I can measure a consistent speedup of 7x 
(!) for using emacsclient - in an interactive web service (conversion of 
org-files to HTML) the difference between 0.35 s and 2.40 s (average) is 
significant.

(1) Having started the emacs server with

emacs --daemon=org

this shell script works for me:

#!/bin/sh
emacsclient -s org
--eval "(progn 
(add-to-list 'load-path \"/opt/org-6.33c/lisp/\")
(require 'org)(require 'org-exp)
(setq org-export-headline-levels 2)
(find-file \"$1\")
(org-export-as-html 2 nil nil nil nil \".\")
(kill-buffer))"

I have added a (kill-buffer) statement for cleaning up (I observed an 
increasing number of emacsclient processes before), is this a good solution?

(2) A problem remains with (1): it seems that I need to "name" the daemon. 
Otherwise there could be a conflict with Emacs daemons started by other users. 
How can I make sure the daemon is running if the script requires it? I read 
about a "-a" option for emacsclient - how would this work in my case?

Many thanks in advance.
Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: address@hidden   http://www.nf.mpg.de









reply via email to

[Prev in Thread] Current Thread [Next in Thread]