From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21435@debbugs.gnu.org, tsdh@gnu.org
Subject: bug#21435: 25.0.50; file-notify has problems after renames
Date: Fri, 11 Sep 2015 14:51:15 +0200 [thread overview]
Message-ID: <87lhcdktks.fsf@gmx.de> (raw)
In-Reply-To: <83si6m3xzp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Sep 2015 21:55:38 +0300")
Eli Zaretskii <eliz@gnu.org> 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.
next prev parent reply other threads:[~2015-09-11 12:51 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 8:47 bug#21435: 25.0.50; file-notify has problems after renames Tassilo Horn
2015-09-08 16:03 ` Eli Zaretskii
2015-09-08 18:04 ` Michael Albinus
2015-09-08 18:21 ` Eli Zaretskii
2015-09-08 19:28 ` Tassilo Horn
2015-09-09 18:15 ` Michael Albinus
2015-09-09 19:01 ` Tassilo Horn
2015-09-09 20:23 ` Tassilo Horn
2015-09-10 11:23 ` Michael Albinus
2015-09-10 15:31 ` Tassilo Horn
2015-09-10 17:50 ` Michael Albinus
2015-09-10 19:22 ` Tassilo Horn
2015-09-11 9:53 ` Michael Albinus
2015-09-11 12:17 ` Tassilo Horn
2015-09-11 12:32 ` Eli Zaretskii
2015-09-12 8:44 ` Michael Albinus
2015-09-11 9:45 ` Michael Albinus
2015-09-11 12:11 ` Tassilo Horn
2015-09-09 18:41 ` Michael Albinus
2015-09-09 19:21 ` Eli Zaretskii
2015-09-10 11:09 ` Michael Albinus
2015-09-10 15:45 ` Eli Zaretskii
2015-09-10 17:37 ` Michael Albinus
2015-09-10 18:03 ` Eli Zaretskii
2015-09-10 18:20 ` Michael Albinus
2015-09-10 18:55 ` Eli Zaretskii
2015-09-11 12:51 ` Michael Albinus [this message]
2015-09-08 19:05 ` Tassilo Horn
2015-09-08 19:19 ` Eli Zaretskii
2015-09-08 19:47 ` Tassilo Horn
2015-09-09 2:39 ` Eli Zaretskii
2015-09-09 6:13 ` Tassilo Horn
2015-09-20 17:26 ` Michael Albinus
2015-09-20 19:36 ` Eli Zaretskii
2015-09-21 6:25 ` Michael Albinus
2015-09-21 7:54 ` Eli Zaretskii
2015-09-21 10:13 ` Michael Albinus
2015-09-21 10:14 ` Eli Zaretskii
2015-09-21 13:11 ` Michael Albinus
2015-09-21 13:31 ` Eli Zaretskii
2015-09-21 13:38 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhcdktks.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=21435@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=tsdh@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.