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 17:07:18 +0200 Message-ID: References: <83y2ka18t7.fsf@gnu.org> <87y2kaj799.fsf@gmx.de> <83blh60wgr.fsf@gnu.org> <87h7qxjh7g.fsf@gmx.de> <878sc8kgy8.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="20296"; 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 17:24:59 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 1kSieA-00057Z-UD for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 17:24:59 +0200 Original-Received: from localhost ([::1]:45956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSie9-0004Wr-Uw for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 11:24:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSiNB-0003Z8-PZ for emacs-devel@gnu.org; Wed, 14 Oct 2020 11:07:25 -0400 Original-Received: from mail-am7eur06olkn2018.outbound.protection.outlook.com ([40.92.16.18]:55137 helo=EUR06-AM7-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 1kSiN9-0002Sr-D6; Wed, 14 Oct 2020 11:07:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nbg9zVoknnSb86p4+/kOacSCIlcl/5KUWu0xwJMAoH6N+AE7mLNwX8/B6Op/ywlPeoHafUmHyC+woskUoRzc0Ql1kaHcRUGLiHdq7NWKaluLZMZ6gQGAC4G9fOkapLsOWpfp/1iT+VoY2VGS9zbwMzlYTs9LG1xoVvFEAGBgl45nkpRzqe4c6dvmk+LiFlomUu+sBm6iZ8I+w4ZRvXf0s3pPqYipvN2t1fwKPIR0NUqQgrm/omqI9d4mRZecABMrBwsd8r6BqSfu3T6xnpAwHsyFp+mo44F5hGu9HpW6n9OeN+e2NkywGq1pgS/crNmoO5XMfRrgTBFhwOgqnCI8Vg== 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=W0bzNTFkyT5ruf3m0UNvlwKb0Sz7epvT8dy/QbznDQw=; b=N90PgHF/wEMVG7pidLF9U5tFx0YXv4qeg0alOnNOOX2ighGjCM+SKjdw5hqkD/MxbVU0qgO8yZ/NZ5uvQmbrsVhnE98E0eQ/4IgspT5hSL/YzplFDgW/F2pgmxlmcA5mUmB/tAYeGCtY7hzqO/jXQFCBlSztlKfvSyqil0So1dvKC6OTIwr3brvC4UR2MREJUmt+vmnHG6+xVJOXLXtyYsScc000TfbcEkqxCkSv0jZ9DBBgAAWOUFROnNZCDrhwHzS1wsnEyGJKLrepoRe/XPw7crMU8A7NU/mTQVOSE2Z0dj9uwaNDNT5hCK2YbgskeVozqVZXfWpCkVq4cDKR5g== 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=W0bzNTFkyT5ruf3m0UNvlwKb0Sz7epvT8dy/QbznDQw=; b=hi2GsVcuHVVpQMjOtu7W8EG2IvyaL5tC0fN2izONWKIIm27GfKplbhHz7a3/3VJhrFyzNMogAx80Nc4+i+kzyWjp4LdJXONQiC7ixtL+r7JRiv84djrQnrgQyGTGFHdt1ApO+WMjo3QB6d0PmnpYk+pe07KjETYjf+7QVs8PQvm3/f6duzeMxeh3OG/ySPCxuf7Nhy3LLkJVWVqKr9449bHm4RqZsho4voX4nuno/RQF0jH3qZ/3W8M9fy6AexrcEwtN8io50COlzQFLwVckuWBvH3HMNecdeVCu5KxkiqF64/IlWCdPInA3c4cv2+WNbzkGrFXeJ6JhqKLBRBedxg== Original-Received: from DB8EUR06FT049.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::45) by DB8EUR06HT222.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::81) 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 15:07:20 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:fc35::4c) by DB8EUR06FT049.mail.protection.outlook.com (2a01:111:e400:fc35::84) 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 15:07:20 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C7916460CBDB9476362B346B31BFC3956A730F77E8ADA7C3B42978D36F92BC3D; UpperCasedChecksum:739F033A006C8D0686704FD9C13C2FA477FEBC50891C167BD3501F1F299714CC; SizeAsReceived:7769; 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 15:07:20 +0000 In-Reply-To: <878sc8kgy8.fsf@gmx.de> (Michael Albinus's message of "Wed, 14 Oct 2020 16:41:51 +0200") X-TMN: [MWbG5VfHf1rNgPyLwD7PtGf1U/rtW0As] X-ClientProxiedBy: AM6PR10CA0046.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::23) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87a6woyhg9.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR10CA0046.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::23) 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 15:07:19 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 31affeeb-90fe-4a8b-fc05-08d87052d8ad X-MS-TrafficTypeDiagnostic: DB8EUR06HT222: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aBttj7zUMcBIK5Sw2GUkASxt7EJCqvX5Fg98QIJRKXpTXPlQRM9YOijoH89X8UDZSknDXjQGvWEe4N+qfgL9TM+eA7yCHi38xaoO5Jp/L104BTzbYr/k/8EcGqAH7G5r/FszzE5ZuB/375ysPKUDjAbuplSqLjbGERtMtxLrsH+qOZ74Dj4Nl5H1UQtdz+GigAXYJaFfUVtXtj5Z7dlaow== X-MS-Exchange-AntiSpam-MessageData: F8mjwf0TqhyG/W1zRmggZw3h+RzG6fNsZAUg1iD3WXN/L50F7JEbbRKFtHKksabdQjiCF8U1OCrqRy/em4m7xds63AVluCawkOdNvBNYdON7taUShZ0TX13GXA9Mws1T4keNQku7womd8jgCnWLxAw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31affeeb-90fe-4a8b-fc05-08d87052d8ad X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2020 15:07:20.1583 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT049.eop-eur06.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: DB8EUR06HT222 Received-SPF: pass client-ip=40.92.16.18; envelope-from=arthur.miller@live.com; helo=EUR06-AM7-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 11:07:20 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:257649 Archived-At: Michael Albinus writes: > Arthur Miller writes: > > Hi Arthur, > >>>>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. >>> >> What about return the length, number of the files in that case? > > No, this would be another signature of the response (number instead of > list of strings). > >> 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. > > I cannot imagine that this information is needed somewhere. Why do you > need to know, how many files are in a directory? > > Berst regards, Michael. No idea :-). It was just to test if empty; but now empty is better served with asking just for one file and testing for null; and I was also thinking what to do with 0 count if asked for after I sent patch yesterday; it seemed like a bit more useful then just return nil early. I can send tomorrow one that just returns nil and exits.