From: Eli Zaretskii <eliz@gnu.org>
To: Dima Kogan <lists@dima.secretsauce.net>
Cc: emacs-devel@gnu.org
Subject: Re: inotify-based file notifications missing sometimes
Date: Sat, 25 Oct 2014 11:04:37 +0300 [thread overview]
Message-ID: <8361f860dm.fsf@gnu.org> (raw)
In-Reply-To: <87r3xwfx9q.fsf@secretsauce.net>
> From: Dima Kogan <lists@dima.secretsauce.net>
> Date: Fri, 24 Oct 2014 23:17:57 -0700
>
> I then run
>
> ./emacs --eval "`cat /tmp/tstnotify.el`" -Q -nw
>
> with tstnotify.el being
>
> (progn
> (require 'filenotify)
>
> (dolist (fil '("/tmp/tst1" "/tmp/tst2"))
> (file-notify-add-watch fil '(change attribute-change)
> (lambda (event)
> (message "notify event %s" event)))
> (find-file fil))
> (switch-to-buffer "*Messages*"))
>
>
> Here I ask for notifications for two files, and print out the events as
> they come in. While emacs is running this way, I modify those two files
> using an external tool. I would expect to see modification events for
> both of these files, but I only see them for one of the files.
But you are not saying that having more than one file in the same
directory under auto-revert-mode doesn't work for this reason, are
you? Because I just tried, and it does work, because autorevert.el
does handle this situation.
> Proposed solutions?
I think it would help if you state explicitly what is the problem,
that you want to be solved, and why.
Just to clarify: filenotify.el is infrastructure that currently
(AFAIK) has only one user -- autorevert.el. At the time the file
notifications were introduced, there were many discussions about how
best to design this infrastructure. Eventually, the conclusion was
that we should make these decisions as we go, as we add user-level
features based on the notifications. So for now, filenotify.el
reflects the needs of its single user, and with that user it does its
job. If there are additional needs and goals not covered by that,
they should be explicitly stated, and then filenotify.el might need to
be extended/modified to cover them.
next prev parent reply other threads:[~2014-10-25 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-25 6:17 inotify-based file notifications missing sometimes Dima Kogan
2014-10-25 7:34 ` Eli Zaretskii
2014-10-25 7:44 ` Michael Albinus
2014-10-29 0:15 ` Dima Kogan
2014-10-25 8:04 ` Eli Zaretskii [this message]
2014-10-25 8:27 ` Dima Kogan
2014-10-25 9:04 ` Eli Zaretskii
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=8361f860dm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lists@dima.secretsauce.net \
/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.