From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: Re: Re: org batch job using emacsclient? Date: Tue, 17 Nov 2009 01:12:09 +0100 Message-ID: <9F07BE57-B87D-4433-8489-4CDD268EC638@nf.mpg.de> References: <4A2B8DB1-1A56-40CA-B972-E44C16F9DD1E@nf.mpg.de> <873a4e329l.fsf@dynapse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NABg7-0005s0-MI for emacs-orgmode@gnu.org; Mon, 16 Nov 2009 19:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NABg3-0005rY-KR for emacs-orgmode@gnu.org; Mon, 16 Nov 2009 19:12:15 -0500 Received: from [199.232.76.173] (port=41977 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NABg3-0005rV-Fs for emacs-orgmode@gnu.org; Mon, 16 Nov 2009 19:12:11 -0500 Received: from mail.nf.mpg.de ([134.95.44.50]:50799) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NABg3-000144-55 for emacs-orgmode@gnu.org; Mon, 16 Nov 2009 19:12:11 -0500 Received: from [192.168.178.21] by mail.nf.mpg.de (Sun Java(tm) System Messaging Server 6.3-8.03 (built Apr 24 2009; 32bit)) with ESMTPSA id <0KT800A4D8LZIY00@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 01:13:12 +0100 (MET) In-reply-to: <873a4e329l.fsf@dynapse.com> 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: emacs-orgmode Cc: "Gregory J. Grubbs" 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=3Dorg this shell script works for me: #!/bin/sh emacsclient -s org --eval "(progn=20 (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 --=20 Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut f=FCr neurologische Forschung Gleuelerstr. 50, 50931 K=F6ln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de