unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org
Subject: New file notification event `stopped'
Date: Sun, 27 Sep 2015 11:08:51 +0200	[thread overview]
Message-ID: <87y4fsqlek.fsf@gmx.de> (raw)

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.



             reply	other threads:[~2015-09-27  9:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27  9:08 Michael Albinus [this message]
2015-10-10 10:13 ` New file notification event `stopped' 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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4fsqlek.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@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 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).