emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aankhen <aankhen@gmail.com>
To: Chris Beard <wcbeard10@wabash.edu>, Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: latex export settings in init files
Date: Tue, 29 Mar 2011 01:29:46 +0530	[thread overview]
Message-ID: <AANLkTikeBOSB1Wz5qww93qL6JwhnYdmJQGHMigU0+Q0+@mail.gmail.com> (raw)
In-Reply-To: <AANLkTim24zT7cq39g9f3z0pcxi-P3xwyPhTAbh8H77V2@mail.gmail.com>

Hi Chris,

On Mon, Mar 28, 2011 at 17:25, Chris Beard <wcbeard10@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

      parent reply	other threads:[~2011-03-28 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 11:55 latex export settings in init files Chris Beard
2011-03-28 12:05 ` Eric S Fraga
2011-03-28 12:32   ` Chris Malone
2011-03-28 13:53   ` Sébastien Vauban
2011-03-28 15:09     ` Nick Dokos
2011-03-28 15:31     ` Eric S Fraga
2011-03-28 19:59 ` Aankhen [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.orgmode.org/

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

  git send-email \
    --in-reply-to=AANLkTikeBOSB1Wz5qww93qL6JwhnYdmJQGHMigU0+Q0+@mail.gmail.com \
    --to=aankhen@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wcbeard10@wabash.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).