unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs, Org Mode, and Exporting to The Command Line Troubles
@ 2010-10-01  7:49 Colin Grey
  2010-10-01 17:25 ` Erik Iverson
  2010-10-01 18:57 ` Stefan Vollmar
  0 siblings, 2 replies; 4+ messages in thread
From: Colin Grey @ 2010-10-01  7:49 UTC (permalink / raw)
  To: help-gnu-emacs

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

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

[-- Attachment #2: Type: text/html, Size: 1211 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs, Org Mode, and Exporting to The Command Line Troubles
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Erik Iverson @ 2010-10-01 17:25 UTC (permalink / raw)
  To: Colin Grey; +Cc: help-gnu-emacs

Colin,

If you don't receive an answer here, you might want to follow-up on
the emacs-orgmode mailing list.  You may have to load orgmode in your
progn before using its functions?

--Erik

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 <http://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 <http://test.org>
> 
> Thank you in advance for any help,
> 
> Colin Grey
> 
> www.CGPGrey.com <http://www.CGPGrey.com>
> www.ProductivePorcupine.com <http://www.ProductivePorcupine.com>
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs, Org Mode, and Exporting to The Command Line Troubles
  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 18:57 ` Stefan Vollmar
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Vollmar @ 2010-10-01 18:57 UTC (permalink / raw)
  To: Colin Grey; +Cc: help-gnu-emacs

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Emacs, Org Mode, and Exporting to The Command Line Troubles
  2010-10-01 17:25 ` Erik Iverson
@ 2010-10-01 19:01   ` Erik Iverson
  0 siblings, 0 replies; 4+ messages in thread
From: Erik Iverson @ 2010-10-01 19:01 UTC (permalink / raw)
  To: Colin Grey; +Cc: help-gnu-emacs

See this section of the org-mode manual for example:

http://orgmode.org/manual/Batch-execution.html#Batch-execution

Erik Iverson wrote:
> Colin,
> 
> If you don't receive an answer here, you might want to follow-up on
> the emacs-orgmode mailing list.  You may have to load orgmode in your
> progn before using its functions?
> 
> --Erik
> 
> 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 <http://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 <http://test.org>
>>
>> Thank you in advance for any help,
>>
>> Colin Grey
>>
>> www.CGPGrey.com <http://www.CGPGrey.com>
>> www.ProductivePorcupine.com <http://www.ProductivePorcupine.com>
>>
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-01 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).