emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: :mkdirp without path specifier
Date: Sat, 03 May 2014 10:19:34 +0200	[thread overview]
Message-ID: <87oazfjmuh.fsf@Rainer.invalid> (raw)
In-Reply-To: CAAmySGO7ZhDfsOQ1bBXYQ-XFK6VUV92cR1EOGMUen_C03gv5Sg@mail.gmail.com

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

  reply	other threads:[~2014-05-03  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 19:47 :mkdirp without path specifier Michael Weylandt
2014-05-03  3:43 ` R. Michael Weylandt
2014-05-03  3:47   ` R. Michael Weylandt
2014-05-03  8:19     ` Achim Gratz [this message]
2014-05-03 14:52       ` R. Michael Weylandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oazfjmuh.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).