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: Mon, 19 Oct 2020 00:21:58 +0200 Message-ID: References: <83y2ka18t7.fsf@gnu.org> <87y2kaj799.fsf@gmx.de> <83blh60wgr.fsf@gnu.org> <87h7qxjh7g.fsf@gmx.de> <878sc8kgy8.fsf@gmx.de> <87imbcls71.fsf@gmx.de> <83eem0zt0b.fsf@gnu.org> <87k0vsrd6m.fsf@gmx.de> <83a6wozs7h.fsf@gnu.org> <87sgafq2e2.fsf@gmx.de> <87h7qvptm3.fsf@gmx.de> <871rhxp8we.fsf@gmx.de> <87k0vnoio5.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="21652"; 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 Mon Oct 19 00:22:40 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 1kUH4Z-0005XF-DG for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Oct 2020 00:22:39 +0200 Original-Received: from localhost ([::1]:58206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUH4Y-0007Jl-EO for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Oct 2020 18:22:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUH41-0006uF-OR for emacs-devel@gnu.org; Sun, 18 Oct 2020 18:22:05 -0400 Original-Received: from mail-oln040092073089.outbound.protection.outlook.com ([40.92.73.89]:23374 helo=EUR04-HE1-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 1kUH3z-0005MZ-Eh; Sun, 18 Oct 2020 18:22:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PKvuTexblxM51yXWekJSDHcwXfrG8b9Li2VOewN/Y/MHmsOqvp2W1U8KBqy4h+5xdMgNNsBuXFt7YtMIjJs1F8LVnPmSXHpcy4B0+KeZFptnolUyt5s7mDUNDSCORlQvRpNgrFS+r2qT2rxKg2lAJTIkdUYZlcw7/aq0Px6Za0Bcn9qK40ja2P/21uj75fcoOAtdl+3+4R9Zq2m1Oif/FM80SHc5DqvrvGHkeb67Mn8eePX2z+0QHUxdPWcDAPp+rHN2RRZ4FFrzQSIp9Q2t+pXQfjEzc/FF9dOfnLBGrWrLvIxs3aY6zJD3yvqYwGMbnmQvVspY7Z5Dun5SiOTHBQ== 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=ng5/eRs1ATaDLcKyYkRJnJinWjyBiSozSbuX8gEsRHM=; b=ShOfDin3w5DlAbteqLsCM5FAcleihTtH8yDnZDxcB5ieg/tTGnZRXi+gMnVb+HocpskbVUpTZKA50AmeUHCthDKH6SNw2Ef7lIim+GgphG0TdQHGCpZ9ojwlf9aGB2ATjokRgtcPazkY/I2N42qmpQAaYVVNPnyF+nV7j7THwjq3zqqPYSyYv4tQb0G9yqHRE6ApLmup5GLZ/rNRLsVrQiFVIfUTbLbC6Le33QMSch4UMuhPO7UpbOjoAULrULgqPuqjEDoSXgzjh7tj5UIUH7ODKiClUkoBH0+kK9HKDkB/ED3POTUBnqXhMdH+zGUv/J991HsNs2oAy6tPBhDhzw== 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=ng5/eRs1ATaDLcKyYkRJnJinWjyBiSozSbuX8gEsRHM=; b=moK2ja34RZ6PW0u8oBTlfP43pLRpper0vZESPaMsjQWGeog9dQn3laa+o1QFEF9biYCfG2cRT+UKXytpy3A4oMnNfq1kg+M6Bl+no1It5hiOmIpEe7dYztwJk2UTj9pj8yWfYs6SF7N3D+Zc+ISa6LF5uDlhMixNH+23eFGXf9LwdlMKKYtxsaoo9QUh9KvVXCj+TGjOAOpREqlFB5QtOJ2S/OKiopAIXxUxkSWhYtcDyxJCIlgssJnCDfvKN73amYiuSm+IdcqvCnBn95/IPiFE+F19M9xcW/87mxuj5YkFdWfdItonyIAH0YWxIsVp0P82yr/ataFwlSuwH4e+hg== Original-Received: from VI1EUR04FT026.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::48) by VI1EUR04HT211.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::457) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.23; Sun, 18 Oct 2020 22:22:00 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0e::4b) by VI1EUR04FT026.mail.protection.outlook.com (2a01:111:e400:7e0e::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.23 via Frontend Transport; Sun, 18 Oct 2020 22:22:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:5BF251151BB643A7D35921FADB843C02A4DFDC0AC5998A7B2E27B222F435F10E; UpperCasedChecksum:A512FC83DE759F47596BA80E9DB91EC510E54C0D13FA86CB47615AC4EC232B03; SizeAsReceived:8364; Count:46 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::187b:196a:cb2d:adf1]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::187b:196a:cb2d:adf1%5]) with mapi id 15.20.3477.028; Sun, 18 Oct 2020 22:22:00 +0000 In-Reply-To: <87k0vnoio5.fsf@gmx.de> (Michael Albinus's message of "Sun, 18 Oct 2020 13:52:26 +0200") X-TMN: [igsgPDRWyPaCxT/gPyv/VWCCQ5mFV5nI] X-ClientProxiedBy: AM5PR0601CA0056.eurprd06.prod.outlook.com (2603:10a6:206::21) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <871rhvrx89.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM5PR0601CA0056.eurprd06.prod.outlook.com (2603:10a6:206::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22 via Frontend Transport; Sun, 18 Oct 2020 22:21:58 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8a6d0259-3db8-4fdf-b083-08d873b43ac7 X-MS-TrafficTypeDiagnostic: VI1EUR04HT211: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eJi25+nkSFLFwmDY6O3nJIpOHSwHjHW7J2e159QQn8LUMtNFx8Z33jzSbVhqY8TWAeF3Wj+mEOnzGnomPG7hFu6iPiPzkgLBNdK18IGhjaYULGrOqfX0SwBu1tJKtt5BN6rSJQr41TsPTttDKXRHQxJjshIc9tZ30E27F1Q6VKmpMC8D6gJRYq5RJD3NwcXdvoEzmYUrAonhyTfJJLa8uQ== X-MS-Exchange-AntiSpam-MessageData: 88fCpLjyrkrv1q1aIqavQ6IavKsbPDmRvdOHFaDHVY7iOCZ/QTX/nPNrh3sgksKmi0GAhUCvTUAerPmGoZbWbU52XbWMc1OKmyesEdUPQ98pQLwCG4A/5ySGmrQUYD4TEZmZTjaYz0oFH43Qyf9K6w== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a6d0259-3db8-4fdf-b083-08d873b43ac7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2020 22:21:59.9812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR04FT026.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: VI1EUR04HT211 Received-SPF: pass client-ip=40.92.73.89; envelope-from=arthur.miller@live.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 18:22:00 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:258071 Archived-At: Michael Albinus writes: > What's wrong using FIXNATP and XFIXNAT everywhere? If we return nil for 0 count, then it make sense to return nil for negative count too? XFIXNAT will turn it negative num into some big int. I thought first it is fine, but after second thought I don't think it is best thing to do. if (FIXNUMP(return_count)) { last = XFIXNUM(return_count); if (last < 1) return Qnil; } This works better. Negative bignums end up also as big unsigneds which results with all file namess returned, but I don't know if it matters. Correct me if I am wrong. >> --- a/lisp/net/tramp-adb.el >> +++ b/lisp/net/tramp-adb.el >> @@ -312,7 +312,7 @@ tramp-adb-handle-directory-files-and-attributes >> (copy-tree >> (with-tramp-file-property >> v localname (format "directory-files-and-attributes-%s-%s-%s-%s" >> - full match id-format nosort) >> + full match id-format nosort count) I did that first, but then decided to skip count in format and forgot to delete the count from the argument list. I didn't know how format was used so I didn't want to mess with it; but if it is only for the name, then it is maybe useful? >> diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el >> index 6d44ad23ad..a99af70196 100644 >> --- a/lisp/net/tramp.el >> +++ b/lisp/net/tramp.el >> +(defun tramp-handle-directory-files (directory &optional full match >> + nosort count) > > This fits into one line (80 chars). It is 81 chars so Emacs breaks the line. I can call it num, saves 2 chars. I have fixed identation and docs; as well as other stuff you pointed out. I can send patch when I get answers to questions above. Best regards; sorry for giving you so much work! /a