From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Re: Problems with Org-Mode export Date: Tue, 20 Sep 2011 12:31:23 -0700 (PDT) Message-ID: <1316547083.4870.YahooMailNeo@web161916.mail.bf1.yahoo.com> References: <1316195401.36711.YahooMailNeo@web161909.mail.bf1.yahoo.com> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1692918197-1316547083=:4870" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R662Q-000356-On for emacs-orgmode@gnu.org; Tue, 20 Sep 2011 15:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R662O-0002Qa-Ih for emacs-orgmode@gnu.org; Tue, 20 Sep 2011 15:31:26 -0400 Received: from nm37-vm6.bullet.mail.bf1.yahoo.com ([72.30.238.206]:27970) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1R662O-0002QP-Ep for emacs-orgmode@gnu.org; Tue, 20 Sep 2011 15:31:24 -0400 In-Reply-To: <1316195401.36711.YahooMailNeo@web161909.mail.bf1.yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-Mode List --0-1692918197-1316547083=:4870 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Another bit of information about this: =A0if I remove:=0A=0A=A0 =A0 :sessio= n *R*=0A=0Afrom the line starting with:=0A=0A=A0 =A0 #+BABEL=0A=0Athen I do= n't see any error message.=0A=0AOTOH, this isn't much of a workaround, beca= use without a "session", the values of the variables are not preserved betw= een source-code blocks, so that, for instance, the combination:=0A=0A=A0 = =A0 x <- c(1, 3, 5) =A0 =A0#### defined in one block=0A=0Aand=0A=0A=A0 =A0 = q <- c(x, 8, 8) =A0 =A0#### defined in another block=0A=0Araises an R error= ('x' is not defined when the assignment to 'q' is made).=0A=0AAlso, in gra= sping at straws, I've tried renaming the R session, as:=0A=0A=A0 =A0 ... :s= ession mTest=0A=0A(on the theory that the '*' is used for emphasis in Org-M= ode markup and might, therefore, somehow confuse things). =A0That didn't he= lp.=0A=0A-- Mike=0A=0A=0A=0A=0A>________________________________=0A>From: M= ichael Hannon =0A>To: Org-Mode List =0A>Sent: Friday, September 16, 2011 10:50 AM=0A>Subject: [O] Problems= with Org-Mode export=0A>=0A>=0A>Greetings.=A0 I've been having problems la= tely in exporting Org-Mode source-code=0A>documents to HTML and/or PDF.=0A>= =0A>I'm running Org-Mode 7.7 with Emacs 23 on 64-bit linux (Fedora 15).=0A>= =0A>I've appended a document that exhibits at least some of the problem.=A0= The=0A>problems are similar to the problem described at:=0A>=0A>=A0=A0=A0 = http://comments.gmane.org/gmane.emacs.orgmode/45316=0A>=0A>and can *sometim= es* be circumvented by executing org-reload.=0A>=0A>In the particular examp= le shown below, the HTML export works as expected, but=0A>the PDF export fa= ils with message:=0A>=0A>=A0=A0=A0 org-export-latex-preprocess: Wrong type = argument: stringp, nil=0A>=0A>By the way, everything worked fine in the exa= mple until I added the last=0A>source block:=0A>=0A>=A0=A0=A0 #+begin_src= =0A R=0A>=0A>=A0=A0=A0=A0=A0 x=0A>=0A>=A0=A0=A0 #+end_src=0A>=0A>I tried us= ing what I take to be the latest version of Org-Mode:=0A>=0A>=A0=A0=A0 Org-= mode version 7.7 (release_7.7.290.g65d05)=0A>=0A>but that only made things = worse.=A0 I tried an HTML export with this version, and=0A>it generated a h= orrendous-looking message that begins with:=0A>=0A>org-babel-R-evaluate: Wr= ong number of arguments: #[(session body result-type=0A>result-params colum= n-names-p row-names-p) =C6=3D}...=0A>=0A>followed by a bunch of stuff conta= ining enough non-printing characters that=0A>it's hard to reproduce in emai= l, and ending with:=0A>=0A>...org-mode/lisp/ob-R.elc" . 9734)], 5=0A>=0A>I'= d welcome any help/advice that anybody can provide.=0A>=0A>Thanks,=0A>=0A>-= - Mike=0A>=0A>########## Sample file that exhibits some export problems=0A>= =0A>#+TITLE: This is a test=0A>=0A>#+AUTHOR: Michael Hannon=0A>#+email: jm_= hannon@yahoo.com=0A>=0A>#+BABEL:=0A :session *R* :cache yes :results output= graphics :exports both :tangle yes=0A>=0A>* Getting Started=0A>=0A>** Batc= h Mode=0A>=0A>=0A>#+begin_src R :exports code=0A>=0A>pdf("xh.pdf") # set gr= aphical output file=0A>hist(rnorm(100)) # generate 100 N(0,1) variates and = plot their histogram=0A>dev.off() # close the graphical output file=0A>=0A>= #+end_src=0A>=0A>If we put the code above in a file called =3Dz.R=3D, we ca= n execute the=0A>code from the command line via: =3DR CMD BATCH z.R=3D=0A>= =0A>=0A>#+begin_src R=0A>=A0 =0A>=A0 x <- c(1, 3, 5)=0A>=A0 =0A>#+end_src= =0A>=0A>#+begin_src R=0A>=0A>=A0 x[3]=0A>=0A>#+end_src=0A>=0A>#+begin_src R= =0A>=0A>=A0 q <- c(x,x,8)=0A>=0A>#+end_src=0A>=0A>#+begin_src R=0A>=0A>=A0 = x=0A>=0A>#+end_src=0A>=0A>=0A>=0A> --0-1692918197-1316547083=:4870 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Another bit of informat= ion about this:  if I remove:

