[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir
From: |
Eli Zaretskii |
Subject: |
bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted |
Date: |
Tue, 08 Sep 2015 18:49:36 +0300 |
> From: Tassilo Horn <tsdh@gnu.org>
> Date: Tue, 08 Sep 2015 08:36:06 +0200
>
> Right now, (at least) the inotify version of `file-notify-rm-watch'
> signals an error in case the given descriptor denotes a directory which
> has been deleted in the meantime. If it denotes a file which has been
> deleted, no error is signaled.
>
> Here's a receipe:
>
> (require 'filenotify)
> (let* ((flags '(change))
> (handler (lambda () nil))
> (file (make-temp-file "foo"))
> (file-watch (file-notify-add-watch file flags handler))
> (dir (make-temp-file "bar" t))
> (dir-watch (file-notify-add-watch dir flags handler)))
> (delete-file file)
> (delete-directory dir)
> (file-notify-rm-watch file-watch) ;; works
> (message "Removed file watch")
> (file-notify-rm-watch dir-watch) ;; signals an error
> (message "Removed directory watch"))
>
> The documentation does not define any specific behavior for these
> situation, so this is currently a gray area which makes it hard for
> package developers to develop something which will work right accross
> the different notification backends.
>
> I don't have a strong opinion about what the right behavior would be but
> at least it seems inconsistent that you get the error only with deleted
> directories.
There is no "right" behavior. What you see is what the back-end
reports to us. If we want Emacs to be smarter, it's the job of the
application, not of filenotify.el.
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted,
Eli Zaretskii <=
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/08
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/12
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Michael Albinus, 2015/09/13
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Tassilo Horn, 2015/09/14
- bug#21432: 25.0.50; file-notify-rm-watch (inotify) errors if watched dir is deleted, Eli Zaretskii, 2015/09/14