From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: empty-directory predicate, native implementation Date: Tue, 13 Oct 2020 22:08:33 +0200 Message-ID: References: <83y2ka18t7.fsf@gnu.org> <87y2kaj799.fsf@gmx.de> <83blh60wgr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20804"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Albinus , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 13 22:09:18 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSQbl-0005Gn-Jv for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 22:09:17 +0200 Original-Received: from localhost ([::1]:56912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSQbk-0005b6-J8 for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 16:09:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSQbA-000569-TX for emacs-devel@gnu.org; Tue, 13 Oct 2020 16:08:40 -0400 Original-Received: from mail-oln040092075081.outbound.protection.outlook.com ([40.92.75.81]:53485 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSQb8-0005YN-Nu; Tue, 13 Oct 2020 16:08:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c4R7hG3qmW1RQdbQwBBtt2uKHP+z4EobjFUGv/q1PQ2wZVZOsDfJRTShHPVsgj4G8iWzQ8paafALwX0/dwXuXb3fpAiI4HtzdkgNUgTAa/bP16WUjMWUujGd/J6eNQ2k1/FbREZsQ6PG8fffkrd+XcOa5xK0eI/IiDrZowaVuwibGDxR9f0sq5xrVc0ssfX3er9N2jBfBNezEGwmeoDWxn0RKDYC7pKm12RC6k+3+nCagFBpyKX+3nCIVaFXWZdUlK8FWzQ+Oee/FF/7DL+/PxkapMt2uFrdXzZuwb73H787E2seiCkXnLaKcStcS25Cb89968yYOellASAubpFKig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xgj5OScLljaPi9qmWXFtvBmRuVQKiISUvbDGVzGY1yE=; b=cpRFIXLHF3EIOUVgU+Kf1GaTdkvYplPf1/PvDySt8rWOf2vNyA3+DAYuZrYMN1kgmYqTITz1rCoPDc919fH6bOFXnXtZEX+oBR/HG1vipUwF+535dFlV14BJ2xM0G0T8zMIOhCAJHIoYRnLgZe0SlKq8k675OtDDGQwFm8yhukU+zN47SNZIuCtAvMs/k8XUQDTOYvd3qnQufzSGK/XrZJs52KzxgMXcw5y1KfKzWAsTC4+gS3Zpcat2e4PZfcp6W4ectU5F0iR3k3nHfI8NetstxC33oYCNsL2JowPXE1tUWioQKZcyLplkUJUIwZyOjKbXKC4nXg2q5r6O+/chdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xgj5OScLljaPi9qmWXFtvBmRuVQKiISUvbDGVzGY1yE=; b=fc8/Q2tbZEhuHM4qYYuP8Ve9fF/KryHNJGlR75hTDdraVrgRQoR90idWpYawiIrkPySyrV6Mharf+4gGTQz/U9zHzgm+bI8BGe6ueeaWLmFFp9gczr/OdTWKeDhwhYtdAeBuBgXmooUj80RcIJylHngFQX5j7dXOqeHLccjbPT1VAhWiL58TXVgSs6pRaY1eCpPuWZhdwmefzsyEWGMm+ytjie+pHDR4Oek6Bzw29wRsyV8zPSsm2ypsSomRVrXLXM1vEPz1oWdisvoY6J6Kt955mMyj+f71VUpPFA/JMOrl5fv5RzgJ4sLLVBpsd2oZQL0g1jGX1+aFQH3v1QUWXw== Original-Received: from HE1EUR04FT038.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::44) by HE1EUR04HT061.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::329) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Tue, 13 Oct 2020 20:08:35 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::4c) by HE1EUR04FT038.mail.protection.outlook.com (2a01:111:e400:7e0d::189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23 via Frontend Transport; Tue, 13 Oct 2020 20:08:35 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C662441522E24B3A50292797BCDBA2665F7407E3BF69B40ACB1CD77D640158B6; UpperCasedChecksum:2082D038C8F8E633D2CCB08E173377E97DC6141F94F0131864E93CDBBB9CC534; SizeAsReceived:7551; Count:46 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487%7]) with mapi id 15.20.3455.031; Tue, 13 Oct 2020 20:08:35 +0000 In-Reply-To: <83blh60wgr.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Oct 2020 22:14:44 +0300") X-TMN: [c+XTJeS5vL7sNuZBEhBnD4BxzHukBd3e] X-ClientProxiedBy: AM6PR10CA0054.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::31) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87wnztc2im.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR10CA0054.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Tue, 13 Oct 2020 20:08:34 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5382fe84-e599-451a-b0e1-08d86fb3c407 X-MS-TrafficTypeDiagnostic: HE1EUR04HT061: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +XHP4WXzh9w10K7YWifgGDCiRAzOLE0rU613q+UknWJ4FKhMX7t2J2etG78IWoEiGS/zlIvnqQq7nzB7RBzqaRO3PEWWFn1h/TWceix4Gh5Ka9w2xBUGzV0hWn2MKFNgjD39a4JisFNsbiqyO9kgA/EydX+y5DyLhJnAde8bQraOyqE875wZFou2lU4Ah3+x3OHrVj5jdpaE1BoXq7zU5gMBA2hhjW60uukmzH5PW7AyGtzUj2BgOhT3HPMmRH1Q X-MS-Exchange-AntiSpam-MessageData: u/NVadrv1jvHrthY1QzwAmBXuRZH8daAQ8kGnZyzr9QO+W6ePYNNv0kyBzzjNNFOFDEV0lGqMGVbXAaP0HaJcl3YP8sAYt4bqO5KUhh+8miu2++kh/ccLwVC79WcwZEPsbPkwmLEWENU0BQOScTluw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5382fe84-e599-451a-b0e1-08d86fb3c407 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2020 20:08:35.4710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT038.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT061 Received-SPF: pass client-ip=40.92.75.81; envelope-from=arthur.miller@live.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/13 16:08:36 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257575 Archived-At: Eli Zaretskii writes: >> From: Michael Albinus >> Cc: Arthur Miller , emacs-devel@gnu.org >> Date: Tue, 13 Oct 2020 20:44:18 +0200 >> >> > As a bonus, we will be able to return the file names we read, not just >> > ignore them. >> >> I agree with your proposal. However, I don't see why it is a bonus to >> know which file names have read already, because they are taken in >> random order. > > The order depends on the filesystem. For example, MS-Windows > filesystems always report in alphabetic order. > Not that it is important, just as a note: I looked up today msdn while I was playing with this, they mention that order is not guarantueed at all; FAT systems will returned file in order they are written on disk, while on NTFS & CDFS they are usually returned in alphabetical order. I don't know why they say "usually" :-), but they do remark that any application should sort results if sorted order is important. https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findnextfilea >> I fail to see how does it help, whether a file name is returned >> under the first N matches, or not. > > Well, it is easy to disregard the names if they aren't needed. I am not sure of use-case, but it can be a bonus to get N number of files instead of all. If Elisp was used for scripting in some very large filesystems maybe? I don't know.