From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.bugs Subject: Re: Allow prefix arg for ido-find-*file* (maybe) Date: Sun, 26 Sep 2004 23:29:57 +0200 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1096234236 29326 80.91.229.6 (26 Sep 2004 21:30:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Sep 2004 21:30:36 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 26 23:30:21 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CBgb7-0006fo-00 for ; Sun, 26 Sep 2004 23:30:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CBghJ-0002db-DN for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Sep 2004 17:36:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CBghH-0002cS-MX for bug-gnu-emacs@gnu.org; Sun, 26 Sep 2004 17:36:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CBghE-0002bD-Ta for bug-gnu-emacs@gnu.org; Sun, 26 Sep 2004 17:36:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CBghE-0002aU-Rb for bug-gnu-emacs@gnu.org; Sun, 26 Sep 2004 17:36:40 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CBgai-00017w-4n for bug-gnu-emacs@gnu.org; Sun, 26 Sep 2004 17:29:56 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 0CF3E47FE01; Sun, 26 Sep 2004 23:29:53 +0200 (CEST) Original-To: "Sean O'Rourke" In-Reply-To: (Sean O'Rourke's message of "Fri, 24 Sep 2004 18:54:37 -0700") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9092 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9092 "Sean O'Rourke" writes: > At Sat, 25 Sep 2004 02:13:01 +0200, > no-spam@cua.dk (Kim F. Storm) wrote: >> It only works on systems (e.g GNU/Linux) where file-attributes returns >> a sensible size for directories. So it probably fails on Windoze... > > Thanks for looking into this. It looks like it does the trick, though > the default threshhold is way too high to have an effect -- something > like 4096 or 8192 might be better. I chose the default limit so it doesn't get activated too often. Specifically, it doesn't get activated in the emacs/lisp directory. And I don't see any slow-down for the current limit on my laptop. But it's a defcustom, so change it to suit your own needs. > file-attributes seems sensical on > Darwin as well, though I'd rather specify a (possibly rough) number of > files, and > > (length (directory-files DIR nil nil t)) > > isn't that slow -- it's all the filtering and fontification done by > ido that slows things down. For a local file system that is true -- but I have some directories which have +25000 files, and in those your code takes a few seconds to execute. But it would make sense to use the above as an alternative or alternative for e.g. windoze... I'll think about it! > FWIW, on Darwin the second element of > file-attributes seems to be the number of files. Weird. Could you debug that? -- Kim F. Storm http://www.cua.dk