I've got a few problems with R source blocks that I can't figure out. They
started late last month, I think. I'm running Emacs and Org from the
development trees, refreshing and recompiling regularly. ESS (the package for
working with R) is up to date too.
Here's one big problem. I have a file, /home/wtd/books/reading/test-r.org, and
in it is this R block:
# -----
#+begin_src R :session R:testing :results value
1
#+end_src
# -----
If I execute that with C-c C-c, the R session buffer starts, but in the wrong
working directory. This is in the R session buffer, reported by ESS:
# -----
setwd('/home/wtd/books')
# -----
It's in the directory *above* where the Org file is! It should be in
/home/wtd/books/reading/.
I copied the test file to /tmp/r/test/, and it's fine there. The session's
working directory is /tmp/r/test/, not /tmp/r/.
Something strange is going on, but I can't see why. Is there some way I can
see all the steps that are happening when I hit C-c C-c on that code block? Or
maybe there's some other way to figure it out? Any suggestions welcome.
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada