Hi Chris, On Mon, Mar 28, 2011 at 17:25, Chris Beard <wcbear...@wabash.edu> wrote: > Hello, > I've tried to modify some default latex export settings based on info from > here > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg07645.html > > I basically add to the org-mode-hook to do: > > [snip] > > This works if I evaluate it after I've been exporting to latex, but I > get an error whenever I start up emacs: > > setq: Symbol's value as variable is void: org-export-latex-classes > > I'm guessing there's some org-mode latex-export thing that I need to > load first, but I'm not very familiar with how to do this. Any advice?
An alternative to flat out ‘require’-ing everything is ‘eval-after-load’. For example: ,---- | (eval-after-load 'org-export-latex | '(progn | (add-to-list org-export-latex-classes '("myarticle" . "...")) | | (setq org-export-latex-date-format "%Y %B %d" | org-export-latex-custom-lang-environments '((python "listings"))))) `---- I use this approach & autoloads almost universally in my init file, following some advice I read.[1] It’s a trade-off between failing early if you have errors and speeding up Emacs’s initialization. It can also be less than straightforward to understand… Aankhen [1]: http://a-nickels-worth.blogspot.com/2007/11/effective-emacs.html