emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Martin Steffen <msteffen@ifi.uio.no>
Cc: emacs-orgmode@gnu.org
Subject: Re: unfortunate "feature interaction" of org-export and emacs-latex-auctex mode
Date: Mon, 09 Nov 2015 21:11:33 +0100	[thread overview]
Message-ID: <87egfz7x1m.fsf@mbork.pl> (raw)
In-Reply-To: <loom.20151109T194737-981@post.gmane.org>


On 2015-11-09, at 19:54, Martin Steffen <msteffen@ifi.uio.no> wrote:

> Hi,
>
> Perhaps it's not really a "fault" of org (nor of auctex), but both
> things interact unfortunate. 
>
> The reason is: when I export org to LaTeX, and I visit the latex file
> afterwards, I want that auctex/emacs is instructed about some facts. Thus I
> like to have some lines such as
>
> %%% Local Variables: 
> %%% mode: latex
> %%% TeX-master: t
> %%% End: 
>
> at the end of the latex file. Org allows that, in that I add the
> "LATEX-only" export at the end of the org-file
>
> #+BEGIN_LATEX
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%% Local Variables: 
> %%% mode: latex
> %%% TeX-master: t
> %%% End: 
> #+END_LATEX
>
>
> Doing that produces the desired lines at the end of the generated latex, and
> if I visit the latex file, emacs/auctex is instructed according to my wishes.
>
>
> Now the problem: If I refresh the /org/ file, emacs/org thinks that actually
> the file is a latex file (due to the line "mode: latex") and switches from
> org-mode to latex-mode.
>
>
> It's a minor thing, obviously, but I just wonder if there's an easy workaround.

Note: this is a terrible hack, so use it your own risk, only if there's
no sane alternative etc.

--8<---------------cut here---------------start------------->8---
#+BEGIN_COMMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables: 
%%% mode: org
%%% End: 
#+END_COMMENT
#+BEGIN_LATEX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
#+END_LATEX
--8<---------------cut here---------------end--------------->8---

> Martin

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

  reply	other threads:[~2015-11-09 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 18:54 unfortunate "feature interaction" of org-export and emacs-latex-auctex mode Martin Steffen
2015-11-09 20:11 ` Marcin Borkowski [this message]
2015-11-09 20:49   ` Nick Dokos
2015-11-09 21:08     ` Marcin Borkowski
2015-11-10  6:51   ` Martin Steffen
2015-11-09 20:38 ` 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=87egfz7x1m.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=emacs-orgmode@gnu.org \
    --cc=msteffen@ifi.uio.no \
    /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).