GNU bug report logs -
#21435
25.0.50; file-notify has problems after renames
Previous Next
Reported by: Tassilo Horn <tsdh <at> gnu.org>
Date: Tue, 8 Sep 2015 08:48:01 UTC
Severity: normal
Found in version 25.0.50
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 21435 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: Tassilo Horn <tsdh <at> gnu.org>, 21435 <at> debbugs.gnu.org
> Date: Tue, 08 Sep 2015 20:04:20 +0200
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > IOW, technically, the file/directory you watched disappeared from the
> > filesystem, so what is reported afterwards is IMO entirely resonable
> > at this low level.
>
> Well, inotify sends then the low-level event `delete-self', which is
> different from the usual `delete'. filenotify.el translates both to the
> upper-level event `deleted'. In case of `delete-self', filenotify.el
> could do something more, like removing the watch. Do we want this?
I don't think filenotify.el should remove the watch on its own, but it
could send an event that would allow the application do that if it
wants to.
> > One application we have on top of filenotify.el is auto-revert.el.
> > Now, if you see some user-level problems there when files are
> > renamed/deleted, please report them.
> >
> >> Another thing is that renames always seem to be reported twice (although
> >> the example in the manual lists only one event but that example has
> >> probably gathered with the gfilenotify backend).
> >
> > This doesn't happen with w32notify. filenotify.el includes some code
> > to produce a single notification out of the 2 reported by back-ends in
> > this case; perhaps something doesn't work there with inotify. Can you
> > step through the code and see why?
>
> Two days ago (commit dbdc459a48091f5953faf14bcaaa7e6d37fbf024), I've
> changed filenotify.el to fire 2 events `renamed' in case the directories
> of the source and target are different. This was triggered by a user
> report, that he wants to have auto-revert-mode for two different
> directories under dired control. So the event is sent for the two
> different handlers activated by the respective *-add-watch calls.
But then Tassilo's "renames always seem to be reported twice" is
inaccurate: this should only happen when a file is moved to another
directory.
> I've tested for inotify, it works (confirmed by that user). The use case
> of that user was, that a file has been moved outside Emacs from one
> directory to the other. An he wanted to see it in both dired buffers,
> immediately.
>
> I couldn't test this for w32notify, but it should behave like this since
> Sunday.
If you can show some simple test case, I can run it.
> PPS: Forgive me slow progress; I'm still suffering from health problems.
Wish you to recover quickly.
This bug report was last modified 9 years and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.