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: Wed, 14 Oct 2020 15:56:36 +0200 Message-ID: References: <83y2ka18t7.fsf@gnu.org> <87y2kaj799.fsf@gmx.de> <83blh60wgr.fsf@gnu.org> <87h7qxjh7g.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5475"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 14 16:04:11 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 1kShNy-0001Bm-KQ for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 16:04:10 +0200 Original-Received: from localhost ([::1]:49166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kShNx-0007nF-EE for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 10:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kShGn-0008Ql-Vq for emacs-devel@gnu.org; Wed, 14 Oct 2020 09:56:46 -0400 Original-Received: from mail-oln040092067057.outbound.protection.outlook.com ([40.92.67.57]:29061 helo=EUR02-AM5-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 1kShGi-00018E-LT; Wed, 14 Oct 2020 09:56:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a3CxQLbr+dtbbrsfEa/xXZQ7T7rAfnKjEJ2H9FBNjHDMxPVh6ooG4n9VlRkrG0i8jFO2DagX66DQlzjiWrWZoF3vNCzvfGlcXK9EMvjwr+ske9fosjyCJzmkUVilJUBEBoOfT9siUfyOiaP0uEqSAf1cBn/GkOuXES9WrCpECOH80ue+Aj0I1zOuHcyl8lcg8LRx71HKBVtgqQRKPKqiB5v0ars4ztwGoqlVCRN7D/yfw0ixSy8MDi7b0qbCCVXNKf9hAM/GGvucEqvpetETOv4sqJyBhBUUB6KiOlW8nNjpiqeJeGAFFjBgtqZ7rNf4td8JrO9xznXCj68Tnz4j4g== 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=jhZaEfqqfas2nwX51JgUx/Kg7KNXErEBdY0WsO/fjxQ=; b=jcgW/Lvq1X4D8RiVa3RoKlaGakcYXmG8Z4pWdIwbR2M7+rRSFpOHh/ratU5mRWL0rCn71M3nFLcKdUccFfV6WASGxJkPIesafMlFmVF5b7nR16Xc5eCLcKTFhgYEJTd9NK6gQVwRtAAgje2IZ5FICNK2YUBW2m8QBiyyVosyP1OGpL+on1gciWQR1o1L8np2G4IX9duu0I+jBpSQEprJgrP4WWMB4p/DYrpGWLiXgo9Zn8GomuQ+SJUj9mIugwkOvzyqJoWvX2Y/VpjHKD1szhHdy/o1JF8ce/vNIsE+bHfP+2MkKhFXudFegMZhdC+dSJN4SW/tdOSDDrOo1UqsUw== 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=jhZaEfqqfas2nwX51JgUx/Kg7KNXErEBdY0WsO/fjxQ=; b=mmy8maHehh3GdrPL00IxCLBj1/cUcUU2M3yDPryV7tXP1tVDWGhvGwtAYRDypiMIZS1aXJCBehQhKtBnhaHH/sqG+oYwFACrO29RVfOPbC4CNAexCEwauMIZOxd/+lKJjL673XagZeAd/a17Sy580vb6DmuP81DkgIg2azFp0f6NhHFQ/DDcBUy7YF6dzqn0Fa0gTbStv8LXLsRxk3yJVFuvPt9au82fU2uFaJOVuv4grFJUfqu/aM0eJnoEnis9ozH11lwTVYcWQLgub73FfMNM/u6qCgZb1o2Y7toPFRORsUXvS86SHJQe62GsKLmBCb8AOkkkwJd/zb9PNKZ2hQ== Original-Received: from HE1EUR02FT005.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::52) by HE1EUR02HT111.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::489) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Wed, 14 Oct 2020 13:56:37 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e1d::4f) by HE1EUR02FT005.mail.protection.outlook.com (2a01:111:e400:7e1d::99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Wed, 14 Oct 2020 13:56:37 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0CD622926E52A376B746F3CB61C2AF2E30B7A734A9535CFBA81DD8D5398B5507; UpperCasedChecksum:CA010AC31CA28572ED92B511899C94159182A5992D8D16E94774A1F2F2B391A4; SizeAsReceived:7661; 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; Wed, 14 Oct 2020 13:56:37 +0000 In-Reply-To: <87h7qxjh7g.fsf@gmx.de> (Michael Albinus's message of "Wed, 14 Oct 2020 11:21:39 +0200") X-TMN: [mrrfjCGGhbiSoymh0spE3j1+szR8/afO] X-ClientProxiedBy: AM6PR04CA0030.eurprd04.prod.outlook.com (2603:10a6:20b:92::43) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87r1q0ykq3.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR04CA0030.eurprd04.prod.outlook.com (2603:10a6:20b:92::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23 via Frontend Transport; Wed, 14 Oct 2020 13:56:36 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8047bbd2-e61c-46f4-6dff-08d87048f7dd X-MS-TrafficTypeDiagnostic: HE1EUR02HT111: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XYrpCrVR/v+gV5otNl1Te8NEFr44nkrmN1D0uOGSBoa/nkLcFPHd82xqkYbrLiBsdWFTpOckfEhlj9D71e8nTAETApC6XevG1thgMPpnYOxUBYyvFmjtSdtDl8gvbsBYciXUkQxdVU36Eb69FlmWNuCtGzEFk4C6UYQUB8d3zqugCwCPogCU0G8ZJoElKByK3+CMSAx5z9ajByoJq5v8Mw== X-MS-Exchange-AntiSpam-MessageData: lDMee4C7HgJGfkkXAF6xuRhVgYGyXnBjJj+7spYaM+v18pY0g8dGxEjPGcOU6RM1GhTqZlke1hD8ecCufAHY3NPLRTd3oGNm2YT3qquco83y8KnyVEupzpG64ZPSqSKBdWEvRLq0y9K1CQb44Uog/w== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8047bbd2-e61c-46f4-6dff-08d87048f7dd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2020 13:56:37.5763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT005.eop-EUR02.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: HE1EUR02HT111 Received-SPF: pass client-ip=40.92.67.57; envelope-from=arthur.miller@live.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 09:56:38 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:257629 Archived-At: Michael Albinus writes: > Arthur Miller writes: > > Hi Arthur, > >> The only thing I am not sure about is how to deal with 0 count; I >> mean if user explicitly ask for 0 count; the case when count is not >> NILP. > >>I have chosen not to deal with it all, I check for zer set >> explicit limit for count to be [1,COUNT]. I am not sure if that is best >> thing to do; maybe just to return Qnil? I am probably doing something >> else wrong, advice apprecaiated. > > Returning Qnil seems to be OK, when count is 0. > > Best regards, Michael. What about return the length, number of the files in that case? In order to get number of the files currently we would get list of files and get length of the list afterwards; if we asked to get 0 files, it could return the length; I thought of it afterwards.