From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bizarre gnuplot file creation error Date: Wed, 29 Nov 2017 00:21:12 +0100 Message-ID: <87po82ouqf.fsf@nicolasgoaziou.fr> References: <87zi7ve374.fsf@delle7240.chemeng.ucl.ac.uk> <87d14hvr5e.fsf@nicolasgoaziou.fr> <871skqbeck.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJpBm-0000of-5q for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 18:21:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJpBj-0003Mh-0C for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 18:21:18 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:55864) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eJpBi-0003MH-Pz for emacs-orgmode@gnu.org; Tue, 28 Nov 2017 18:21:14 -0500 In-Reply-To: <871skqbeck.fsf@gmail.com> (Eric S. Fraga's message of "Wed, 22 Nov 2017 14:03:07 +0000") 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: Lawrence Bottorff Cc: emacs-orgmode Mailinglist Hello, Eric S Fraga writes: > On Thursday, 16 Nov 2017 at 22:40, Nicolas Goaziou wrote: >> Hello, >> >> Eric S Fraga writes: >> >>> The proper solution would be to update ob-gnuplot to change the working >>> directory at every invocation of gnuplot to be the directory where the >>> org file is found. (gnuplot has a "cd" command for this purpose) >> >> Would you like to propose a patch for that? BTW should the new working >> directory be Org file's or :file, or even :dir? > > Nicolas, > > can you please advise on how to get the directory the originating org > file may lie in from within org-babel-expand-body:gnuplot? No idea. (and (buffer-file-name) (file-name-directory (buffer-file-name))) ? The originating Org file may not exist. Regards, -- Nicolas Goaziou