emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTeX chunk makes .org file not in Org mode


From: Alain . Cochard
Subject: Re: [O] LaTeX chunk makes .org file not in Org mode
Date: Fri, 16 Nov 2018 13:28:36 +0100

Eric S Fraga writes on Fri 16 Nov 2018 09:27:
 > On Wednesday, 14 Nov 2018 at 12:54, address@hidden wrote:
 > > Hello.  I guess this is normal, but I wanted to report it in case
 > > there is room for improvement:
 > >
 > > After inserting a latex file into an .org file, I ended up with the
 > > following part in the org file (which was an agenda file):
 > >
 > >   %%% Local Variables: 
 > >   %%% mode: latex
 > >   %%% TeX-master: t
 > >   %%% End: 
 > 
 > [...]
 > 
 > > It the issue could somehow be made apparent to the user right away
 > > (that is, when the chunk is inserted), it would be easier/faster to
 > > fix.
 > 
 > There's really nothing to fix.  You've inserted some local variable
 > settings that take effect next time you visit the file.  You've decided
 > (not on purpose, I realize) that you want this file to be opened in
 > LaTeX mode and Emacs does what you said.  I cannot imagine a fix that
 > could catch this as it would require org to essentially parse the new
 > contents as if it were all of Emacs and then somehow figure out what had
 > been set that shouldn't have been set.

Hi Eric, and thanks a lot for the feedback.

By 'fix', I of course meant 'fix my own mistake'...

I forgive myself here, though, because I have been using LaTeX for
many years without having to pay any attention to this kind of chunks,
which are (for me) inserted automatically.

But it is certainly not obvious to me why the content of this chunk
takes precedence over the file extension -- after all, the manual
says: "Files with the ‘.org’ extension use Org mode by default."

I can certainly understand if the content cannot be examined after
each insertion, but, as there are many things in Org which are done on
the fly, I felt compelled to ask.

(One could also imagine that Org would detect upon loading the file
that there is a conflict between the modes -- but I also understand
if this is not something reasonable to ask.)

Regards,
a.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | address@hidden
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]