emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
Date: Fri, 17 Sep 2010 12:55:33 -0400	[thread overview]
Message-ID: <87ocbw48e2.fsf@gmail.com> (raw)
In-Reply-To: <87wrqkl7pw.fsf@mundaneum.com> ("Sébastien Vauban"'s message of "Fri, 17 Sep 2010 17:18:03 +0200")

Hi Seb,

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric,
>
> "Eric Schulte" wrote:
>>> The error occurs with such a simple document:
>>>
>>> #+TITLE:     Org-isodoc
>>> #+LANGUAGE:  en_US
>>>
>>> * Context
>>>
>>> This is a letter sample.
>>>
>>> * Subject
>>> #+srcname: subject
>>> #+begin_src org :results latex
>>> Composing letters using Org mode and the LaTeX isodoc class
>>> #+end_src
>>
>> This is a tricky problem indeed. After some debugging, it appears that the
>> problem is the result of the "org" code block calling `org-export-as-latex'
>> on its body, while `org-export-as-latex' is already called on the entire
>> org-mode file. Apparently the Org-mode exporter is not currently able to
>> handle nested export calls, because the name of the temporary export buffer
>> is hard coded into `org-export-preprocess-string', meaning that the buffer
>> is re-used and deleted by the nested export call.
>>
>> This fix will probably take some time to implement, and until then I don't
>> think it will be possible to evaluate org-mode blocks during export.
>
> OK. Am I right, then, to conclude that the discussed Noweb route must be
> abandoned (at least, temporarily) for writing isodoc letters?
>

Noweb expansion is still possible, however explicitly performing the
export is not.

>
> What could be a workaround?
>

Simply change =:results latex= to =:results org= and the code block body
will be harmlessly expanded and deposited in the org buffer on export,
then carried along with the rest of the file for export.

--8<---------------cut here---------------start------------->8---
#+TITLE:     Org-isodoc
#+AUTHOR:    Seb Vauban
#+DATE:      2010-09-13
#+LANGUAGE:  en_US

* Context

This is a letter sample.

* Subject
#+source: me
#+begin_src org
  I am *eric*.
#+end_src

#+srcname: subject
#+begin_src org :results org replace :noweb yes
Composing letters using *Org mode* and the LaTeX isodoc class

<<me>>
#+end_src
--8<---------------cut here---------------end--------------->8---

I should have mentioned this in my earlier email.

>
> Thanks a lot...
>

My pleasure.

Best -- Eric

>
> Best regards,
>   Seb

  reply	other threads:[~2010-09-17 16:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 11:33 [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0) Sébastien Vauban
2010-09-17 14:08 ` Eric Schulte
2010-09-17 15:18   ` Sébastien Vauban
2010-09-17 16:55     ` Eric Schulte [this message]
2010-09-20 22:10       ` Sébastien Vauban
2010-09-21 16:19         ` Eric Schulte
2010-09-21 20:54           ` Sébastien Vauban

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=87ocbw48e2.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.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).