From: Nick Dokos <nicholas.dokos@hp.com>
To: Michael Hannon <jm_hannon@yahoo.com>
Cc: nicholas.dokos@hp.com, Org-Mode List <emacs-orgmode@gnu.org>
Subject: Re: Problems with Org-Mode export
Date: Tue, 20 Sep 2011 16:29:26 -0400 [thread overview]
Message-ID: <2859.1316550566@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Michael Hannon <jm_hannon@yahoo.com> of "Tue\, 20 Sep 2011 12\:31\:23 PDT." <1316547083.4870.YahooMailNeo@web161916.mail.bf1.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 4333 bytes --]
Michael Hannon <jm_hannon@yahoo.com> wrote:
> Another bit of information 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
>
> q <- c(x, 8, 8) #### 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
>
> (on the theory that the '*' is used for emphasis in Org-Mode markup and might, therefore, somehow
> confuse things). That didn't help.
>
FWIW, I don't get any error messages. I have no idea what the exported
file should look like: I attach both the exported pdf and the exported
html below (as well as the org file, which is just cut-n-pasted from
what you posted).
Versions:
Org-mode version 7.7 (release_7.7.224.g6e14)
GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-09-13
I'll pull the newest bits and try again.
Nick
>
> -------------------------------------------------------------------------------------------------
> From: Michael Hannon <jm_hannon@yahoo.com>
> To: Org-Mode List <emacs-orgmode@gnu.org>
> Sent: Friday, September 16, 2011 10:50 AM
> Subject: [O] Problems with Org-Mode export
>
> Greetings. I've been having problems lately in exporting Org-Mode source-code
> documents to HTML and/or PDF.
>
> I'm running Org-Mode 7.7 with Emacs 23 on 64-bit linux (Fedora 15).
>
> I've appended a document that 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 executing org-reload.
>
> In the particular example shown below, the HTML export works as expected, but
> the PDF export fails with message:
>
> org-export-latex-preprocess: Wrong type argument: stringp, nil
>
> By the way, everything worked fine in the example until I added the last
> source block:
>
> #+begin_src R
>
> 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 version, and
> it generated a horrendous-looking message that begins with:
>
> org-babel-R-evaluate: Wrong number of arguments: #[(session body result-type
> result-params column-names-p row-names-p) Æ=}...
>
> 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 provide.
>
> Thanks,
>
> -- Mike
>
> ########## Sample file that exhibits some export problems
>
> #+TITLE: This is a test
>
> #+AUTHOR: Michael Hannon
> #+email: jm_hannon@yahoo.com
>
> #+BABEL: :session *R* :cache yes :results output graphics :exports both :tangle yes
>
> * Getting Started
>
> ** Batch Mode
>
> #+begin_src R :exports code
>
> pdf("xh.pdf") # set graphical output file
> hist(rnorm(100)) # generate 100 N(0,1) variates and plot their histogram
> dev.off() # close the graphical output file
>
> #+end_src
>
> If we put the code above in a file called =z.R=, we can execute the
> code from the command line via: =R CMD BATCH z.R=
>
> #+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
[-- Attachment #2: org file --]
[-- Type: text/plain, Size: 673 bytes --]
#+TITLE: This is a test
#+AUTHOR: Michael Hannon
#+email: jm_hannon@yahoo.com
#+BABEL: :session *R* :cache yes :results output graphics :exports both :tangle yes
* Getting Started
** Batch Mode
#+begin_src R :exports code
pdf("xh.pdf") # set graphical output file
hist(rnorm(100)) # generate 100 N(0,1) variates and plot their histogram
dev.off() # close the graphical output file
#+end_src
If we put the code above in a file called =z.R=, we can execute the
code from the command line via: =R CMD BATCH z.R=
#+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
[-- Attachment #3: html file --]
[-- Type: application/xml, Size: 4775 bytes --]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>This is a test</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2011-09-20 16:28:20 EDT"/>
<meta name="author" content="Michael Hannon"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
html { font-family: Times, serif; font-size: 12pt; }
.title { text-align: center; }
.todo { color: red; }
.done { color: green; }
.tag { background-color: #add8e6; font-weight:normal }
.target { }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.right {margin-left:auto; margin-right:0px; text-align:right;}
.left {margin-left:0px; margin-right:auto; text-align:left;}
.center {margin-left:auto; margin-right:auto; text-align:center;}
p.verse { margin-left: 3% }
pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: courier, monospace;
font-size: 90%;
overflow:auto;
}
table { border-collapse: collapse; }
td, th { vertical-align: top; }
th.right { text-align:center; }
th.left { text-align:center; }
th.center { text-align:center; }
td.right { text-align:right; }
td.left { text-align:left; }
td.center { text-align:center; }
dt { font-weight: bold; }
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
div.inlinetask {
padding:10px;
border:2px solid gray;
margin:10px;
background: #ffffcc;
}
textarea { overflow-x: auto; }
.linenr { font-size:smaller }
.code-highlighted {background-color:#ffff00;}
.org-info-js_info-navigation { border-style:none; }
#org-info-js_console-label { font-size:10px; font-weight:bold;
white-space:nowrap; }
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
font-weight:bold; }
/*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div id="preamble">
</div>
<div id="content">
<h1 class="title">This is a test</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Getting Started </a>
<ul>
<li><a href="#sec-1-1">1.1 Batch Mode </a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Getting Started </h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> Batch Mode </h3>
<div class="outline-text-3" id="text-1-1">
<pre class="src src-R">pdf(<span style="color: #ffa07a;">"xh.pdf"</span>) <span style="color: #f4a460;"># </span><span style="color: #f4a460;">set graphical output file</span>
hist(rnorm(100)) <span style="color: #f4a460;"># </span><span style="color: #f4a460;">generate 100 N(0,1) variates and plot their histogram</span>
dev.off() <span style="color: #f4a460;"># </span><span style="color: #f4a460;">close the graphical output file</span>
</pre>
<p>
If we put the code above in a file called <code>z.R</code>, we can execute the
code from the command line via: <code>R CMD BATCH z.R</code>
</p>
<pre class="src src-R"> x <span style="color: #7fffd4;"><-</span> c(1, 3, 5)
</pre>
<pre class="src src-R"> x[3]
</pre>
<pre class="example">
[1] 5
</pre>
<pre class="src src-R"> q <span style="color: #7fffd4;"><-</span> c(x,x,8)
</pre>
<pre class="src src-R"> x
</pre>
<pre class="example">
[1] 1 3 5
</pre>
</div>
</div>
</div>
</div>
<div id="postamble">
<p class="date">Date: 2011-09-20 16:28:20 EDT</p>
<p class="author">Author: Michael Hannon</p>
<p class="creator">Org version 7.7 with Emacs version 24</p>
<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
</div>
</body>
</html>
[-- Attachment #4: pdf file --]
[-- Type: application/pdf, Size: 51751 bytes --]
next prev parent reply other threads:[~2011-09-20 20:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 17:50 Problems with Org-Mode export Michael Hannon
2011-09-16 20:04 ` Michael Hannon
2011-09-17 4:59 ` David Maus
2011-09-19 21:17 ` Michael Hannon
2011-09-19 23:20 ` [PATCH] Check argument is a string before calling string-match Bernt Hansen
2011-10-04 12:36 ` [Accepted] " Carsten Dominik
2011-09-20 19:31 ` Problems with Org-Mode export Michael Hannon
2011-09-20 20:29 ` Nick Dokos [this message]
2011-09-21 1:09 ` Michael Hannon
2011-09-21 14:37 ` Nick Dokos
2011-09-21 19:10 ` Michael Hannon
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=2859.1316550566@alphaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=jm_hannon@yahoo.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).