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: Fri, 11 Sep 2015 14:51:15 +0200 Message-ID: <87lhcdktks.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> <87si6mttsf.fsf@gmx.de> <837fny5ldi.fsf@gnu.org> <87wpvyi3ah.fsf@gmx.de> <83wpvy40fa.fsf@gnu.org> <87twr29lvd.fsf@gmx.de> <83si6m3xzp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441976169 30121 80.91.229.3 (11 Sep 2015 12:56:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2015 12:56:09 +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 Fri Sep 11 14:55:58 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 1ZaNru-0005br-H3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Sep 2015 14:55:54 +0200 Original-Received: from localhost ([::1]:56178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaNru-0001q4-1X for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Sep 2015 08:55:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaNoD-00047d-M3 for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2015 08:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaNoA-0006X3-Ex for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2015 08:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaNoA-0006Wz-CP for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2015 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZaNoA-00070U-5E for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2015 08:52: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: Fri, 11 Sep 2015 12:52: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.144197588126885 (code B ref 21435); Fri, 11 Sep 2015 12:52:02 +0000 Original-Received: (at 21435) by debbugs.gnu.org; 11 Sep 2015 12:51:21 +0000 Original-Received: from localhost ([127.0.0.1]:56257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaNnU-0006zZ-UX for submit@debbugs.gnu.org; Fri, 11 Sep 2015 08:51:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:63985) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaNnT-0006zR-GH for 21435@debbugs.gnu.org; Fri, 11 Sep 2015 08:51:19 -0400 Original-Received: from detlef.gmx.de ([79.195.7.210]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M6874-1YgdYM2iTq-00y6Y4; Fri, 11 Sep 2015 14:51:16 +0200 In-Reply-To: <83si6m3xzp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Sep 2015 21:55:38 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:GjdtBavYSMM+DicnR/lwdQ9yj6czR3wqmPNYrPixkSrOCo1zCME XtkZZcXUWYvBzWh17JHmrzNAYci1cgR+Rojk51wiUR90/rP7yP3CjKgjYBjrjNa4tOImc9/ 2ZmLjeQFVOW7GQahIx9eAWWidNGPdcUPBVrG9OvbRGd4N3odU80SresMgTSyKy4RmYmaKn3 XUIzHFHEoF9PhJgx8RaXw== X-UI-Out-Filterresults: notjunk:1;V01:K0:91gez2R7/W4=:lZdYXU4pkRpv2m3tbj1vLv LaSmdhYFUjMzP1Gr+mW2DRYvwUvqI1CftsDuywl4m8X5Kekbg0ZrL6cvKtKpReRa7A5DOpFG8 S0e6fo4xUqFz7gq76oO1AfBJTbou7/YX1XTIv7JuNryqN9DpYYqTMU0pTwNHYhg/gxGtQ1gtD xAzYLZc1tNzkJNOBBU9Tl0o7O07ow5fhhvoHW/1rISlVL8Xi3MoKyyJmGSIl9UTSPOEcnL01e kTLcoX8PyZ/T8ygWSgs6P8IWBZfKnlw3D5EHaMBtDPmZ5g2683HiLmN28R3NmpEwf61FHVmSw PypD+fnCB3en29J+DDFdOwMfpOGN6mCeF7h4lGkh+8ofAA3ih+rrLtuGfbp/VQl6SuYxVAzmR N/f6GhebCASA7RIb3aDwsW3d42IovcxjxnSXS7y9rupIdLlH3Gleq1+rc3yXUBiYYStiuy+Ub 7/n0ZjHC5+vB8FpFLKiUbRebanq3SFeMXCHVdy8+E9HGng6ySo6HLhEW9hWJaru3LaCiTO6+8 BTeVOcC/RwoHChxyZEc68kgkZCUAlsO9905Z0Ywardscn8a7pJVgSItw+X1CChlSySd7a1bcr 6kzApD1yXTGt4g7Y8KaTncycapQky5Y/kXgd/9ym+MdtlBfwfwmTS7yy09r55gmBj8Mvxdzx5 CxkA+Rt93tUFEZGwm9HAIBabNXgj90oV8Apgwwe7Ifp7fEGUSiWZcKVT4acTbhKEX7UrzXpH+ GNBL59hv4LpePuAg2rG66RWeE+yBn9P7W4Kf0w== 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:106414 Archived-At: Eli Zaretskii writes: >> > They shouldn't rely on that in the first place, since this is >> > unreliable, as we just saw. >> >> Nope. When filenotify.el sends a `renamed' event, it must be >> reliable. > > That's not what I meant. What I meant was that applications cannot > rely on getting a 'renamed' event when files are moved between > directories, they should be prepared to deal with 'deleted' and > 'created' anyway. Ahh, I misunderstood you. And yes, I don't believe it is a burden for applications to react on `renamed', `deleted' and `created'. > Those use cases will have to handle 'deleted' and 'created', if they > want to work on all supported platforms. By sending sometimes > 'renamed' and sometimes 'deleted' followed by 'created', we ask the > users to do more work, and gratuitously expose them to platform > differences that filenotify.el was supposed to conceal. I believe we don't have platform differences. On all supported platforms, we could compose a `renamed' event. gfilenotify sends `rename', inotify sends the `moved-from' / `moved-to' pair, and w32notify sends the `renamed-from' / `renamed-to' pair. None of the platforms guarantees, that a move operation will result in those events, remember the case of moving a file from a local disk to a mounted disk (a share for MS-Windows). Then they send their `deleted' / `created' equivalents. What we do is harmonizing a little bit the different native libraries. We don't do anything else. >> There is already a difference: native gfilenotify gives us a `rename' >> event. Shall we convert it to `deleted' and `created'? > > Yes. Here I disagree. >> This would reduce the information. > > Applications that don't want to lose that information can always call > back-ends directly. By using filenotify.el, they agree to losing some > information, and in return gain uniformity and less coding. See the example above. It would be a horror for them to handle all the different low-level events. filenotify.el would simplify it. And again, I don't believe it is too much work for an application, to handle a `renamed' event, when they are already capable to handle `deleted' and `created' events. > In the same directory, there _is_ a 'renamed' event. We are > discussing a situation when a file was moved to another directory, > which is not what this scenario is about. A handler of an application always knows which directory it is watching. Where's the problem? Best regards, Michael.