From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21435: 25.0.50; file-notify has problems after renames Date: Tue, 08 Sep 2015 21:21:37 +0300 Message-ID: <83613k7owe.fsf@gnu.org> References: <87y4gh47sr.fsf@gnu.org> <83k2s07vaf.fsf@gnu.org> <87fv2ovlcr.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441736615 9421 80.91.229.3 (8 Sep 2015 18:23:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 18:23:35 +0000 (UTC) Cc: 21435@debbugs.gnu.org, tsdh@gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 08 20:23:23 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZZNXx-0002rI-R4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 20:23:09 +0200 Original-Received: from localhost ([::1]:36466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNXy-0005VN-4W for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 14:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNXu-0005Uj-BQ for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZNXq-0003Ot-AU for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:23:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNXq-0003Op-7X for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZZNXp-0006b4-TV for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Sep 2015 18:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21435-submit@debbugs.gnu.org id=B21435.144173653725308 (code B ref 21435); Tue, 08 Sep 2015 18:23:01 +0000 Original-Received: (at 21435) by debbugs.gnu.org; 8 Sep 2015 18:22:17 +0000 Original-Received: from localhost ([127.0.0.1]:52936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZNX6-0006a7-Jf for submit@debbugs.gnu.org; Tue, 08 Sep 2015 14:22:17 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:56768) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZNX4-0006Zx-51 for 21435@debbugs.gnu.org; Tue, 08 Sep 2015 14:22:15 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NUD00A00ETK6500@a-mtaout22.012.net.il> for 21435@debbugs.gnu.org; Tue, 08 Sep 2015 21:21:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUD009DWEZOKHA0@a-mtaout22.012.net.il>; Tue, 08 Sep 2015 21:21:25 +0300 (IDT) In-reply-to: <87fv2ovlcr.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106263 Archived-At: > From: Michael Albinus > Cc: Tassilo Horn , 21435@debbugs.gnu.org > Date: Tue, 08 Sep 2015 20:04:20 +0200 > > Eli Zaretskii 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.