emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Ista Zahn <istazahn@gmail.com>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>,
	Sebastian Boehm <sebastian@sometimesfood.org>
Subject: Re: [PATCH] ox-latex: Add scrartcl LaTeX class
Date: Thu, 24 Sep 2015 11:04:28 +0100	[thread overview]
Message-ID: <87k2rg9lqr.fsf@delle7240.chemeng.ucl.ac.uk> (raw)
In-Reply-To: CA+vqiLGQuZ3Ym_kHcTap0jEMq9QF7ptk6J+U8UV6EM135L=krA@mail.gmail.com

On Wednesday, 23 Sep 2015 at 14:27, Ista Zahn wrote:
> On Wed, Sep 23, 2015 at 2:16 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

[...]

>> One solution, but not an ideal one, is to use file local variables to
>> define org-latex-classes (and any other variables) as appropriate for
>> the document.  It's not ideal because unfortunately most of org's
>> variables (as well as many of emacs's own) are "global" and hence affect
>> the functionality of org visiting other buffers.  I find myself having
>> separate emacs instances for some org files for this reason.
>
> Doesn't "setq-local" solve this problem?

Seems to!  Thanks.  I have done the following:
#+begin_src org
  ,#+title: Testing setq-loccal
  ,#+latex_class: esftest
  ,* settings                                                                      :noexport:
  ,#+name: startup
  ,#+begin_src emacs-lisp :results none
    (setq-local org-latex-classes '(("esftest" "\\documentclass{scrartcl}" ("\\section*{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
  ,#+end_src

  # Local Variables:
  # eval: (esf/execute-startup-block)
  # End:
#+end_src
where esf/execute-startup-block executes the src block named "startup".

The issue is complicated by the fact that exporters generate a new
buffer which has its own variables (hence the use of #+bind:) so some
variables should be set using bind but others potentially using
setq-local.

Thanks again,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-203-g4ca3d3

  reply	other threads:[~2015-09-24 10:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 10:25 [PATCH] ox-latex: Add scrartcl LaTeX class Sebastian Boehm
2015-09-21 19:46 ` Nicolas Goaziou
2015-09-21 21:45   ` Rasmus
2015-09-21 22:37     ` Suvayu Ali
2015-09-22  7:20   ` Eric S Fraga
2015-09-22 11:21     ` Rasmus
2015-09-22 15:33       ` Eric S Fraga
2015-09-22 16:34         ` Rasmus
2015-09-22 14:00     ` Grant Rettke
2015-09-23 16:59   ` Sebastian Boehm
2015-09-23 17:56     ` Thomas S. Dye
2015-09-23 18:16     ` Eric S Fraga
2015-09-23 18:27       ` Ista Zahn
2015-09-24 10:04         ` Eric S Fraga [this message]
2015-09-27 13:47           ` Sebastian Boehm
2015-09-23 18:28       ` Thomas S. Dye
2015-09-23 20:27     ` Rasmus
2015-09-23 20:56       ` Nicolas Goaziou
2015-09-23 21:27         ` Rasmus

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=87k2rg9lqr.fsf@delle7240.chemeng.ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=istazahn@gmail.com \
    --cc=sebastian@sometimesfood.org \
    /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).