From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix behaviour of ":dir" when ":mkdirp" is not defined Date: Thu, 25 Apr 2019 10:39:02 +0200 Message-ID: <87d0laqy1l.fsf@nicolasgoaziou.fr> References: <878svyobcj.fsf@loge.kinote.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJZuO-0002KD-Kz for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJZuN-0000yg-Kc for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:39:08 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57645) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJZuN-0000xC-EG for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:39:07 -0400 In-Reply-To: <878svyobcj.fsf@loge.kinote.org> (=?utf-8?Q?=22Joaqu=C3=ADn?= Aguirrezabalaga"'s message of "Thu, 25 Apr 2019 08:19:56 +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: =?utf-8?Q?Joaqu=C3=ADn?= Aguirrezabalaga Cc: emacs-orgmode@gnu.org Hello, Joaqu=C3=ADn Aguirrezabalaga writes: > Hello, > > I think the behaviour of ":dir" is broken since commit 8b5941330 > (ob-core: Make :mkdirp work for :dir too). It only works now if > ":mkdirp" is defined. > > If I execute the following: > > #+begin_src elisp :dir /tmp/some-test-dir > default-directory > #+end_src > > > Instead of the expected "/tmp/some-test-dir" returned value, I get my > current directory. > > Only add ":mkdirp t": > > #+begin_src elisp :dir /tmp/some-test-dir :mkdirp t > default-directory > #+end_src > > do I get the expected result. > > Please find attached my proposal for fixing the issue. Applied, with a slight refactoring to use `cond' instead of `or' + `if'. I added TINYCHANGE at the end of the commit message since I don't know if you signed FSF papers already. Thank you. Regards, --=20 Nicolas Goaziou