emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with LaTeX snippets preview
@ 2009-09-25  0:15 Paul Burkander
  2009-09-25  0:48 ` Fwd: " Paul Burkander
  2009-09-25 14:06 ` Darlan Cavalcante Moreira
  0 siblings, 2 replies; 20+ messages in thread
From: Paul Burkander @ 2009-09-25  0:15 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 850 bytes --]

Hi all,

I'm having trouble viewing LaTeX snippets in org-mode.  I have dvipng
installed.

I entered the following test code:
\begin{equation}
\sqrt{5}+\frac{2}{3}
\end{equation}

and tried C-c C-x C-l

but then I only see an empty box where the png should be.  The messages
buffer reads:

Creating image...1
Loading latexenc...done
Failed to create dvi file from /tmp/orgtex608161G.tex
Creating image...done.  Use `C-c C-c' to remove images.
Cannot find image file `/home/paul/org/ltxpng/classes_0001.png' [53 times]
Temporary highlights/overlays removed from current buffer

There is no /tmp/orgtex608161G.tex that I can find.

Oddly, I had a file called "org" on my desktop, and it was putting png file
in there.  I got rid of that folder, thinking it was somehow confusing
things, and now I can't find any newly created png file.

help?  anyone?

[-- Attachment #1.2: Type: text/html, Size: 960 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Fwd: Problem with LaTeX snippets preview
  2009-09-25  0:15 Problem with LaTeX snippets preview Paul Burkander
@ 2009-09-25  0:48 ` Paul Burkander
  2009-09-25 14:06 ` Darlan Cavalcante Moreira
  1 sibling, 0 replies; 20+ messages in thread
From: Paul Burkander @ 2009-09-25  0:48 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1204 bytes --]

It seems that the file in on my Desktop was from an archived org folder,
from when the preview LaTeX snippets actually worked for me on a different
computer.

---------- Forwarded message ----------
From: Paul Burkander <paulburkander@gmail.com>
Date: Thu, Sep 24, 2009 at 8:15 PM
Subject: Problem with LaTeX snippets preview
To: emacs-orgmode@gnu.org


Hi all,

I'm having trouble viewing LaTeX snippets in org-mode.  I have dvipng
installed.

I entered the following test code:
\begin{equation}
\sqrt{5}+\frac{2}{3}
\end{equation}

and tried C-c C-x C-l

but then I only see an empty box where the png should be.  The messages
buffer reads:

Creating image...1
Loading latexenc...done
Failed to create dvi file from /tmp/orgtex608161G.tex
Creating image...done.  Use `C-c C-c' to remove images.
Cannot find image file `/home/paul/org/ltxpng/classes_0001.png' [53 times]
Temporary highlights/overlays removed from current buffer

There is no /tmp/orgtex608161G.tex that I can find.

Oddly, I had a file called "org" on my desktop, and it was putting png file
in there.  I got rid of that folder, thinking it was somehow confusing
things, and now I can't find any newly created png file.

help?  anyone?

