[Top][All Lists]

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

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

From: Alfred M. Szmidt
Subject: Re: (file-exists-p "") --> t??
Date: Mon, 27 Apr 2009 08:16:05 -0400

   X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
   Date: Mon, 27 Apr 2009 14:12:42 +0200 (CEST)
   Cc: address@hidden
   From: Harald Hanche-Olsen <address@hidden>
   Mime-Version: 1.0
   Content-Type: Text/Plain; charset=us-ascii

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

   > Is it intended that file-exists-p returns t for the empty string?

   I don't know if it is intended or not, but it does make some sort of
   sense: Try (find-file "") to see for yourself what you get.

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))))

reply via email to

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