all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: ams@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: (file-exists-p "") --> t??
Date: Mon, 27 Apr 2009 14:28:25 +0200 (CEST)	[thread overview]
Message-ID: <20090427.142825.960840171362457236.hanche@math.ntnu.no> (raw)
In-Reply-To: <E1LyPkj-00074Y-2L@fencepost.gnu.org>

+ "Alfred M. Szmidt" <ams@gnu.org>:

> I guess that makes sense, I am actually fiine with the behaviour,
> other than it is annoying when you use file-exists-p in a loop, and
> you start of with a empty string...
> 
> (let ((foo ""))
>   (while (not (file-exists-p foo))
>     (setq foo (generate-foo-some-how))))

Ah, I see.

(let (foo)
  (while (not (file-exists-p (setq foo (generate-foo-some-how)))))
  (do-something-with-existing-file foo))

- Harald




      parent reply	other threads:[~2009-04-27 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 12:08 (file-exists-p "") --> t?? Alfred M. Szmidt
2009-04-27 12:12 ` Harald Hanche-Olsen
2009-04-27 12:16   ` Alfred M. Szmidt
2009-04-27 12:25     ` Deniz Dogan
2009-04-29 10:00       ` Alfred M. Szmidt
2009-04-27 12:28     ` Harald Hanche-Olsen [this message]

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

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

  git send-email \
    --in-reply-to=20090427.142825.960840171362457236.hanche@math.ntnu.no \
    --to=hanche@math.ntnu.no \
    --cc=ams@gnu.org \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.