On Thu, Mar 28, 2013 at 5:25 AM, Andreas Leha
<andreas.l...@med.uni-goettingen.de> wrote:
> Hi Eric,
>
> Eric Schulte <schulte.e...@gmail.com> writes:
>
>> Andreas Leha <andreas.l...@med.uni-goettingen.de> writes:
>>
>> [...]
>>>
>>> Is that just not working for me?  And any ideas, what I could do about
>>> it?
>>>
>>
>> I have no good ideas.  Is the `org-babel-default-header-args:R' variable
>> defined on your system before you load this file?  If not, maybe you
>> should be sure to add
>>
>>   (require 'ob-R)
>>

Is this the right way to require a language anymore? I thought it was:

;; active Babel languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))

(http://orgmode.org/worg/org-contrib/babel/languages.html)

>
> The variable is defined (value is nil).  I added the (require 'ob-R) to
> my initialization nonetheless, but no avail.  The value of
> `org-babel-default-header-args:R' stays nil.
>
>> to your emacs initialization.  If the ":" in the variable name is
>> somehow confusing your Emacs, then possibly you could use the alternate
>> format of specifying file local variables (see the info link in my
>> attached example).
>
> I tried (the file is below).  In this case I even get the question on
> unsafe variables.
>
> [...]
>

Well that's good; it's trying to start a session.

>
> Thanks for the suggestions anyway,
> Andreas
>
> PS: the file again:
> #+begin_org
> #+Title: Example
> #+Author: Eric Schulte
>
> For more information on file local variables see 
> [[info:elisp#File%20Local%20Variables][info:elisp#File Local
> Variables]].
>
> Because there is a default :session values assigned locally for R
> blocks we have the following.
>
> #+begin_src R
>   x <- 1
>   x
> #+end_src
>
> #+RESULTS:
> : 1
>
> #+begin_src R
>   x
> #+end_src
>
> #+RESULTS:
>
> But non-R code blocks do not have a default session value.
>
> #+begin_src sh
>   date
> #+end_src
>
> #+RESULTS:
> : Mi 27. Mär 21:18:49 CET 2013
>
> # Local Variables:
> # org-babel-default-header-args:R: ((:session . "foo"))
> # End:
> #+end_org
>

Haven't really been following along, but this works for me (after execution):

#+begin_src emacs-lisp
      (setq org-babel-default-header-args:R
            '((:session . "org-R")))
#+end_src


These aren't:

-*- org-babel-default-header-args:R: ((:session . "foo")) -*-

#-*- org-babel-default-header-args:R: ((:session . "foo")) -*-

There were a lot of suggestions made above and I've never used the
-*-setting-*- syntax and am not searching the right things to find out
more about how this is supposed to work.

ETA: Ah, I had to re-open the file after adding this to the buffer to
get it to recognize it:

# Local Variables:
# org-babel-default-header-args:R: ((:session . "foo"))
# End:

This produces the same issue as you, Andreas:

Wrong type argument: sequencep, R:


Not sure. I'm on 8.0-pre (release_8.0-pre-193-gaa7b1e).


John

>

Reply via email to