From mboxrd@z Thu Jan 1 00:00:00 1970 From: "R. Michael Weylandt" Subject: Re: :mkdirp without path specifier Date: Fri, 2 May 2014 23:43:21 -0400 Message-ID: References: <14FCE026-6FA3-409F-87F6-B2E9B1452C9E@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11336c2653bc2404f876b42b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgQrZ-0004Ch-6T for emacs-orgmode@gnu.org; Fri, 02 May 2014 23:43:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgQrY-0006VL-Cs for emacs-orgmode@gnu.org; Fri, 02 May 2014 23:43:45 -0400 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:65530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgQrY-0006V5-3v for emacs-orgmode@gnu.org; Fri, 02 May 2014 23:43:44 -0400 Received: by mail-la0-f42.google.com with SMTP id mc6so3410028lab.29 for ; Fri, 02 May 2014 20:43:42 -0700 (PDT) In-Reply-To: <14FCE026-6FA3-409F-87F6-B2E9B1452C9E@gmail.com> 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@gnu.org" --001a11336c2653bc2404f876b42b Content-Type: text/plain; charset=UTF-8 On Thu, May 1, 2014 at 3:47 PM, Michael Weylandt wrote: > If it intended that setting :mkdirp yes should break tangling with 'directory-free' file names? > > I.e., should > ############# > #+TITLE: test > #+BEGIN_SRC python :mkdirp yes :tangle test.py > print 1+2 > #+END_SRC > ############### > > tangle without error? > > It currently doesn't because (file-name-directory "test.py"), which is nil, gets passed to make-directory, which throws an error. > > The manual is ambiguous, stating only that the arg to :tangle is interpreted as a path. A strict reading says this shouldn't work, regardless of :mkdirp, since we're not giving a path, but I think the "understood ./" of :mkdirp no is reasonable. > Patch attached. Should apply cleanly against master and maint. Michael --001a11336c2653bc2404f876b42b Content-Type: application/octet-stream; name="0001-Fix-tangle-with-mkdirp-yes-tangle-FILE.patch" Content-Disposition: attachment; filename="0001-Fix-tangle-with-mkdirp-yes-tangle-FILE.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_huqd7se20 RnJvbSBkNGRjODA2N2YzYTk3ZmJkNjA2MTUzN2U0ZjUyYmJjZWEwYjUwYmM4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNaWNoYWVsIFdleWxhbmR0IDxtaWNoYWVsLndleWxhbmR0QGdt YWlsLmNvbT4KRGF0ZTogRnJpLCAyIE1heSAyMDE0IDIzOjMwOjQyIC0wNDAwClN1YmplY3Q6IFtQ QVRDSF0gRml4IHRhbmdsZSB3aXRoICI6bWtkaXJwIHllcyA6dGFuZ2xlIEZJTEUiCgoqIG9iLXRh bmdsZS5lbCAob3JnLWJhYmVsLXRhbmdsZSk6IEZpeCB0YW5nbGluZyB3aXRoIDpta2RpcnAgYW5k IDp0YW5nbGUgRklMRS4KU2luY2UgKGZpbGUtbmFtZS1kaXJlY3RvcnkgRklMRSkgcmV0dXJucyBu aWwsIGRvbid0IHBhc3MgaXQgdG8KbWFrZS1kaXJlY3Rvcnkgd2l0aG91dCBjaGVja2luZy4KCkZp eGVzIHRhbmdsaW5nIG9mIGZpbGVzIGxpa2U6CnByaW50IDEgKyAyICsgMwoKVElOWUNIQU5HRQot LS0KIGxpc3Avb2ItdGFuZ2xlLmVsIHwgMyArKy0KIDEgZmlsZSBjaGFuZ2VkLCAyIGluc2VydGlv bnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL29iLXRhbmdsZS5lbCBiL2xp c3Avb2ItdGFuZ2xlLmVsCmluZGV4IGJlN2U5YTYuLmR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