From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Loris Bennett" Subject: Re: [babel] Working dir incorrect Date: Thu, 20 Apr 2017 11:24:55 +0200 Message-ID: <87r30nwhw8.fsf@fu-berlin.de> References: <8760jd4592.fsf@fu-berlin.de> <878to85key.fsf@fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d18Kq-0005bP-QO for emacs-orgmode@gnu.org; Thu, 20 Apr 2017 05:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d18Km-0003qe-LY for emacs-orgmode@gnu.org; Thu, 20 Apr 2017 05:25:08 -0400 Received: from [195.159.176.226] (port=54797 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d18Km-0003pt-Ej for emacs-orgmode@gnu.org; Thu, 20 Apr 2017 05:25:04 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d18Kd-0000K6-Qn for emacs-orgmode@gnu.org; Thu, 20 Apr 2017 11:24:55 +0200 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" To: emacs-orgmode@gnu.org Hi, "Loris Bennett" writes: > Hi John, > > John Hendy writes: > >> On Mon, Mar 13, 2017 at 9:32 AM, Loris Bennett >> wrote: >>> Hi, >>> >>> In a file that used to work, when I now try to run some R code which >>> generates an image, I get the error: >>> >>> cannot open file './usage_users_historical_facet.pdf' >>> >>> If I check the working directory for the R session I see >>> >>> getwd() >>> [1] "/usr/share/emacs/site-lisp/ess" >>> >>> instead of the directory in which my org file is located. >>> >>> I am now running Org 9.0.5 on Emacs 25.1.1. The last time things worked >>> I was definitely using an older version of Org and possibly Emacs 24. >>> >>> Any thoughts? >> >> I agree with Nick on an ECM. Just to start the ball rolling: >> [snip (54 lines)] >> >> How does this go for you? > > Thanks for doing most of the work for me. Unfortunately for me, the ECM > works fine, so I'm going to have to do some work myself and debug my > crufty old .emacs. I finally got round to bisecting my .emacs and worked out the sequence of events which lead me to shooting myself in the foot: 1. Installed Emacs 25 under /usr/local 2. Discovered that Emacs 25 couldn't find the ESS stuff 3. Defined a variable 'ess-directory' to be "/usr/share/emacs/site-lisp/ess/" 4. Used the variable in a function to add ESS to the load-path It turns out that variable 'ess-directory' already exists and is, according to the documentation, "the directory ESS is run from". Thus renaming the variable 'ess-directory' to 'non-in-the-foot-shooting-ess-directory' solves the problem. Cheers, Loris -- This signature is currently under construction.