From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#21435: 25.0.50; file-notify has problems after renames Date: Tue, 08 Sep 2015 20:04:20 +0200 Message-ID: <87fv2ovlcr.fsf@gmx.de> References: <87y4gh47sr.fsf@gnu.org> <83k2s07vaf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441735536 23430 80.91.229.3 (8 Sep 2015 18:05:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 18:05:36 +0000 (UTC) Cc: 21435@debbugs.gnu.org, Tassilo Horn To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 08 20:05: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 1ZZNGZ-0001uE-MA for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 20:05:11 +0200 Original-Received: from localhost ([::1]:36336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNGZ-0006ZN-JM for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 14:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNGW-0006Yq-Dc for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:05:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZNGR-0002Yp-AU for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:05:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZNGR-0002WP-7T for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZZNGQ-00069b-Gr for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 14:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Sep 2015 18:05:02 +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.144173546523606 (code B ref 21435); Tue, 08 Sep 2015 18:05:02 +0000 Original-Received: (at 21435) by debbugs.gnu.org; 8 Sep 2015 18:04:25 +0000 Original-Received: from localhost ([127.0.0.1]:52896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZNFo-00068f-Vg for submit@debbugs.gnu.org; Tue, 08 Sep 2015 14:04:25 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:63261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZNFm-00068X-V2 for 21435@debbugs.gnu.org; Tue, 08 Sep 2015 14:04:23 -0400 Original-Received: from detlef.gmx.de ([87.146.58.15]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LyzW8-1YeMqb0nTc-014Cv1; Tue, 08 Sep 2015 20:04:21 +0200 In-Reply-To: <83k2s07vaf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Sep 2015 19:03:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:6r/DgHdK879WAMFA18G+bbYxMeh+qhLiBsI/sy9KTe7rKCmh24P kIivxUNkHsXbXXxbwCsYrpMfjx7c4Hu38uuqFs/Vycc7XxNVOUgyCrVt4KnHcLmXJPdiIHw tozEEuqyeIZM/+O3fcnxf9GErxv5anFxYvwYhQeGppOrhRemVWqFHMfSXIKltbZi0H91i2Y DnJzmIjkFVpAJhWhsRC/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:YPx0goX+o3c=:WhtP9JQrUJdfxRe+x1sjZU hIO/HMBn+Qpx15u22cKGYgtbZmGNZuMPC3finY8W2pbKhm8VzYAWffTlre+RvItre9wo6Tvm7 z/iIxDf8QSqVm/y/a4AITywzscxvf93TMTSMzr4MEEyMBW8lexWmUFWtLgz2dHykPbGzT7928 NMhSoirhPL9x5JdBA83Qn/3oV7Xmk5l4dZper87jMvniG8Q8AoeDjOqcYGVLBsoWdKqPHxeNK aKA/M+WYjP5+PdP0PI2CklJ43MzlHo+z4Mp/S4VK8DYakuecjcqQCneUwW/t6avo+MAaBVYBt B11qjeQl8B2r3FY6O+mhwjxqc/3ZWqr+KxE5Ewd5iUXRh7PgQqVhPQvn7rfLoTletRXGpe2dY yAGU4R/QEnMgKyCV6cj5rMeL8KDqXZyY78DutvtekIB5f6cn5KUJlOe8GvbEY5+UnMUUn18/W DhKgI9OGN98oN7jyONFnAhQPc7OFEoWdtbP9n1/UdqsXxxFCoVu3JT1ST1u9ya4xKoAN85Rsz LMIEy0hbRNaMvZKg0q+0g3f3gkJmkXJ+y+0Jr9g3kckOLipy+635dhCo2PvotRQhAHqYu40Xv cjnMJBJPjPmMmFqsJIBJhM1C7tefSnmVUiNj9DxVNLZniOLcJLOJsFuBz30N2lN4nEkWqC7Wz Kxl0HiGJ4tuGgcGdBedS+fZ5V/NePumI4WCgU+gnFG2MKEz6IwVxwQl27qKsayJmaaNbJtMUT FBnWbnb8sMNx2yxNWL9zcpT6yiJNfZIo0E5vaA== 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:106262 Archived-At: 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? > 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. 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. I haven't changed it in gfilenotify yet, it's on my todo list. And the manual must be adapted, as Tassilo has said. Best regards, Michael. PS: Tassilo, you write great test cases. Do you want to contribute to test/automated/file-notify-tests.el? PPS: Forgive me slow progress; I'm still suffering from health problems.