[-- Attachment #1.2: Type: text/html, Size: 1537 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25  0:15 Problem with LaTeX snippets preview Paul Burkander
  2009-09-25  0:48 ` Fwd: " Paul Burkander
@ 2009-09-25 14:06 ` Darlan Cavalcante Moreira
  2009-09-25 14:15   ` Carsten Dominik
  1 sibling, 1 reply; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-09-25 14:06 UTC (permalink / raw)
  To: Paul Burkander; +Cc: emacs-orgmode

Is there a variable where one can customize the options passed to dvipng?
I use a high resolution and the generated image is small in the Emacs buffer and hard to read.
-- 
Darlan Cavalcante Moreira
darcamo@gmail.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 14:06 ` Darlan Cavalcante Moreira
@ 2009-09-25 14:15   ` Carsten Dominik
  2009-09-25 14:30     ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 20+ messages in thread
From: Carsten Dominik @ 2009-09-25 14:15 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode, Paul Burkander


On Sep 25, 2009, at 3:06 PM, Darlan Cavalcante Moreira wrote:

> Is there a variable where one can customize the options passed to  
> dvipng?
> I use a high resolution and the generated image is small in the  
> Emacs buffer and hard to read.

Yes there is.  Take a look at org-format-latex-options and change  
the :scale and :html-scale options

- Carsten

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 14:15   ` Carsten Dominik
@ 2009-09-25 14:30     ` Darlan Cavalcante Moreira
  2009-09-25 15:52       ` Nick Dokos
  0 siblings, 1 reply; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-09-25 14:30 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Paul Burkander

How could I miss that?

I used the command customize-variable and I was trying to auto-complete with TAB
something similar to "org-preview" or "org--preview".  Now I see that the
options are in the group Org Latex.

May I suggest that these two variables are mentioned in the documentation of the
org-preview-latex-fragment function?

Thanks Carsten!

-- 
Darlan Cavalcante Moreira
darcamo@gmail.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 14:30     ` Darlan Cavalcante Moreira
@ 2009-09-25 15:52       ` Nick Dokos
  2009-09-25 15:58         ` Paul Burkander
  2009-09-26  7:30         ` Carsten Dominik
  0 siblings, 2 replies; 20+ messages in thread
From: Nick Dokos @ 2009-09-25 15:52 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode, Paul Burkander, Carsten Dominik

Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:

> How could I miss that?
> 
> I used the command customize-variable and I was trying to auto-complete with TAB
> something similar to "org-preview" or "org--preview".  Now I see that the
> options are in the group Org Latex.
> 
> May I suggest that these two variables are mentioned in the documentation of the
> org-preview-latex-fragment function?
> 

This is the second time in the last couple of weeks that somebody looked
for this and did not find it. Nicolas Goaziou had a very similar
reaction (see http://article.gmane.org/gmane.emacs.orgmode/17544 for
more). So it seems that the option is indeed well hidden :-) I'd second
the motion to add a mention of org-format-latex-options in the function
doc and perhaps add a more extended mention in section 11.4 of the
manual ("Processing LaTeX fragments") as well. Here is some suggested
text:

,----
| ...
| `C-c C-c'
|      Remove the overlay preview images.
| 
|    You can customize the variable `org-format-latex-options' to
| influence some aspects of the preview. In particular, the :scale (and
| for HTML export, :html-scale) property can be used to adjust the
| size of the preview images.
| 
|    During HTML export (*note HTML export::), all LaTeX fragments are
| ...
`----

Thanks,
Nick

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 15:52       ` Nick Dokos
@ 2009-09-25 15:58         ` Paul Burkander
  2009-09-25 16:46           ` Nick Dokos
  2009-09-26  2:28           ` Darlan Cavalcante Moreira
  2009-09-26  7:30         ` Carsten Dominik
  1 sibling, 2 replies; 20+ messages in thread
From: Paul Burkander @ 2009-09-25 15:58 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Paul Burkander, Carsten Dominik

It doesn't seem nice that my thread was hijacked.

Anyway, I solved my original problem, which as you might recall was
that I got an empty box when I tried to preview.

I installed texlive-latex-extras.  It has since worked.  If that
package is needed, it would be helpful to have it noted in the
documentation.

