[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: filenotify.el
From: |
Eli Zaretskii |
Subject: |
Re: filenotify.el |
Date: |
Tue, 25 Jun 2013 22:20:50 +0300 |
> From: Michael Albinus <address@hidden>
> Date: Tue, 25 Jun 2013 21:00:43 +0200
> Cc: address@hidden
>
> > + ;; Apply callback.
> > + (when (and (stringp file) (eq action 'moved))
> > + (funcall callback (list descriptor 'deleted file))
> > + (setq action 'created file file1))
> > + (when (and (stringp file) action)
> > + (funcall callback (list descriptor action file)))))
> >
> > I don't think this is very useful because there is no way for the user to
> > connect both events. Inotify provides COOKIE to do this.
> >
> > Maybe we should introduce a moved-from/moved-to event using a cookie
> > instead.
> > This should be easier to implement for all APIs.
>
> That's also my intention. But Glib's implementation does not implement
> this for all backends, see the comment in
> <https://developer.gnome.org/gio/2.36/GFile.html#GFileMonitorFlags-enum>.
>
> The w32notify case I couldn't test yet.
w32notify produces 2 events for a file that was renamed: a
'renamed-from' event, followed by a 'renamed-to' event.
- filenotify.el, Michael Albinus, 2013/06/25
- Re: filenotify.el, Stefan Monnier, 2013/06/25
- Re: filenotify.el, Michael Albinus, 2013/06/26
- Re: filenotify.el, Stefan Monnier, 2013/06/26
- Re: filenotify.el, Michael Albinus, 2013/06/26
- Re: filenotify.el, Stefan Monnier, 2013/06/26
- Re: filenotify.el, Michael Albinus, 2013/06/26
- Re: filenotify.el, Eli Zaretskii, 2013/06/26