From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: iterating over a list while removing elements Date: Thu, 20 Mar 2014 22:16:25 +0200 Message-ID: <83k3bo7hie.fsf@gnu.org> References: <87ioral4ck.fsf@kuiper.lan.informatimago.com> <87lhw4vkn1.fsf@yun.yagibdah.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1395346595 5794 80.91.229.3 (20 Mar 2014 20:16:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2014 20:16:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 20 21:16:44 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQjOM-0006SU-Ea for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2014 21:16:42 +0100 Original-Received: from localhost ([::1]:49090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQjOL-00086Q-TW for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2014 16:16:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQjO0-0007kb-Q7 for help-gnu-emacs@gnu.org; Thu, 20 Mar 2014 16:16:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQjNt-0004Fd-Hq for help-gnu-emacs@gnu.org; Thu, 20 Mar 2014 16:16:20 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:48896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQjNt-0004FO-9P for help-gnu-emacs@gnu.org; Thu, 20 Mar 2014 16:16:13 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N2R00D003L6IH00@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Thu, 20 Mar 2014 22:16:11 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2R00DKE4AZ9RA0@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Thu, 20 Mar 2014 22:16:11 +0200 (IST) In-reply-to: <87lhw4vkn1.fsf@yun.yagibdah.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96649 Archived-At: > From: lee > Date: Thu, 20 Mar 2014 18:34:58 +0100 > > Joost Kremers writes: > > > Note, BTW, that file-directory-p returns t for "." and "..". It seems to > > me that the only two names that directory-files could return that you > > really want to exclude are those two,[1] so there's no need for > > multisearch-directory-ref-p, I think. (Or is there?) > > The idea is that (file-directory-p "..") may cause a file look-up which > can be avoided by string-matching. After you've read the directory, its entries, including "..", are in the cache, so (file-directory-p "..") should not need to hit the disk. > How does the disk cache deal with non-existing files? The > meta-information is probably in the cache (more or less), yet there can > be no information for non-existing files. Non-existing files are missing entries in their parent directories, which are files by themselves, and thus cached. So dealing with non-existing files just means reading their directory (from memory, not from disk) and noticing that a file by that name is not there.