From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Vollmar Newsgroups: gmane.emacs.help Subject: Re: Emacs, Org Mode, and Exporting to The Command Line Troubles Date: Fri, 01 Oct 2010 20:57:05 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Apple-Mail-24-562064448; protocol="application/pkcs7-signature"; micalg=sha1 X-Trace: dough.gmane.org 1285962829 17526 80.91.229.12 (1 Oct 2010 19:53:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 19:53:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Colin Grey Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 01 21:53:47 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1lft-0000uy-VX for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Oct 2010 21:53:47 +0200 Original-Received: from localhost ([127.0.0.1]:56605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1lfs-00058q-Ic for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Oct 2010 15:53:44 -0400 Original-Received: from [140.186.70.92] (port=54540 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1kn9-0003Ar-Tv for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 14:57:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P1kn8-00046e-M6 for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 14:57:11 -0400 Original-Received: from mail.nf.mpg.de ([134.107.209.50]:59463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P1kn8-00045r-Cd for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 14:57:10 -0400 Original-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 <0L9M006ABKSX0S00@mail.nf.mpg.de> for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 21:00:34 +0200 (MEST) In-reply-to: X-Mailer: Apple Mail (2.1081) X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75062 Archived-At: --Apple-Mail-24-562064448 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Dear Colin, we have implemented a preview service at our institute which converts = org-files for people who do not want to or can not run org-mode locally = (people can hand in org-files which will be converted to HTML as = personal web pages for institute members, = http://www.nf.mpg.de/cv-howto/cv-en.html). It runs on a Unix box and the = core - the part which is called from a web frontend and converts an = org-file (and associated files in our case) looks like this: #!/bin/sh /opt/emacs23.sol/bin/emacs -Q --batch --eval "(add-to-list 'load-path = \"/opt/org-7.01/lisp/\")" -load = "/var/opt/webstack/apache2/2.2/htdocs/org/emacs- setup.el" --visit=3D"$1" --eval "(set-buffer-file-coding-system 'utf-8)" = --funcall my-org-publish-current The main point is, like Erik pointed out, that we define the path to the = org-mode lisp files and in emacs-setup.el then define some functions for = publishing org-files in a project-oriented fashion - that part could be = simpler in your case. Warm regards,=20 Stefan On 01.10.2010, at 09:49, Colin Grey wrote: > Hello, >=20 > I'm trying to write a shell script that will automatically change a = bunch of my org-mode files into HTML files. But am running into some = problems. The structure, as best I understand it, should like something = like this: >=20 > emacs -batch -eval '(progn (find-file "test.org.txt") = (org-export-as-html "test.html"))' >=20 > However, when I run that, it gives the output: >=20 > Loading 00fink-vars... > Exporting... > Exporting... > Exporting... > Wrong type argument: stringp, nil >=20 >=20 > Oddly, I've noticed that if I don't use my custom extension (.org.txt) = but just use .org like so: >=20 > emacs -batch -eval '(progn (find-file "test.org") (org-export-as-html = "test.html"))' >=20 > It will run, but will always spit out a blank HTML file, no matter the = contents of test.org >=20 > Thank you in advance for any help, >=20 > Colin Grey >=20 > www.CGPGrey.com > www.ProductivePorcupine.com >=20 --=20 Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group 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 --Apple-Mail-24-562064448 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIOHTCCBCEw ggMJoAMCAQICAgDHMA0GCSqGSIb3DQEBBQUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNEZXV0 c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVyMSMwIQYDVQQD ExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0wNjEyMTkxMDI5MDBaFw0xOTA2MzAyMzU5 MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVyZWluMRAwDgYDVQQLEwdERk4tUEtJ MSQwIgYDVQQDExtERk4tVmVyZWluIFBDQSBHbG9iYWwgLSBHMDEwggEiMA0GCSqGSIb3DQEBAQUA A4IBDwAwggEKAoIBAQDpm8NnhfkNrvWNVMOWUDU9YuluTO2U1wBblSJ01CDrNI/W7MAxBAuZg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