From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#65904: 29.1.50; autorevert can't revert files in a symlink directory Date: Thu, 14 Sep 2023 13:58:05 +0200 Message-ID: <87h6nxklv6.fsf@gmx.de> References: <83cyymnsg4.fsf@gnu.org> <87fs3ib3k1.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4343"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 65904@debbugs.gnu.org To: zhanghj Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 14 13:59:15 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 1qgl07-0000sY-Fn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Sep 2023 13:59:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgkzq-0006zq-Bt; Thu, 14 Sep 2023 07:58:58 -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 1qgkzo-0006zR-SV for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 07:58:56 -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 1qgkzo-0006Nf-Jx for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 07:58:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgkzt-0000na-VW for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 07:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2023 11:59: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.16946927053026 (code B ref 65904); Thu, 14 Sep 2023 11:59:01 +0000 Original-Received: (at 65904) by debbugs.gnu.org; 14 Sep 2023 11:58:25 +0000 Original-Received: from localhost ([127.0.0.1]:37856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgkzI-0000mk-Qs for submit@debbugs.gnu.org; Thu, 14 Sep 2023 07:58:25 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:56887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgkzE-0000mV-L4 for 65904@debbugs.gnu.org; Thu, 14 Sep 2023 07:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1694692686; x=1695297486; i=michael.albinus@gmx.de; bh=QFwCSeN58GFZyszqwUptsPo/sKjfYaNxFN0NcbDdkkE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=t8S0GOMHgzptd16pjTHump+uqggqZ5ehyK8xPaVG+teZ98ApqVcFqWdw10IShyIhjLYoGr2nksD QK+Tzumz7j+yyi2/aVgRgQqDD+BNFNqfWiMsLQUlreicHUd+pti4Pxn8TpU7EcV11o6r7JL1e5K1I Gr3lQOYrrmQdpJxcTYYu0DL4i8cBwDN3sVv/lS0mrkhT1fF4rIwstmNFXcM+4iqqhJnUyivYnH9Hx rjTId6ati2uT3Kr+fIq3SAbWTqameDEBlw0SY+cHXeIfWj49AbwOKiW+y8vmCK7o2bgpzS16VxWPF OlaOHJCbbPQ/gTT/6wA3Ky7Ll3Rs5KZ66VaA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.17]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7zFZ-1rkDmf0ex9-014znL; Thu, 14 Sep 2023 13:58:06 +0200 In-Reply-To: (zhanghj's message of "Wed, 13 Sep 2023 22:16:23 +0800") X-Provags-ID: V03:K1:tBoXnPx6M51yGleQjvrcrFDEuLwYiqaRQ/qc74zIsxazTyh3rS+ +WDmfwZH08C/JKfQwWCMMFFbIWxWQLfguaZ72l0VoREwuJWq+BdrZWyPyiat1eRfWDTCgb9 ucqCj589HBfB5yaa/z5MqbHTdibEybJk2rZSyFe1tiiTmRHApCS+uPrgAY8DMS79VQXmweQ PXu+7ue9SuSjRq5zpaNnA== UI-OutboundReport: notjunk:1;M01:P0:imvXOKiiW8s=;gbs2W4XPxIhS4O7/aH8zTqHbehI aey28Td/ar/5ZmwwAgoHrFB8YvBvrP6R2sO8JArg42Rz4DA9vrT+XE1DtzmFk53H6wst2CXiR mSLW9QMZzasOV79mZt6FBk1UmxGpd6CehQ7vBnTM6Im4uddZJ1MzQQWw9PYv9SjtB8bYLQswx +DBRAXYnOcK9jAwmL3HrguC6t58dBMpJmrq7cVeQt7VEHHMlFxIDSG+CJ0L3UYI8w0ceWj7uw j34UGb+8gW4OTktN0tuecU2oWvNtjY0v8lKiJokZNbck7uTKHq8ANzcJ+Dekn4yhA1ZATbPXs 9GBcrSS00lt6YB9hM5QHff58dUiayzkAZBFTqzM+U/8gD+qBn5rvXJhCtDf5DVrjjbfA4JHVE aV5t3FjrUwGDm6WeA5KQDS6v9wO5nn10Bq3Rqt7Egot3T7E7SgR/n0ZANeHI1JSqSAisLwCQE njxJeGZ6abjPH+VVEpFvtJ33peXKcGoLwikQxCGFrZcmDwx+OpyfEOC6limpBfNpn8wdMjeGB vH0mECy79OAqR9oxkCIHaULVnygYTlHlrSCZEP2UkMX1eVYQEgKfGEy8x7OQL4LRM0LQdYsdC c1ku3cnbUiYSmwix9AuDIlWFgqMCvncDAth7SJPuO7q/I66RYmBaNrnP6qn6zicvT+myIpKRH 0H0UOGKxsLcGLWJ1eIQtk6JGXlT97/0NH+5aStXFfaSlEv8TByI5KtN5YqUP3nXepgIjxEj3B F8nLb29t6yf5iR9R3M2Mh5Rk53otEr2HkF9v+6+6I23oLBsjZ9r/rlDGKhwxubHZ8xxvjkm3 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:270416 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable zhanghj writes: Hi, > How does it work in Emacs 26/27? Why don't you let it keep the old behavi= or? 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=E2=80=99t 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment diff --git a/lisp/filenotify.el b/lisp/filenotify.el index e9f8d4e515d..6025f35cb6e 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -339,7 +339,6 @@ file-notify--add-watch-inotify "Add a watch for FILE in DIR with FLAGS, using inotify." (inotify-add-watch dir (append - '(dont-follow) (and (memq 'change flags) '(create delete delete-self modify move-self move)) (and (memq 'attribute-change flags) --=-=-=--