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: Thu, 10 Sep 2015 13:09:36 +0200 Message-ID: <87si6mttsf.fsf@gmx.de> References: <87y4gh47sr.fsf@gnu.org> <83k2s07vaf.fsf@gnu.org> <87fv2ovlcr.fsf@gmx.de> <83613k7owe.fsf@gnu.org> <8737ynv3ik.fsf@gmx.de> <83h9n35rgy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441883425 31054 80.91.229.3 (10 Sep 2015 11:10:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2015 11:10:25 +0000 (UTC) Cc: 21435@debbugs.gnu.org, tsdh@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 10 13:10:14 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 1ZZzk5-0005FL-51 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2015 13:10:13 +0200 Original-Received: from localhost ([::1]:48478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZzk4-0005Kl-EV for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2015 07:10:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZzk0-0005Il-5I for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 07:10:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZzjw-0002kN-5X for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 07:10:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZzjw-0002k6-37 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 07:10:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZZzjv-0005bN-Dx for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 07:10:03 -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, 10 Sep 2015 11:10:03 +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.144188338121500 (code B ref 21435); Thu, 10 Sep 2015 11:10:03 +0000 Original-Received: (at 21435) by debbugs.gnu.org; 10 Sep 2015 11:09:41 +0000 Original-Received: from localhost ([127.0.0.1]:54541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZzjY-0005ah-Ls for submit@debbugs.gnu.org; Thu, 10 Sep 2015 07:09:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57098) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZzjX-0005aa-6j for 21435@debbugs.gnu.org; Thu, 10 Sep 2015 07:09:40 -0400 Original-Received: from detlef.gmx.de ([93.209.66.208]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Lk7fW-1Z3h7Y0f7q-00cCVW; Thu, 10 Sep 2015 13:09:38 +0200 In-Reply-To: <83h9n35rgy.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 09 Sep 2015 22:21:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0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u.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:106340 Archived-At: Eli Zaretskii writes: >> # mv /tmp/xxx ~/tmp/ > > This doesn't work at all on w32 (I used d:/usr/eli/data instead of > ~/tmp), it reports removal and addition (and also a bogus 2nd > removal): > > ====================================================================== > 1 -> (file-notify-handle-event (file-notify (100286608 removed "xxx") > file-notify-callback)) > | 2 -> (myhandler2 (100286608 deleted "d:/usr/eli/data/xxx")) > | 2 <- myhandler2: nil > 1 <- file-notify-handle-event: nil > ====================================================================== > 1 -> (file-notify-handle-event (file-notify (100286608 added "xxx") > file-notify-callback)) > | 2 -> (myhandler2 (100286608 created "d:/usr/eli/data/xxx")) > | 2 <- myhandler2: nil > 1 <- file-notify-handle-event: nil > ====================================================================== > 1 -> (file-notify-handle-event (file-notify (100286560 removed "xxx") > file-notify-callback)) > | 2 -> (myhandler1 (100286560 deleted "d:/tmp/xxx")) > | 2 <- myhandler1: nil > 1 <- file-notify-handle-event: nil > > Let me know what I should look into or which additional information I > can give you about this. `file-notify-handle-event' is called directly by the low-level library, w32notify here. It sends the events (file-notify (100286608 removed "xxx")) (file-notify (100286608 added "xxx")) (file-notify (100286560 removed "xxx")) The first two events are raised by the file name handler for d:/usr/eli/data. Maybe "xxx" did exist already in that directory? In this case, it would be OK to remove it first. The last event comes from from file name handler for d:/tmp - this looks OK. Well, the order of the events is not as expected (the third event shall be the first one), but we never gave a promise for a canonical order. I would say, that w32notify does not send the renamed-from and renamed-to events, as expected. Maybe they are sent only in case of renaming a file in the same directory? Say # mv /tmp/xxx /tmp/yyy Best regards, Michael.