[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Feature Request: Disable auto-insert-mode exporting
From: |
Darlan Cavalcante Moreira |
Subject: |
Re: [O] Feature Request: Disable auto-insert-mode exporting |
Date: |
Fri, 28 Oct 2011 01:49:52 -0300 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO) |
Thanks Nick,
You right, the master file question comes from auctex. But with your code
it's simple to add the relevant variable to solve the issue. The final
function is
--8<---------------cut here---------------start------------->8---
(defadvice org-export (around org-export-no-auto-insert)
(let ((auto-insert nil)
(TeX-master t)
)
ad-do-it))
(ad-activate 'org-export)
--8<---------------cut here---------------end--------------->8---
--
Darlan
At Thu, 27 Oct 2011 17:03:55 -0400,
Nick Dokos <address@hidden> wrote:
>
> Darlan Cavalcante Moreira <address@hidden> wrote:
>
> >
> > I consider auto-insert-mode to be a very useful feature in Emacs and it
> > works great in most situations, except when exporting an org-mode buffer.
> >
> > If I export to PDF or HTML, for instance, then org-mode creates a TeX or an
> > HTML buffer and auto-insert kicks-in in both cases (asking for the title in
> > the HTML buffer, or the master file in the TeX buffer). Whatever I write
> > will be overwritten by the org-mode exporter and the file exports just
> > fine, but this interruption is annoying.
> >
>
> I don't think the master file question comes from auto-insert - I believe
> it comes from auctex. In particular, I get the question but I don't have
> auto-insert enabled for latex.
>
> > I suppose I could create a function that disable auto-insert-mode, call
> > org-export and then re-enable auto-insert-mode, but maybe this should be
> > the default behaviour of org-mode export. Does this make sense?
> >
>
> You can advise org-export:
>
> (defadvice org-export (around org-export-no-auto-insert)
> (let ((auto-insert nil))
> ad-do-it))
>
> (ad-activate 'org-export)
>
> should do it (untested).
>
> Nick