From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: "No definition for class" error in export to latex Date: Sat, 11 Jun 2011 19:37:58 -0400 Message-ID: <8828.1307835478@alphaville.dokosmarshall.org> References: <3134F11C-4D50-42A7-B160-7C8C921D5798@ucsd.edu> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVYhI-0000Fb-60 for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 20:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVYhG-0002ib-U9 for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 20:38:36 -0400 Received: from vms173007pub.verizon.net ([206.46.173.7]:35446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVYhG-0002iN-OR for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 20:38:34 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LMN0006PGBAB660@vms173007.mailsrvcs.net> for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 18:37:59 -0500 (CDT) In-reply-to: Message from "Levy, Roger" of "Sat, 11 Jun 2011 13:11:14 PDT." <3134F11C-4D50-42A7-B160-7C8C921D5798@ucsd.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Levy, Roger" Cc: nicholas.dokos@hp.com, "emacs-orgmode@gnu.org" Levy, Roger wrote: > and no .tex file output. From within Aquamacs, I don't get this error, pre= > sumably because I have the following in my .emacs file: > > (add-to-list 'org-export-latex-classes > '("apa" > "\\documentclass{apa} > [NO-DEFAULT-PACKAGES] > \\usepackage{graphicx} > \\usepackage{apacite}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > )) > > How can I make this modification of org-export-latex-classes from the comma= > nd line? I have tried putting the above content in a file ("$HOME/tmp/add.= > el") and making the call > > /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ > --load $HOME/tmp/add.el \ > --visit=3Dtest-file.org \ > --funcall org-export-as-latex-batch > > but this gives me the error > > Symbol's value as variable is void: org-export-latex-classes > > I would be very grateful for any suggestions! This is GNU Emacs 23.3.1 (Aq= > uamacs 2.2) and Org mode 7.5. You should add to add.el some more initialization: you probably need to set the load-path and require the org-latex package - something like this, but you should more or less mimic the way you initialize org mode in your .emacs: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/lisp")) ;maybe (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (require 'org-install) ; maybe (require 'org-latex) ...apa stuff from above... --8<---------------cut here---------------end--------------->8--- Remember: -batch implies -q so your .emacs file is completely ignored: you have to do any initialization you need in the add.el file. > Incidentally, trying to export to HTML with > > /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ > --visit=3Dtest-file.org \ > --funcall org-export-as-html-batch > > complains differently:=20 > > OVERVIEW > Exporting... > File mode specification error: (file-error "Cannot open load file" "html-he= > lper-mode") > Exporting... > Exporting... > File mode specification error: (file-error "Cannot open load file" "html-he= > lper-mode") I don't know who tries to load html-helper-mode but that's not even present in my setup. > Saving file /tmp/test-file.html... > Wrote /tmp/test-file.html > HTML export done, pushed to kill ring and clipboard > > but it actually does produce a sensible html file. > Probably because the autoload for org-export-as-html-batch is in the default path of your emacs. Nick