emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inotify-based file notifications missing sometimes


From: Eli Zaretskii
Subject: Re: inotify-based file notifications missing sometimes
Date: Sat, 25 Oct 2014 11:04:37 +0300

> From: Dima Kogan <address@hidden>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]