From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: :dir argument does not seem to be working Date: Fri, 10 Aug 2012 15:05:04 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzvSE-0004hk-NP for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 16:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzvSD-0001Pe-5R for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 16:05:06 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:47122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzvSD-0001Oj-0g for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 16:05:05 -0400 Received: by vcbfl10 with SMTP id fl10so2230704vcb.0 for ; Fri, 10 Aug 2012 13:05:04 -0700 (PDT) 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: emacs-orgmode Here's a hopefully reproducible example: ---------- * Test #+header: :dir C:/Users/username/Desktop :file test.png #+begin_src R :session R :results output graphics :exports results setwd("C:/Users/username/Documents") x <- 1:10 y <- x^2 plot(x,y) #+end_src ---------- I prefer to use R on Linux, but need to stay in Windows at work sometimes. I'm trying to export my plots to a different directory than the org file I'm using. I tend to start R in "C:/Users/username/Documents" on Windows 7 because that's where I set my library directory and R has trouble loading things if I don't start there first, load my libraries, and then move to my data directory. In any case, for the above, when I switch to the R session called =R=, and do =getwd()= I get C:/Users/username/Documents, which is where the png ends up, not on the Desktop. Is this something in my usage I'm doing wrong? Thanks, John