From: Alain.Cochard@unistra.fr
To: Eric S Fraga <esflists@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: LaTeX chunk makes .org file not in Org mode
Date: Fri, 16 Nov 2018 13:28:36 +0100 [thread overview]
Message-ID: <23534.47092.122698.159146@frac.u-strasbg.fr> (raw)
In-Reply-To: <877ehdxs1h.fsf@ucl.ac.uk>
Eric S Fraga writes on Fri 16 Nov 2018 09:27:
> On Wednesday, 14 Nov 2018 at 12:54, Alain.Cochard@unistra.fr 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) | alain.cochard@unistra.fr
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
next prev parent reply other threads:[~2018-11-16 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 11:54 LaTeX chunk makes .org file not in Org mode Alain.Cochard
2018-11-16 9:27 ` Eric S Fraga
2018-11-16 12:28 ` Alain.Cochard [this message]
2018-11-16 16:32 ` Eric S Fraga
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=23534.47092.122698.159146@frac.u-strasbg.fr \
--to=alain.cochard@unistra.fr \
--cc=emacs-orgmode@gnu.org \
--cc=esflists@gmail.com \
/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).