On Fri, Sep 25, 2009 at 11:52 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:
>
>> How could I miss that?
>>
>> I used the command customize-variable and I was trying to auto-complete with TAB
>> something similar to "org-preview" or "org--preview".  Now I see that the
>> options are in the group Org Latex.
>>
>> May I suggest that these two variables are mentioned in the documentation of the
>> org-preview-latex-fragment function?
>>
>
> This is the second time in the last couple of weeks that somebody looked
> for this and did not find it. Nicolas Goaziou had a very similar
> reaction (see http://article.gmane.org/gmane.emacs.orgmode/17544 for
> more). So it seems that the option is indeed well hidden :-) I'd second
> the motion to add a mention of org-format-latex-options in the function
> doc and perhaps add a more extended mention in section 11.4 of the
> manual ("Processing LaTeX fragments") as well. Here is some suggested
> text:
>
> ,----
> | ...
> | `C-c C-c'
> |      Remove the overlay preview images.
> |
> |    You can customize the variable `org-format-latex-options' to
> | influence some aspects of the preview. In particular, the :scale (and
> | for HTML export, :html-scale) property can be used to adjust the
> | size of the preview images.
> |
> |    During HTML export (*note HTML export::), all LaTeX fragments are
> | ...
> `----
>
> Thanks,
> Nick
>
>
>
>
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 15:58         ` Paul Burkander
@ 2009-09-25 16:46           ` Nick Dokos
  2009-09-25 17:20             ` Nick Dokos
  2009-09-26  2:28           ` Darlan Cavalcante Moreira
  1 sibling, 1 reply; 20+ messages in thread
From: Nick Dokos @ 2009-09-25 16:46 UTC (permalink / raw)
  To: Paul Burkander; +Cc: emacs-orgmode, Paul Burkander, Carsten Dominik

Paul Burkander <paul@burkander.com> wrote:

> It doesn't seem nice that my thread was hijacked.

Sorry - that's indeed annoying when you are left to fend for yourself,
while we all go in a different direction.

> 
> Anyway, I solved my original problem, which as you might recall was
> that I got an empty box when I tried to preview.
> 
> I installed texlive-latex-extras.  It has since worked.  If that
> package is needed, it would be helpful to have it noted in the
> documentation.
> 

Do you know what in texlive-latex-extra fixes the problem? It might
merit a mention in the org docs, but not everybody uses Debian/Ubuntu, so
a more specific reference might be more useful.

Thanks,
Nick

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 16:46           ` Nick Dokos
@ 2009-09-25 17:20             ` Nick Dokos
  2009-09-26  6:39               ` Carsten Dominik
  2009-09-26  7:36               ` Carsten Dominik
  0 siblings, 2 replies; 20+ messages in thread
From: Nick Dokos @ 2009-09-25 17:20 UTC (permalink / raw)
  To: nicholas.dokos
  Cc: Paul Burkander, emacs-orgmode, Paul Burkander, Carsten Dominik

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Paul Burkander <paul@burkander.com> wrote:
> 
> > ... 
> > Anyway, I solved my original problem, which as you might recall was
> > that I got an empty box when I tried to preview.
> > 
> > I installed texlive-latex-extras.  It has since worked.  If that
> > package is needed, it would be helpful to have it noted in the
> > documentation.
> > 
> 
> Do you know what in texlive-latex-extra fixes the problem? It might
> merit a mention in the org docs, but not everybody uses Debian/Ubuntu, so
> a more specific reference might be more useful.
> 

Looks like the culprit is fullpage.sty - seems to be required by the LaTeX
code that org-preview-latex-fragment generates.

Nick

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 15:58         ` Paul Burkander
  2009-09-25 16:46           ` Nick Dokos
@ 2009-09-26  2:28           ` Darlan Cavalcante Moreira
  1 sibling, 0 replies; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-09-26  2:28 UTC (permalink / raw)
  To: Paul Burkander; +Cc: emacs-orgmode, Paul Burkander, Carsten Dominik

