GNU bug report logs - #65904
29.1.50; autorevert can't revert files in a symlink directory

Previous Next

Package: emacs;

Reported by: Zhang Haijun <ccsmile2008 <at> outlook.com>

Date: Wed, 13 Sep 2023 04:01:02 UTC

Severity: wishlist

Merged with 16113, 18883, 64061

Found in versions 24.3.50, 24.4, 29.1.50, 30.0.50

Full log


View this message in rfc822 format

From: zhanghj <ccsmile2008 <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 65904 <at> debbugs.gnu.org
Subject: bug#65904: 29.1.50; autorevert can't revert files in a symlink directory
Date: Wed, 13 Sep 2023 22:16:23 +0800
How does it work in Emacs 26/27? Why don't you let it keep the old behavior?

I just tried again with the following test code(with 
auto-revert-interval be a big value). There was a long delay(about 30s) 
before the first reverting. But the following ones were instant.

(progn
  (setq auto-revert-use-notify t
        auto-revert-interval 30)
  (global-auto-revert-mode 1)
  (setq find-file-hook (delq 'vc-refresh-state find-file-hook))
  (find-file "~/symlink_dir/abc.txt"))


On 9/13/23 21:33, Michael Albinus wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> Hi,
>
>>> 0. emacs -Q
>>> 1. use the following code to open an existing file in a symlink directory
>>> (progn
>>>    (setq auto-revert-use-notify t
>>>             auto-revert-interval 3)
>>>    (global-auto-revert-mode 1)
>>>    (setq find-file-hook (delq 'vc-refresh-state find-file-hook))
>>>    (find-file "~/symlink_dir/test.txt"))
>>>
>>> 2. modify the test file in external program and save
>>> 3. emacs doesn't autorevert the file
>> AFAICT, we don't support autoreverting symlinks, since Dec 2013, so it
>> sounds strange that you say it worked in Emacs 27.
>>
>> The relevant discussion is here:
>>
>>    https://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00282.html
>>
>> The reason for this non-support seems to be performance.
>>
>> I hope Michael (CC'ed) will be able to tell more about this.
> Yes, we don't support autorevert of files in a symlinked directory via
> file notifications. There are other bugs with the same topic, see
> bug#16113, bug#18883 and bug#64061. I'll merge this bug with the other
> ones.
>
>> A workaround is to set auto-revert-use-notify to nil.
> Yep.
>
> Best regards, Michael.




This bug report was last modified 1 year and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.