From: Stefan Vollmar <vollmar@nf.mpg.de>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Cc: "Gregory J. Grubbs" <gregory@dynapse.com>
Subject: Re: Re: org batch job using emacsclient?
Date: Tue, 17 Nov 2009 01:12:09 +0100 [thread overview]
Message-ID: <9F07BE57-B87D-4433-8489-4CDD268EC638@nf.mpg.de> (raw)
In-Reply-To: <873a4e329l.fsf@dynapse.com>
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: vollmar@nf.mpg.de http://www.nf.mpg.de
next prev parent reply other threads:[~2009-11-17 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 8:51 org batch job using emacsclient? Stefan Vollmar
2009-11-16 11:07 ` Noorul Islam K M
2009-11-16 11:13 ` Adam Spiers
2009-11-16 14:07 ` Magnus Henoch
2009-11-16 15:41 ` Gregory J. Grubbs
2009-11-17 0:12 ` Stefan Vollmar [this message]
2009-11-17 2:25 ` Sebastian Rose
2009-11-17 9:06 ` Stefan Vollmar
2009-11-17 12:16 ` Sebastian Rose
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=9F07BE57-B87D-4433-8489-4CDD268EC638@nf.mpg.de \
--to=vollmar@nf.mpg.de \
--cc=emacs-orgmode@gnu.org \
--cc=gregory@dynapse.com \
/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).