At Fri, 25 Sep 2009 11:58:01 -0400,
Paul Burkander wrote:
> 
> It doesn't seem nice that my thread was hijacked.
> 
> Anyway, I solved my original problem, which as you might recall was
> that I got an empty box when I tried to preview.
> 
> I installed texlive-latex-extras.  It has since worked.  If that
> package is needed, it would be helpful to have it noted in the
> documentation.
> 
> On Fri, Sep 25, 2009 at 11:52 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:
> >
> >> How could I miss that?
> >>
> >> I used the command customize-variable and I was trying to auto-complete with TAB
> >> something similar to "org-preview" or "org--preview".  Now I see that the
> >> options are in the group Org Latex.
> >>
> >> May I suggest that these two variables are mentioned in the documentation of the
> >> org-preview-latex-fragment function?
> >>
> >
> > This is the second time in the last couple of weeks that somebody looked
> > for this and did not find it. Nicolas Goaziou had a very similar
> > reaction (see http://article.gmane.org/gmane.emacs.orgmode/17544 for
> > more). So it seems that the option is indeed well hidden :-) I'd second
> > the motion to add a mention of org-format-latex-options in the function
> > doc and perhaps add a more extended mention in section 11.4 of the
> > manual ("Processing LaTeX fragments") as well. Here is some suggested
> > text:
> >
> > ,----
> > | ...
> > | `C-c C-c'
> > |      Remove the overlay preview images.
> > |
> > |    You can customize the variable `org-format-latex-options' to
> > | influence some aspects of the preview. In particular, the :scale (and
> > | for HTML export, :html-scale) property can be used to adjust the
> > | size of the preview images.
> > |
> > |    During HTML export (*note HTML export::), all LaTeX fragments are
> > | ...
> > `----
> >
> > Thanks,
> > Nick
> >
> >
> >
> >
> >
> >

I guess I'm the one to blame. Sorry about that Paul. Since it was something
related to dvipng I simply "ansered the E-Mail" with my question instead of
creating another thread.
-- 
Darlan Cavalcante Moreira
darcamo@gmail.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 17:20             ` Nick Dokos
@ 2009-09-26  6:39               ` Carsten Dominik
  2009-09-26  7:36               ` Carsten Dominik
  1 sibling, 0 replies; 20+ messages in thread
From: Carsten Dominik @ 2009-09-26  6:39 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Paul Burkander, emacs-orgmode, Paul Burkander


On Sep 25, 2009, at 6:20 PM, Nick Dokos wrote:

> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> Paul Burkander <paul@burkander.com> wrote:
>>
>>> ...
>>> Anyway, I solved my original problem, which as you might recall was
>>> that I got an empty box when I tried to preview.
>>>
>>> I installed texlive-latex-extras.  It has since worked.  If that
>>> package is needed, it would be helpful to have it noted in the
>>> documentation.
>>>
>>
>> Do you know what in texlive-latex-extra fixes the problem? It might
>> merit a mention in the org docs, but not everybody uses Debian/ 
>> Ubuntu, so
>> a more specific reference might be more useful.
>>
>
> Looks like the culprit is fullpage.sty - seems to be required by the  
> LaTeX
> code that org-preview-latex-fragment generates.

Hmm, may be we can remove fullpage.sty - nit sure if it
really needed, I just copied this part from some other package....

- Carsten

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 15:52       ` Nick Dokos
  2009-09-25 15:58         ` Paul Burkander
@ 2009-09-26  7:30         ` Carsten Dominik
  1 sibling, 0 replies; 20+ messages in thread
From: Carsten Dominik @ 2009-09-26  7:30 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Paul Burkander


On Sep 25, 2009, at 4:52 PM, Nick Dokos wrote:

> Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:
>
>> How could I miss that?
>>
>> I used the command customize-variable and I was trying to auto- 
>> complete with TAB
>> something similar to "org-preview" or "org--preview".  Now I see  
>> that the
>> options are in the group Org Latex.
>>
>> May I suggest that these two variables are mentioned in the  
>> documentation of the
>> org-preview-latex-fragment function?
>>
>
> This is the second time in the last couple of weeks that somebody  
> looked
> for this and did not find it. Nicolas Goaziou had a very similar
> reaction (see http://article.gmane.org/gmane.emacs.orgmode/17544 for
> more). So it seems that the option is indeed well hidden :-) I'd  
> second
> the motion to add a mention of org-format-latex-options in the  
> function
> doc and perhaps add a more extended mention in section 11.4 of the
> manual ("Processing LaTeX fragments") as well. Here is some suggested
> text:
>
> ,----
> | ...
> | `C-c C-c'
> |      Remove the overlay preview images.
> |
> |    You can customize the variable `org-format-latex-options' to
> | influence some aspects of the preview. In particular, the :scale  
> (and
> | for HTML export, :html-scale) property can be used to adjust the
> | size of the preview images.
> |
> |    During HTML export (*note HTML export::), all LaTeX fragments are
> | ...
> `----
>
> Thanks,
> Nick


