From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57536: 28.1; filenotify problems on macOS with symbolic links to directories Date: Sun, 04 Sep 2022 16:10:22 +0300 Message-ID: <83mtbfl1z5.fsf@gnu.org> References: <890113EA-44AF-42FB-87AF-130D7AB164AD@easesoftware.com> <83edwuqome.fsf@gnu.org> <87h71nbc2v.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pedz@easesoftware.com, 57536@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 04 15:11:16 2022 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 1oUpPA-0004Yt-1N for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Sep 2022 15:11:16 +0200 Original-Received: from localhost ([::1]:41452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUpP9-0000JF-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Sep 2022 09:11:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUpOx-0000Im-5Y for bug-gnu-emacs@gnu.org; Sun, 04 Sep 2022 09:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUpOw-0003Du-OL for bug-gnu-emacs@gnu.org; Sun, 04 Sep 2022 09:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oUpOw-0000GW-BD for bug-gnu-emacs@gnu.org; Sun, 04 Sep 2022 09:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Sep 2022 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57536 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57536-submit@debbugs.gnu.org id=B57536.16622970571008 (code B ref 57536); Sun, 04 Sep 2022 13:11:02 +0000 Original-Received: (at 57536) by debbugs.gnu.org; 4 Sep 2022 13:10:57 +0000 Original-Received: from localhost ([127.0.0.1]:43682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUpOr-0000GC-8W for submit@debbugs.gnu.org; Sun, 04 Sep 2022 09:10:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUpOn-0000Fx-Jw for 57536@debbugs.gnu.org; Sun, 04 Sep 2022 09:10:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUpOh-00038l-WC; Sun, 04 Sep 2022 09:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zsFKXzMCKN4pvLEIooOvWa2KDYLti/qQMPS5CkvvnTE=; b=GCrvlB/wSzPz MmYfdEt5TMrCGGJau4IrNVxM8Nw74L1GnWIBCLVO1arqQtzSOPYlrc0ksiBjjnX/JX5Aj10WvZIwt tj6qKafk/xPg4CiQFUcSOoE/ef9m9q8dnJHQSfTvwYP69rhgY7g05HRgIYDAsema0Lil7DLfNUjq1 BLgGWEQI/E/6t76g282DURrHIq2Y35qstGIIT5H9LLBPy+s06txFIY6IRWLeWTt4GDQ1RLehEYvxL M8pc+9yeIsHw6GTcOVZ/eN6oNBhFbqIKd6cHGgNHYruhsoRk3o4Xzb0V7iUFe5XNcUHVWN4FsWeLX 4mbZYuP/1M5tT5VpGp3VEg==; Original-Received: from [87.69.77.57] (port=4435 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUpOh-00060H-DI; Sun, 04 Sep 2022 09:10:47 -0400 In-Reply-To: <87h71nbc2v.fsf@gmx.de> (message from Michael Albinus on Sun, 04 Sep 2022 13:42:16 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:241502 Archived-At: > From: Michael Albinus > Cc: Perry Smith , 57536@debbugs.gnu.org > Date: Sun, 04 Sep 2022 13:42:16 +0200 > > > I don't see any bug here. If file-notify-add-watch would resolve > > symlinks of its argument, we would be unable to watch changes to the > > symlink file itself. > > I agree. Emacs' file notifications are not designed to follow > symlinks. The manual in (info "(elisp) File Notifications") is silent > about, perhaps we shall clarify. Yes, we should clarify that, both in the manual and in the doc strings, I think. > Btw, there are bug#16113 and bug#18883, which report a similar problem > in auto-reverting. A possible solution could be to extend the FLAGS arg > of file-notify-add-watch by a condition 'follow', which means to > supervise the expanded symlink instead of the link file itself. I think it would be better to handle that option in Lisp, before we call the OS-specific notification library. That way, we can control better what exactly "follow symlinks" means. > inotify knows the mask bit IN_DONT_FOLLOW (which we haven't set yet), > see inotify(7). Other libraries might offer similar possibilities, which > I haven't checked yet. I see that w32notify.c currently follows symlinks; that will need to be fixed.