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 20:32:59 +0200 Message-ID: References: <87r1q2mu4t.fsf@gmx.de> <87d01ml0zd.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="39329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 13 20:34:22 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 1kSP7s-000A3Z-FE for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 20:34:20 +0200 Original-Received: from localhost ([::1]:32868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSP7r-0005Ku-Ij for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Oct 2020 14:34:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSP6k-0004tZ-AF for emacs-devel@gnu.org; Tue, 13 Oct 2020 14:33:11 -0400 Original-Received: from mail-oln040092073011.outbound.protection.outlook.com ([40.92.73.11]:58535 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 1kSP6f-0001NA-He for emacs-devel@gnu.org; Tue, 13 Oct 2020 14:33:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bPkYu42+jlhg5CVK4VflKmEaS6akbY7X+Ch0NAm88oU9gY16vUM5pQ8CKEld6SL8VdanqLGzZCEko+yCSLez2UzZZMHlFfoY6KviK5EagbmKkkGCnO/ysuosmZfPSlJ0etWYVtdM+gnU1QyoGXa8K6IkoJ4L7f/xOAKUF9SPC4Y7OPEIJQJtb6q1NXbeSYaBVEqYyimcQpZ4q9EeJhO9Zkh8xd/pCzXpIcSBQ4Qi13ZD9YXLt9VkYGXEdNj2nMQ0HbnbJtJTeJqdIf+mEvTuGmTxpnX/xGZgIbxAUAXitWS/CHrqr3RbS6wccm9vskt14hq3rEnFNVboRlaDIKeyHA== 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=4w35jFDr+CTW5dQm9JywSjdyoK910m7eHOs1ehkQtVk=; b=MRFIJG+pJWl75r7CAGV+PfGf9RlMz27NWpqCcb8Xq/xokkkKNnZStJeh0D946ne+BbQ7BpOQwd/VWumguCTO36javIbUfgNlXIg6xWXdvClJvyzX8zU3g3ogrPw2NVbqAqJWS99b9s/I4nlA2u1J3mZY/m0Uuxn529gH+juthrm5As5x4LajUUHWep663yPbqT/hHQJx95M6SlAMUvDZBFcRcechpSNMRNAqiRfHyu/2kfq/w1hYkeD3viY8cNNCZciEGRoirSm1oPTB2FdMXBUtfMwm0XaMqhaVNdVHjeU+HtxZD2TBL+C5kvw4b/V0rgNrqMC2RJfvdESPjKJOBw== 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=4w35jFDr+CTW5dQm9JywSjdyoK910m7eHOs1ehkQtVk=; b=dfK+MUzBEf7ehEUU9VNwp8Rk9gVG653Otkb2RlNzHVtT+WJ+yjRdgCJln+N52HJDIwSv9g4OXWhcXlzAh+vLM4pO0/xrITl5liaBV64tupeFMP/N3fsc9tXeG45UFAoBOpyUMYxaJz6GvaY/DpTblKrBNgtxgfQ9SheuEmKrJ/nvlTRWEMnh8/ffa1RsR8rn+KrtY8nWWDLiqJ0BjPub8XxUH3BETk4z5YvB+GdDf/SZyKcNNuvUNOPX8jSRgiKBptL2n0e1Ka8PUMJHI/y+GT0+6g1BrSp5X/14vIQnPhvcOX9zmTsS+8PDlgY6xTlwCVVy6SwVbdI/6wcy3bKxUw== Original-Received: from VI1EUR04FT015.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::43) by VI1EUR04HT214.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::340) 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 18:33:01 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0e::52) by VI1EUR04FT015.mail.protection.outlook.com (2a01:111:e400:7e0e::148) 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 18:33:01 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F80FFEBFCCCCF8762C9E116ADE0DD3BEA6C526EDC5522BFED2371A03FF77574D; UpperCasedChecksum:978BCF72A2C280CF1B41FAA3B49D4B1432853CA00E0FB94D5244CA46BB51B6B4; SizeAsReceived:7582; 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 18:33:01 +0000 In-Reply-To: <87d01ml0zd.fsf@gmx.de> (Michael Albinus's message of "Tue, 13 Oct 2020 15:16:54 +0200") X-TMN: [wyEyKNci2aXr/PV92Wjid5jxDJMBnZoV] X-ClientProxiedBy: AM7PR04CA0015.eurprd04.prod.outlook.com (2603:10a6:20b:110::25) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87d01mc6xw.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM7PR04CA0015.eurprd04.prod.outlook.com (2603:10a6:20b:110::25) 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 18:33:00 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5b9ec79c-9b73-4d9c-c279-08d86fa66a39 X-MS-TrafficTypeDiagnostic: VI1EUR04HT214: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nQhLEvdJ75fu2XTJSeDsKPyXaYS5JURaJSaoVgkeCirTDdPCPe90dsXX7gbvaKKD26FgidQSh7eMEd62OlN0r6nIB0ZYOaPpudhBW1tEkMlmYVausd14Hu/A79Ppkge5wxjLggpTt/J8zNEkGADV1WhWBc0nFwINcTwwEvNVXis02PlCWI9wRYgMHW36IFwo41cMySnDCnPPIgO+JNDDnw== X-MS-Exchange-AntiSpam-MessageData: p4IHCb6dtFLIcA1GR/86P2zWLbqIc8U0g5X5ETKF84GVhAE9tZ/ERAGV9e8ZUEQgnjv27qi+EPYuuU2zjmh22qvUgn9ugNPeRdRNlxYkEXaX8RkNGkfCDy0cfrkGvBAlKGqFj3T347iXFfiaKA3+Mg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b9ec79c-9b73-4d9c-c279-08d86fa66a39 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2020 18:33:01.8744 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR04FT015.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: VI1EUR04HT214 Received-SPF: pass client-ip=40.92.73.11; 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/13 14:33:02 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:257550 Archived-At: Michael Albinus writes: > Arthur Miller writes: > > Hi Arthur, > >> I have seen in the source code calls to Ffind_file_handler, and have >> been looking at the function in fileio.c, but I didn't figured out what >> it really does, so I didn't use it. I tested without and it worked fine >> :-). Anyway, I have added it now, but I am not sure if I using it >> correctly, since I am not sure what it does. > > Looks good. > > Simplified spoken, this code makes Tramp work. If you call for example > (directory-empty-p "/sudo::/") , find-file-name-handler (the ELisp > equivalent to Ffind_file_name_handler) checks, whether Tramp feels > responsible for this directory name, and it calls Tramp's function in > case. > > You know, that your function cannot handle "/sudo::/". :-) Actually I forgott that part completely. >> By the way, what are "special constructs" referred to in the comment? > > Tramp file name syntax here. See (info "(elisp) Magic File Names") > Thank you very much for kind explanation; I have read the info now, and I understand it now. Not sure that I know how to implement it though, but it does not matter; Eli's suggestion seems even better; I think.