unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Vollmar <vollmar@nf.mpg.de>
To: Colin Grey <cgpgrey@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs, Org Mode, and Exporting to The Command Line Troubles
Date: Fri, 01 Oct 2010 20:57:05 +0200	[thread overview]
Message-ID: <AC98C95C-69A2-4C10-88C4-DB53ED7DBE74@nf.mpg.de> (raw)
In-Reply-To: <AANLkTikaiiSwwAoPZMa3fE+yy43PNpZgOkfY7sG+stni@mail.gmail.com>

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

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="$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, 
 Stefan




On 01.10.2010, at 09:49, Colin Grey wrote:

> Hello,
> 
> 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:
> 
> emacs -batch -eval '(progn (find-file "test.org.txt") (org-export-as-html "test.html"))'
> 
> However, when I run that, it gives the output:
> 
> Loading 00fink-vars...
> Exporting...
> Exporting...
> Exporting...
> Wrong type argument: stringp, nil
> 
> 
> Oddly, I've noticed that if I don't use my custom extension (.org.txt) but just use .org like so:
> 
> emacs -batch -eval '(progn (find-file "test.org") (org-export-as-html "test.html"))'
> 
> It will run, but will always spit out a blank HTML file, no matter the contents of test.org
> 
> Thank you in advance for any help,
> 
> Colin Grey
> 
> www.CGPGrey.com
> www.ProductivePorcupine.com
> 

-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
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







[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4409 bytes --]

      parent reply	other threads:[~2010-10-01 18:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01  7:49 Emacs, Org Mode, and Exporting to The Command Line Troubles Colin Grey
2010-10-01 17:25 ` Erik Iverson
2010-10-01 19:01   ` Erik Iverson
2010-10-01 18:57 ` Stefan Vollmar [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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=AC98C95C-69A2-4C10-88C4-DB53ED7DBE74@nf.mpg.de \
    --to=vollmar@nf.mpg.de \
    --cc=cgpgrey@gmail.com \
    --cc=help-gnu-emacs@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.
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).