=
    :session *R*

from the line starting with:

    #+BABEL

=
then I don't see any error message.

OTOH, this isn't much of a workaround, because= without a "session", the values of the variables are not preserved between= source-code blocks, so that, for instance, the combination:

    x <- c(1, 3, 5)  = ;  #### defined in one block

and
<= div>
    q <- c(x, 8, 8) &nbs= p;  #### defined in another block

raises an R error ('x' is not defined when the assignment to= 'q' is made).

Also, in = grasping at straws, I've tried renaming the R session, as:

    ... :session mTest<= /div>

(on the theory that the '*' is used f= or emphasis in Org-Mode markup and might, therefore, somehow confuse things= ).  That didn't help.

-- Mike

<= /div>


From:= Michael Hannon <jm_hannon@yahoo.com>
To: Org-Mode List <emacs-orgmode@gnu.org= >
Sent: Friday, Sept= ember 16, 2011 10:50 AM
Subject: [O] Problems with Org-Mode export

G= reetings.  I've been having problems lately in exporting Org-Mode sour= ce-code
documents to HTML and/or PDF.

I'm running Org-Mode 7.7 wi= th Emacs 23 on 64-bit linux (Fedora 15).

I've appended a document th= at exhibits at least some of the problem.  The
problems are similar= to the problem described at:

    http://comments.gmane.org/= gmane.emacs.orgmode/45316

and can *sometimes* be circumvented by exe= cuting org-reload.

In the particular example shown below, the HTML e= xport works as expected, but
the PDF export fails with message:

&= nbsp;   org-export-latex-preprocess: Wrong type argument: stringp= , nil

By the way, everything worked fine in the example until I adde= d the last
source block:

    #+begin_src=0A R
<= br>      x

    #+end_src
=
I tried using what I take to be the latest version of Org-Mode:

=     Org-mode version 7.7 (release_7.7.290.g65d05)

but= that only made things worse.  I tried an HTML export with this versio= n, and
it generated a horrendous-looking message that begins with:
org-babel-R-evaluate: Wrong number of arguments: #[(session body result-t= ype
result-params column-names-p row-names-p) =C6=3D}...

followed= by a bunch of stuff containing enough non-printing characters that
it's= hard to reproduce in email, and ending with:

...org-mode/lisp/ob-R.= elc" . 9734)], 5

I'd welcome any help/advice that anybody can provid= e.

Thanks,

-- Mike

########## Sample file that exhibit= s some export problems

#+TITLE: This is a test

#+AUTHOR: Mich= ael Hannon
#+email: jm_hannon@yahoo.com

#+BABEL:=0A :session *R* = :cache yes :results output graphics :exports both :tangle yes

* Gett= ing Started

** Batch Mode


#+begin_src R :exports code
=
pdf("xh.pdf") # set graphical output file
hist(rnorm(100)) # generat= e 100 N(0,1) variates and plot their histogram
dev.off() # close the gra= phical output file

#+end_src

If we put the code above in a fi= le called =3Dz.R=3D, we can execute the
code from the command line via: = =3DR CMD BATCH z.R=3D


#+begin_src R
 
  x <-= c(1, 3, 5)
 
#+end_src

#+begin_src R

  x[3]=

#+end_src

#+begin_src R

  q <- c(x,x,8)
#+end_src

#+begin_src R

  x

#+end_src



--0-1692918197-1316547083=:4870--