From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: latex export settings in init files Date: Tue, 29 Mar 2011 01:29:46 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=40132 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4Ibt-0004Q1-RC for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 16:00:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4Ibf-0003Aq-Po for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 16:00:09 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:42150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4Ibf-0003Ad-NP for emacs-orgmode@gnu.org; Mon, 28 Mar 2011 16:00:07 -0400 Received: by vxk20 with SMTP id 20so2792735vxk.0 for ; Mon, 28 Mar 2011 13:00:06 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Chris Beard , Org-mode ml Hi Chris, On Mon, Mar 28, 2011 at 17:25, Chris Beard wrote: > Hello, > I've tried to modify some default latex export settings based on info fro= m 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 =E2=80=98require=E2=80=99-ing everything is =E2=80=98eval-after-load=E2=80=99. 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=E2=80=99s a trade-off between failing early if you have errors and speeding up Emacs=E2=80=99s initialization. I= t can also be less than straightforward to understand=E2=80=A6 Aankhen [1]: http://a-nickels-worth.blogspot.com/2007/11/effective-emacs.html