From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: dired and ls Date: Fri, 19 Feb 2016 22:19:58 -0800 Message-ID: References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <87mvqvewk6.fsf_-_@gnus.org> Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455949230 26000 80.91.229.3 (20 Feb 2016 06:20:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 06:20:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 20 07:20:23 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aX0ty-0000d0-I0 for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 07:20:22 +0100 Original-Received: from localhost ([::1]:58519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0tx-0007An-Pc for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 01:20:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0tk-00079H-LC for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:20:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX0tf-000881-74 for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:20:08 -0500 Original-Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:36279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX0te-00087q-Hj for emacs-devel@gnu.org; Sat, 20 Feb 2016 01:20:03 -0500 Original-Received: by mail-pa0-x22c.google.com with SMTP id yy13so61895861pab.3 for ; Fri, 19 Feb 2016 22:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mail-followup-to:mime-version:content-type; bh=RbllykweDfDTAN0R+sQrQk7K7P50ftgS4m0LcH5no+4=; b=Vyv9SWvXTu9fg8hJXefSKuF3IUjJQD6XLgh4HLEKBomk87zIbFRwUSWoDOToD50jbr 9ZpkuyJjDFqnpzjsw0BKMqOO9/ROvwAzj0FifqHQkvoutOK9W7FHgb0SkpCGxWzw20ej ByVVJr6B+3aZg7WGhapRDaOH4xjuOxDcJzTxkOMwHXdpOwHuqurbfaMtZEjqEimcve9t GZYmmiCHoLxg2XslYV2WnRMm1o/GEIyyOCPJAoXdMtL+ISzclpj8DuugpvKzFApxikAR T1O9EBEiUJhlHgSIkA3GF2DbWPfGWKc1Ji/RHSS+GPU1ppA4KRYV9Y1s9n0lK9hRFpFv Clrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=RbllykweDfDTAN0R+sQrQk7K7P50ftgS4m0LcH5no+4=; b=G+bEQhqpIF7jfRJyBhBzfRo4FaPhINEVeSzD+zmib0tHRcUVciJwTGbMFSWufPfkyC 3hJmBQ7oiwoc9iNnKFDAH4lzY47NZfbtaxI17Qoo0EQnrt+QMsGk5XhiaWuNNWNGqwI+ L3yvTZmt7gCn7nHqrMQcAlYajWaZ+g6i0+obRAsC+dzsjhTpsdCKcUhWWlEdkscieKjs pnM5CBNyBRJGbSgjLPTuiGrs6BjBIKXUSJ+cLnWAP4/oMWTf9t6j0RgPMowFKtd9pi4u p96TfBCpmUKZXvXveWYXa/9wm8wYnEmXCqTPyRuYbDdq3KHXou5ZHDZ2LTpAdX6WgT8+ hAHg== X-Gm-Message-State: AG10YOT9zuCrwqwnDzAtx0H85mVhLonEBv/fYijSVZpoxz9eczGnrhRSEqw45LVjk3TgLA== X-Received: by 10.66.147.164 with SMTP id tl4mr23006325pab.40.1455949201790; Fri, 19 Feb 2016 22:20:01 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id fa3sm21848288pab.45.2016.02.19.22.20.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 22:20:00 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 32B41130DB4D3; Fri, 19 Feb 2016 22:20:00 -0800 (PST) In-Reply-To: <87mvqvewk6.fsf_-_@gnus.org> (Lars Ingebrigtsen's message of "Sat, 20 Feb 2016 17:16:09 +1100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Lars Ingebrigtsen , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200275 Archived-At: >>>>> Lars Ingebrigtsen writes: > If we instead had `directory-files-with-attributes' in C, we could just do > what "ls" does, which is... opening the directory, reading it, and then > statting all the files. (I just straced "ls -l".) So it should be just as > fast? I think? And if you have your dired set up not to show ownership, date > or file permissions, you don't even have to stat anything on Linux/BSD -- > the d_type says whether something is a file or a directory directly. The /bin/ls process is asynchronous, so a really long "ls -R" listing doesn't need to block Emacs, does it? > Hm... and there are a lot of functions in Emacs that only wants to know the > file name and whether it's a directory or not... I mean, basically every > file prompting function only needs that info... Are you also suggesting another improvement (Rubs hands expectantly)? Or does this follow from the above, in which case I missed the implication... -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2