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: Dired C idea Date: Wed, 04 Aug 2021 10:50:19 +0200 Message-ID: References: <87sfzur4gi.fsf@gmx.de> <877dh5r4gd.fsf@gmx.de> <87tuk7q1mx.fsf@gmx.de> <87mtpypxd9.fsf@gmx.de> <875ywmjjw1.fsf@mykolab.com> <87bl6eqkj5.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38547"; 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: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 04 10:51:17 2021 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 1mBCcP-0009q3-6F for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Aug 2021 10:51:17 +0200 Original-Received: from localhost ([::1]:39542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBCcO-0001iv-7s for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Aug 2021 04:51:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBCbg-0000ts-4H for emacs-devel@gnu.org; Wed, 04 Aug 2021 04:50:32 -0400 Original-Received: from mail-vi1eur05olkn2027.outbound.protection.outlook.com ([40.92.90.27]:55264 helo=EUR05-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 1mBCbe-0000S1-9g for emacs-devel@gnu.org; Wed, 04 Aug 2021 04:50:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lqbVs/pm26yzUQgQNS+1ti+9pblzQdjpiuxwTu1aSKjgbwaE6lvK/UwprlTkK+i7lxIL2hCLKvMYSuq34aiPWylilJjjenZ0v8qOFbH3RoPoz043N3OX0FINebimntkjFp1zzF9JgUmJ6CiRIy3yK+O86J43Ar/idDEyPPpZyrwb7i9qbUfwSik9PefkX4N4IMHNJtVaiyvWlVKLmi34IzJf4bUquYbIsHueVJKr3d3B1RX0f4ByTW+AIJH20YeRgjrT4JNOMGOCRslIeGcU4ScimF0sYlcGFmy1ZHahVhMQ+uhZ3fTn90DyGVDTxJwwunFID7eoG333W9Ly2h2B/w== 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=RVJIsRYfKOgXkQZgq8XCurcyjV3rXsuVCVsAME0G018=; b=b9CrXQsJaQAXY2jOqBTBr1LsOWJSz3nzDFd0fa1iv1tcCRrOAvxSdx8R6JXk6e4NWBlXJWnyx+fX+q1l/GMKA5+TB3LAWC6V5fdB6SCHkRFkvUoBhCYYeQ9K2Q48etaxWMrK2nLOtTyZwbMNcq13fiE0sGYYkoCzqWDPfmx3S7mjUpVsNbqOJ2oCQ9aRJ814nPmml9oWKF79wNfGvGPreM8hBFDTB0TCDzFzIhNxfrwJXuEV+Cxfz9qkgRrvOW9R8jJ50hjG9z4UkL2vmNVSJyFoFUQnNpmxglWTZmnKrmjCdzIyW5EZuMKwiJGFjZj6HaL8Y5pcwuDVCj9FKy2now== 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=RVJIsRYfKOgXkQZgq8XCurcyjV3rXsuVCVsAME0G018=; b=PR1F9KDlhyqI+tDvgfLEdWEgCgZ4K0Usc9f0cz7dW5EWoQN2YANUXIHwALLtYtj3J88OaJDz994WIYY9hxeHIUK/BC1fB8XDPmTQF4jlEvVRowKm1KyhBRatEwrq7RgBJPwcltimCnStEnEkkgvsZfjkUeuLfK4khGffIdltAiJ483CJoSZV2JtpCboNaoARt6n0CyFKOIeva0IgFeI+gnm0irmM44NkU7CEHbS4GzE1A2yk951K75zNdQRJ0fUgvSJTk3t9Evfb6jVsupqHDtJWim/s90HXSEQsV9FKrkAmvwjpfLmAnWIlgLMcDiu0ypuWBLycTqyFB0NyNxTAlw== Original-Received: from DB8EUR05FT012.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::49) by DB8EUR05HT205.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::425) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Wed, 4 Aug 2021 08:50:26 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc0f::43) by DB8EUR05FT012.mail.protection.outlook.com (2a01:111:e400:fc0f::257) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Wed, 4 Aug 2021 08:50:26 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2956A9818782DB05EF4A38248EA0C20CBD283243D0664EA4DBCFCBE7D22A5DB9; UpperCasedChecksum:235BB253E26EE407A5F5E7B432DA6EA69C879D820A66256B79D7E0C5ED69A12F; SizeAsReceived:7616; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6558:f201:6d1a:3f39]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6558:f201:6d1a:3f39%2]) with mapi id 15.20.4394.016; Wed, 4 Aug 2021 08:50:20 +0000 In-Reply-To: <87bl6eqkj5.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 03 Aug 2021 14:35:10 -0700") X-TMN: [wpfmOP7uEAD0Vrj338Kkq9vLcrvHivX/] X-ClientProxiedBy: AM6PR10CA0077.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:8c::18) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87r1f9d25w.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6PR10CA0077.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:8c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16 via Frontend Transport; Wed, 4 Aug 2021 08:50:19 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 1db3398e-1e5d-43b5-34e7-08d95724e384 X-MS-TrafficTypeDiagnostic: DB8EUR05HT205: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CfZNCu7wl4AEXZzLFbbzXMvpgWpdS0RvamLmNtYhNq/TQxavyTvUoOZKsvwtTg+/s0jadY+S2aRf+y6/s/EhqXd550t4nLjnUhSNuRqwVaLJb6mCbIvDKAx6i0L0PWskTU/N6FJbW+yIfvoDLpEOVRHM67XHQpN0XtvxD1aeT1MxtqP2Bpg8LPxq7oQugwQu281LdppzMr1/qWXPjK/Pe2TVP1o+RVASrHFV7EzT1sDnjzk2uHQZkQ2MGzCPXSPmYUpBZ3QKvOYvU6Wkd1kDib06zNIr4zIeCwUy4hL859ErNGS2BrhOunhUPCpEc3yUDBklYnM0MwP2FFqebeQgOCA9E2cFoah9hmWIwRSmRRoiTclPFYG6z2xoCCL8Sug9C+hsmCDy50zAGrnkW+CDfoOAuNk9h5VHEaVDxgryubmrblCVnFIWUAHqWgcEwWQw X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3PF4i+rwuZgfvV4gzTuC4oE87csVL21wm0dsvDl0ugS3Um2OxfurQR8t/K+YfpXNbRw/dUEvtXYoiGO0yHlDMafdVlN+wdGNhzzW4EY+2TCVZuyUqkB5WGcJypZF0r7Jrv0pivpJMh7Mvzvt97+YDg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1db3398e-1e5d-43b5-34e7-08d95724e384 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2021 08:50:20.0622 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT012.eop-eur05.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: DB8EUR05HT205 Received-SPF: pass client-ip=40.92.90.27; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-obe.outbound.protection.outlook.com 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:272028 Archived-At: Eric Abrahamsen writes: > Fabrice Bauzac-Stehly writes: > >> Michael Albinus writes: >> >>> Michael Albinus writes: >>> >>>>> > Should be feasible. The hard part is a rule to determine, whether rsync >>>>> > is better suited than the existing implementation, with the given actual >>>>> > arguments. I suspect, that small directories and/or short files are >>>>> > better served with the current implementation. >>>>> >>>>> Do we really need to decide this? Wouldn't it be ok to use rsync >>>>> for all cases (where Tramp is not in use)? >>>> >>>> I would like to see some benchmark figures first. For example, I'm not >>>> sure that rsync performs better when the target directory does not exist >>>> yet, and there's nothing to sync. >>> >>> I made some comparison between "cp -pr" and "rsync -pr" on shell >>> level. I've copied the whole Emacs tree to somewhere else. First the >>> case, that the target does not exist: >> >> Beware, "cp -pr" preserves timestamps, while "rsync -pr" does not. >> You'd have to add "-t" to rsync, which should make it much quicker when >> the files are already there, because then rsync will trust stat(2)'s >> mtime and size, skipping the actual opening and scanning of the files' >> contents. But if we don't trust this heuristics we would add >> --ignore-times. Also if we want to skip the rsync checksum scanning, and >> mimic "cp" more, we can add --whole-file. But it depends on what we >> want to do? >> >> The original use case of rsync is, of course, to synchronize things; in >> particular, it will not prompt the user before overwriting a file, which >> could be dangerous. It can silently avoid overwrites with >> --ignore-existing, though. For this reason, I'm not sure it would be >> wise to place it on the C key as replacement to the copy? >> >> Another area where rsync shines is the possibility to fine-tune the >> copying: --delete, rich filters on the sender and/or the receiver sides, >> --copy-dest... But then, precise control over the options is required, >> so why not achieve that with the "!" key in Dired? >> >> ! rsync -rt "--filter=-s *.dat" --delete * /tmp/ RET > > Looks like a job for the newly merged transient library! I woujld like to see something like `sync-directories-dwim style'. For the filters maybe something like `copy-if', `delete-if' or some other more integrated way with Emacs and Dired. Nothing against transient, just the way I would prefer to have it. I use rsync from Emacs already as from the links I posted.