OK, I did that.

- Carsten

>
>
>
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Problem with LaTeX snippets preview
  2009-09-25 17:20             ` Nick Dokos
  2009-09-26  6:39               ` Carsten Dominik
@ 2009-09-26  7:36               ` Carsten Dominik
  1 sibling, 0 replies; 20+ messages in thread
From: Carsten Dominik @ 2009-09-26  7:36 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Paul Burkander, org-mode Mode


On Sep 25, 2009, at 6:20 PM, Nick Dokos wrote:

> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> Paul Burkander <paul@burkander.com> wrote:
>>
>>> ...
>>> Anyway, I solved my original problem, which as you might recall was
>>> that I got an empty box when I tried to preview.
>>>
>>> I installed texlive-latex-extras.  It has since worked.  If that
>>> package is needed, it would be helpful to have it noted in the
>>> documentation.
>>>
>>
>> Do you know what in texlive-latex-extra fixes the problem? It might
>> merit a mention in the org docs, but not everybody uses Debian/ 
>> Ubuntu, so
>> a more specific reference might be more useful.
>>
>
> Looks like the culprit is fullpage.sty - seems to be required by the  
> LaTeX
> code that org-preview-latex-fragment generates.

I believe the reason that this is used it to make sure that wide  
formulas can
still be formatted reasonably well, without additional line breaks.
I guess we could inline the content of this small package.

Would somebody like to try to replace this with just the margin
setting commands of fullpage.sty?

- Carsten

>
> Nick
>
>
>
>
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Feature Request: Disable auto-insert-mode exporting
@ 2011-10-27 19:31 Darlan Cavalcante Moreira
  2011-10-27 21:03 ` Nick Dokos
  0 siblings, 1 reply; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-10-27 19:31 UTC (permalink / raw)
  To: Orgmode Mailing List


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 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?

--
Darlan

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-27 19:31 Feature Request: Disable auto-insert-mode exporting Darlan Cavalcante Moreira
@ 2011-10-27 21:03 ` Nick Dokos
  2011-10-28  4:49   ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 20+ messages in thread
From: Nick Dokos @ 2011-10-27 21:03 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: nicholas.dokos, Orgmode Mailing List

Darlan Cavalcante Moreira <darcamo@gmail.com> 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-27 21:03 ` Nick Dokos
@ 2011-10-28  4:49   ` Darlan Cavalcante Moreira
  2011-10-28  8:43     ` Carsten Dominik
  0 siblings, 1 reply; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-10-28  4:49 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Orgmode Mailing List


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 <nicholas.dokos@hp.com> wrote:
> 
> Darlan Cavalcante Moreira <darcamo@gmail.com> 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-28  4:49   ` Darlan Cavalcante Moreira
@ 2011-10-28  8:43     ` Carsten Dominik
  2011-10-28 16:29       ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 20+ messages in thread
From: Carsten Dominik @ 2011-10-28  8:43 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: nicholas.dokos, Orgmode Mailing List


On 28.10.2011, at 06:49, Darlan Cavalcante Moreira wrote:

> 
> 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))


Ahh, that has been bothering me for many years, thanks for this solution.
I have made this behavior (as well as turning off auto-insert) now
standard in Org-mode, so the advice will no longer be needed.

Or, can anyone come up with a reason why the AUCTeX query or auto-insert
stuff could be useful when creating new files during Org-mode export?

- Carsten


