From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: zhanghj Newsgroups: gmane.emacs.bugs Subject: bug#65904: 29.1.50; autorevert can't revert files in a symlink directory Date: Tue, 19 Sep 2023 05:08:46 +0800 Message-ID: References: <83cyymnsg4.fsf@gnu.org> <87fs3ib3k1.fsf@gmx.de> <87h6nxklv6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11497"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: Eli Zaretskii , 65904@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 18 23:10:05 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qiLVM-0002qb-BI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Sep 2023 23:10:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiLVD-0005YF-Gz; Mon, 18 Sep 2023 17:09:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiLVB-0005Tk-J9 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2023 17:09:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiLVB-0006xk-92 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2023 17:09:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiLVJ-0007cH-JY for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2023 17:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: zhanghj Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Sep 2023 21:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65904 X-GNU-PR-Package: emacs Original-Received: via spool by 65904-submit@debbugs.gnu.org id=B65904.169507135029202 (code B ref 65904); Mon, 18 Sep 2023 21:10:01 +0000 Original-Received: (at 65904) by debbugs.gnu.org; 18 Sep 2023 21:09:10 +0000 Original-Received: from localhost ([127.0.0.1]:54792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiLUU-0007aw-0n for submit@debbugs.gnu.org; Mon, 18 Sep 2023 17:09:10 -0400 Original-Received: from mail-tycjpn01olkn2045.outbound.protection.outlook.com ([40.92.99.45]:60229 helo=JPN01-TYC-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiLUQ-0007aK-Fm for 65904@debbugs.gnu.org; Mon, 18 Sep 2023 17:09:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cG1deK4FnnnPI52NMWb3EgrS9OTM1qQNjBU3/zGzyE/HIXfcE/42gAin+uJIbTBAyFmWyXkYQRrAFz9N5HibT+mt/Qyd7p4TBqm85NnQdADh/ruwSRvlEztp31O9eFI4b77Fhr2eZMNjwifQvZO2WG0mVaY4IuWdk6pPUAAo6jIOYeR8uM34kVZxSHnpukqVhR4zL5O0DycHsEYki8NJlLciYODDskbKxT/zU93vsGlHQqTJkRx4OhgYCHs2+3QDoA/c3YBYnlM/9Go688ePBv8kP1D9z3eIwNUp6t0hHk0fYW5PyF1KhMaER39ip9/ap/gRGjQsgc5z5/Y8D7bO0A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oVIca3xGETIyEoDu2BsnQT8r+BOJbXK4lEYxc3Hzc5I=; b=myCFUel6yEkwD/g7wME4i8O8EVyDUdFjbm4xoVAAhe32r8CUqcH+04pIfa3qj75t5EoMneA4NJty/WHxniP6Yc54oTpcwPmjB42MDP8gdZ30o5YWKCSuTNlFY6cP9IDEPJRhoOQnVZBhQ+F7ZjwRuPqMxYPVMqh5l54knmdo9UT8xdaVTjL/RnftywKmxpifct7Ya0eZaW9u6RYNE6ggXSB+zXGb9A7zrC9b53rQlRWOsgo38FkcQfuCIcnc+lSmDjGotOvYVgJn6lRznty1SAkJxFm/PpZ+XDdvz0VUA/f5wV/eX6K6NUJ+NVpkY96fcia+ep5dH4DjU7/uK91Okw== 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=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oVIca3xGETIyEoDu2BsnQT8r+BOJbXK4lEYxc3Hzc5I=; b=oxMMD7fcUpo+VPL+hTX/+jyy3lhmwQedGEPa2I2RqgrK6fAvYwNwdZxjmbuBVwu1TGHEx6/YN38u1dHodKqyiuOGfXU/eIhUdeBG7R+rpFDkyqbc3QrECTiUbG1CHtHPNxf74vQgo/ntGm+8mqpnqqqTyIknWRlgPv5J+HDpQbZieC9GUicy70L6nHpGF74+OeU9uAgxmfLkr+bwcM9ExCOkssk7hWQqYVOVQCVXPvpr/gZmZMsRDkrsSdbbKumOuiS+4ewf9NrqExjH3AAyldUaZ+yVu8qJVxDyPIZjqkllqbEUK0Dzv0kfyBW05NSPRZMgLEP72F77wV0FBVwpnw== Original-Received: from OS3P286MB2199.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:19f::13) by TYWP286MB3835.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:442::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.15; Mon, 18 Sep 2023 21:08:50 +0000 Original-Received: from OS3P286MB2199.JPNP286.PROD.OUTLOOK.COM ([fe80::97c3:1179:f612:ab7b]) by OS3P286MB2199.JPNP286.PROD.OUTLOOK.COM ([fe80::97c3:1179:f612:ab7b%3]) with mapi id 15.20.6813.014; Mon, 18 Sep 2023 21:08:50 +0000 Content-Language: en-US In-Reply-To: <87h6nxklv6.fsf@gmx.de> X-TMN: [6rpAmXVR3myIEI5BDM6LuPpBsboJi/29TUBDNJXKHmi9Mw0TEn7HzZ3A2P8W40L4] X-ClientProxiedBy: TYCP286CA0297.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c8::20) To OS3P286MB2199.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:19f::13) X-Microsoft-Original-Message-ID: <3e3cd665-7c5a-be3c-412b-357733b64a4a@outlook.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3P286MB2199:EE_|TYWP286MB3835:EE_ X-MS-Office365-Filtering-Correlation-Id: fb138457-7df3-4e96-21cb-08dbb88b74b4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MVrbfXWbBeUKlhvH9ozYTkk/7Pswz1xapOVONspPBbP5UK7XB7WTgr9wWzqrHnJYlNc8EqoD+OtXYf+15gCWPnHzzWmhRGpbO+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m7EF8PGY2YxQgWzfwcoL5+J516ReB9mnk7JImADUrsZ2f4H/L10gm41alqIE6CqQMpT4mKEjV4AOFZWRdNFneI3DIGZKCtGMaIv6tyGOBf7x2QFSzF5CZ+rrR9E6Iz2mLU/+CQOoYgoOq+cNYQOxecShy+X8/+bBbIu4Eb+t+qjDhLbuaBnb819dsu4k77Zaay6Mbs+Kaje w2aB0Z+VD9w8cpUun4jYMAgWRhcB4gWZoe5pBJo3uLF89LBoAtjbsvOxVpvCusV4caPmAeMK9LcTzdCuSJJmy35Mf3cBNj1jSJ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb138457-7df3-4e96-21cb-08dbb88b74b4 X-MS-Exchange-CrossTenant-AuthSource: OS3P286MB2199.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 21:08:50.3616 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWP286MB3835 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270844 Archived-At: I tried your patch on GNU/Linux. It works as you said(the same as in Emacs 26/27 now). I will try it on macOS later. I have added some debug message and see that without this patch, the `filenotiy' also watch the file but `autorevert.el` can't receives events for the test file. After applying the patch, it can receive events for the test file. It seems that the patch is not harmful. Can you apply it in Emacs 29? Thanks. On 9/14/23 19:58, Michael Albinus wrote: > zhanghj writes: > > Hi, > >> How does it work in Emacs 26/27? Why don't you let it keep the old behavior? > That time, it was unspecified, whether symlinked files/directories are > watched. Some file notification backends did, other backends didn't. In > Emacs 29, this was clarified, see (info "(elisp) File Notifications") > > --8<---------------cut here---------------start------------->8--- > If FILE is a symlink, it doesn’t follow that link. Just FILE > itself will be watched. > --8<---------------cut here---------------end--------------->8--- > > There is the idea to add a new flag to the `file-notify-add-watch' > function, `follow'. This would allow to follow symlinks, with different > implementations in the different backends. Buth this hasn't been > implemented yet. > > If you need this feature urgently in inotify (I guess you're using this > backend), try the appended patch in filenotify.el (untested). > > Best regards, Michael. >