From: "Alfred M. Szmidt" <ams@gnu.org>
To: Deniz Dogan <deniz.a.m.dogan@gmail.com>
Cc: hanche@math.ntnu.no, emacs-devel@gnu.org
Subject: Re: (file-exists-p "") --> t??
Date: Wed, 29 Apr 2009 06:00:33 -0400 [thread overview]
Message-ID: <E1Lz6af-0003KA-Uq@fencepost.gnu.org> (raw)
In-Reply-To: <7b501d5c0904270525i70160940m9f389a38b4e68212@mail.gmail.com> (message from Deniz Dogan on Mon, 27 Apr 2009 14:25:06 +0200)
> 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))))
Why not use the following?
(let ((foo (generate-foo-some-how)))
(while (not (file-exists-p foo))
(setq foo (generate-foo-some-how))))
You might be passing a counter to the function that generates the file name.
next prev parent reply other threads:[~2009-04-29 10:00 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 [this message]
2009-04-27 12:28 ` Harald Hanche-Olsen
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Lz6af-0003KA-Uq@fencepost.gnu.org \
--to=ams@gnu.org \
--cc=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=hanche@math.ntnu.no \
/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.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).