unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New file notification event `stopped'
@ 2015-09-27  9:08 Michael Albinus
  2015-10-10 10:13 ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2015-09-27  9:08 UTC (permalink / raw)
  To: emacs-devel

Hi,

during the work on bug#21432 and bug#21435, we have introduced a new
function `file-notify-valid-p', which tells whether a given monitor is
still active. We have also discussed shortly, whether a monitor should
signal, when it stops its activities. A monitor could cease to work for
different reasons, maybe because it is cancelled (not only by
`file-notify-rm-watch'), maybe because the file/directory to be watched
is deleted, maybe because some internal limits are reached.

Therefore, I propose that a new file notification event `stopped' shall
be added to the file notification events to be raised by a file
notification monitor. This would allow applications to react directly on
this situation. For example, `auto-revert-mode' could switch to polling
then.

The implementation for inotify.c is simple, because it receives already
the native IN_IGNORED event in this case, which could be mapped easily
to the `stopped' event.

The implementation for gfilenotify.c would create such a `stopped'
event, if one of the native events G_FILE_MONITOR_EVENT_DELETED,
G_FILE_MONITOR_EVENT_RENAMED or G_FILE_MONITOR_EVENT_UNMOUNTED was
received, and the file argument is equal to the watched file or
directory.

I hope a simlar mechanism could be implemented for w32notify.c.

Comments?

Best regards, Michael.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-25 22:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27  9:08 New file notification event `stopped' Michael Albinus
2015-10-10 10:13 ` Michael Albinus
2015-10-10 10:28   ` Eli Zaretskii
2015-10-10 11:56     ` Michael Albinus
2015-10-10 12:25       ` Eli Zaretskii
2015-10-10 13:35         ` Michael Albinus
2015-10-10 13:41           ` Eli Zaretskii
2015-10-10 14:35             ` Michael Albinus
2015-10-25 13:21               ` Michael Albinus
2015-10-25 19:57                 ` Eli Zaretskii
2015-10-25 22:35                   ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).