Re: [O] :mkdirp without path specifier

2014-05-03 Thread Achim Gratz
R. Michael Weylandt writes:
 ;; Possibly create the parent directories for file.
 (when (let ((m (funcall get-spec :mkdirp)))
(and m (not (string= m no
 - (make-directory (file-name-directory file-name) 
 'parents))
 + (if (file-name-directory file-name)
 + (make-directory (file-name-directory file-name) 
 'parents)))

If the else clause is intentionally missing, some folks prefer to use
when instead of if to advertise that fact (see some surrounding code
for example).  In this case the additional if should be rolled into
the condition check of the former when anyway (and let-bind the result
to avoid the duplicate file-name-directory call).  The conditional is
actually superfluous since we can short-circuit from the and.

A patch to that effect has been installed in 063c8b03b7.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] :mkdirp without path specifier

2014-05-03 Thread R. Michael Weylandt
On Sat, May 3, 2014 at 4:19 AM, Achim Gratz strom...@nexgo.de wrote:
 R. Michael Weylandt writes:
 ;; Possibly create the parent directories for file.
 (when (let ((m (funcall get-spec :mkdirp)))
(and m (not (string= m no
 - (make-directory (file-name-directory file-name) 
 'parents))
 + (if (file-name-directory file-name)
 + (make-directory (file-name-directory file-name) 
 'parents)))

 If the else clause is intentionally missing, some folks prefer to use
 when instead of if to advertise that fact (see some surrounding code
 for example).  In this case the additional if should be rolled into
 the condition check of the former when anyway (and let-bind the result
 to avoid the duplicate file-name-directory call).  The conditional is
 actually superfluous since we can short-circuit from the and.

 A patch to that effect has been installed in 063c8b03b7.


Thanks for the feedback and applying a fix.



Re: [O] :mkdirp without path specifier

2014-05-02 Thread R. Michael Weylandt
On Fri, May 2, 2014 at 11:43 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
 Patch attached. Should apply cleanly against master and maint.


Bah, botched the formatting. Attached should be fixed.


0001-Fix-tangle-with-mkdirp-yes-tangle-FILE.patch
Description: Binary data