> 
> (ad-activate 'org-export)
> --8<---------------cut here---------------end--------------->8---
> 
> --
> Darlan
> 
> At Thu, 27 Oct 2011 17:03:55 -0400,
> Nick Dokos <nicholas.dokos@hp.com> wrote:
>> 
>> Darlan Cavalcante Moreira <darcamo@gmail.com> 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
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-28  8:43     ` Carsten Dominik
@ 2011-10-28 16:29       ` Darlan Cavalcante Moreira
  2011-10-28 16:45         ` Nick Dokos
  0 siblings, 1 reply; 20+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-10-28 16:29 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: nicholas.dokos, Orgmode Mailing List


Thanks Carsten,
That's great.

I tested without the advice it worked as expected for both exporters.

I would be surprised if anyone could give a reason to keep the AUCTeX query
or the auto-insert stuff, at least without modifying org-export. That's
because the export process replaces anything in the new buffer, be it the
file variables inserted by AUCTeX or the content inserted by auto-insert,
with the result from the export.

--
Darlan

At Fri, 28 Oct 2011 10:43:00 +0200,
Carsten Dominik <carsten.dominik@gmail.com> wrote:
> 
> 
> On 28.10.2011, at 06:49, Darlan Cavalcante Moreira wrote:
> 
> > 
> > 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))
> 
> 
> Ahh, that has been bothering me for many years, thanks for this solution.
> I have made this behavior (as well as turning off auto-insert) now
> standard in Org-mode, so the advice will no longer be needed.
> 
> Or, can anyone come up with a reason why the AUCTeX query or auto-insert
> stuff could be useful when creating new files during Org-mode export?
> 
> - Carsten
> 
> 
> > 
> > (ad-activate 'org-export)
> > --8<---------------cut here---------------end--------------->8---
> > 
> > --
> > Darlan
> > 
> > At Thu, 27 Oct 2011 17:03:55 -0400,
> > Nick Dokos <nicholas.dokos@hp.com> wrote:
> >> 
> >> Darlan Cavalcante Moreira <darcamo@gmail.com> 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
> > 
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-28 16:29       ` Darlan Cavalcante Moreira
@ 2011-10-28 16:45         ` Nick Dokos
  2011-10-28 16:51           ` Carsten Dominik
  0 siblings, 1 reply; 20+ messages in thread
From: Nick Dokos @ 2011-10-28 16:45 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira
  Cc: nicholas.dokos, Orgmode Mailing List, Carsten Dominik

Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:

> 
> Thanks Carsten,
> That's great.
> 
> I tested without the advice it worked as expected for both exporters.
> 
> I would be surprised if anyone could give a reason to keep the AUCTeX query
> or the auto-insert stuff, at least without modifying org-export. That's
> because the export process replaces anything in the new buffer, be it the
> file variables inserted by AUCTeX or the content inserted by auto-insert,
> with the result from the export.
> 

I presume there are no problems if somebody is *not* using auctex and/or
auto-insert: correct? If org-export does essentially the same thing that
the advice below does, it should not cause any problems, but...

OTOH, if it breaks innocent users, then it should not be implemented: that
would be the only reason I can think of.

Nick

> --
> Darlan
> 
> At Fri, 28 Oct 2011 10:43:00 +0200,
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
> > 
> > 
> > On 28.10.2011, at 06:49, Darlan Cavalcante Moreira wrote:
> > 
> > > 
> > > 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))
> > 
> > 
> > Ahh, that has been bothering me for many years, thanks for this solution.
> > I have made this behavior (as well as turning off auto-insert) now
> > standard in Org-mode, so the advice will no longer be needed.
> > 
> > Or, can anyone come up with a reason why the AUCTeX query or auto-insert
> > stuff could be useful when creating new files during Org-mode export?
> > 
> > - Carsten
> > 
> > 
> > > 
> > > (ad-activate 'org-export)
> > > --8<---------------cut here---------------end--------------->8---
> > > 
> > > --
> > > Darlan
> > > 
> > > At Thu, 27 Oct 2011 17:03:55 -0400,
> > > Nick Dokos <nicholas.dokos@hp.com> wrote:
> > >> 
> > >> Darlan Cavalcante Moreira <darcamo@gmail.com> 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
> > > 
> > 
> 
tex

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Feature Request: Disable auto-insert-mode exporting
  2011-10-28 16:45         ` Nick Dokos
@ 2011-10-28 16:51           ` Carsten Dominik
  0 siblings, 0 replies; 20+ messages in thread
From: Carsten Dominik @ 2011-10-28 16:51 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Orgmode Mailing List


On 28.10.2011, at 18:45, Nick Dokos wrote:

> Darlan Cavalcante Moreira <darcamo@gmail.com> wrote:
> 
>> 
>> Thanks Carsten,
>> That's great.
>> 
>> I tested without the advice it worked as expected for both exporters.
>> 
>> I would be surprised if anyone could give a reason to keep the AUCTeX query
>> or the auto-insert stuff, at least without modifying org-export. That's
>> because the export process replaces anything in the new buffer, be it the
>> file variables inserted by AUCTeX or the content inserted by auto-insert,
>> with the result from the export.
>> 
> 
> I presume there are no problems if somebody is *not* using auctex and/or
> auto-insert: correct? If org-export does essentially the same thing that
> the advice below does, it should not cause any problems, but...

It works exactly the same, just temporarily turning off these features for
the creation of new export buffers.

> 
> OTOH, if it breaks innocent users, then it should not be implemented: that
> would be the only reason I can think of.

I don't expect any problems, but we will see.

- Carsten

> 
> Nick
> 
>> --
>> Darlan
>> 
>> At Fri, 28 Oct 2011 10:43:00 +0200,
>> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>> 
>>> 
>>> On 28.10.2011, at 06:49, Darlan Cavalcante Moreira wrote:
>>> 
>>>> 
>>>> 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))
>>> 
>>> 
>>> Ahh, that has been bothering me for many years, thanks for this solution.
>>> I have made this behavior (as well as turning off auto-insert) now
>>> standard in Org-mode, so the advice will no longer be needed.
>>> 
>>> Or, can anyone come up with a reason why the AUCTeX query or auto-insert
>>> stuff could be useful when creating new files during Org-mode export?
>>> 
>>> - Carsten
>>> 
>>> 
>>>> 
>>>> (ad-activate 'org-export)
>>>> --8<---------------cut here---------------end--------------->8---
>>>> 
>>>> --
>>>> Darlan
>>>> 
>>>> At Thu, 27 Oct 2011 17:03:55 -0400,
>>>> Nick Dokos <nicholas.dokos@hp.com> wrote:
>>>>> 
>>>>> Darlan Cavalcante Moreira <darcamo@gmail.com> 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
>>>> 
>>> 
>> 
> tex

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-10-28 16:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 19:31 Feature Request: Disable auto-insert-mode exporting Darlan Cavalcante Moreira
2011-10-27 21:03 ` Nick Dokos
2011-10-28  4:49   ` Darlan Cavalcante Moreira
2011-10-28  8:43     ` Carsten Dominik
2011-10-28 16:29       ` Darlan Cavalcante Moreira
2011-10-28 16:45         ` Nick Dokos
2011-10-28 16:51           ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2009-09-25  0:15 Problem with LaTeX snippets preview Paul Burkander
2009-09-25  0:48 ` Fwd: " Paul Burkander
2009-09-25 14:06 ` Darlan Cavalcante Moreira
2009-09-25 14:15   ` Carsten Dominik
2009-09-25 14:30     ` Darlan Cavalcante Moreira
2009-09-25 15:52       ` Nick Dokos
2009-09-25 15:58         ` Paul Burkander
2009-09-25 16:46           ` Nick Dokos
2009-09-25 17:20             ` Nick Dokos
2009-09-26  6:39               ` Carsten Dominik
2009-09-26  7:36               ` Carsten Dominik
2009-09-26  2:28           ` Darlan Cavalcante Moreira
2009-09-26  7:30         ` Carsten Dominik

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).