emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (file-exists-p "") --> t??


From: Harald Hanche-Olsen
Subject: Re: (file-exists-p "") --> t??
Date: Mon, 27 Apr 2009 14:28:25 +0200 (CEST)

+ "Alfred M. Szmidt" <address@hidden>:

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]