all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <lists@dima.secretsauce.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: inotify-based file notifications missing sometimes
Date: Sat, 25 Oct 2014 01:27:43 -0700	[thread overview]
Message-ID: <87ppdgfsqt.fsf@secretsauce.net> (raw)
In-Reply-To: <8361f860dm.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Dima Kogan <lists@dima.secretsauce.net>
>> Date: Fri, 24 Oct 2014 23:17:57 -0700
>> 
>> 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.

I'm not saying that largely because this thread is explicitly not about
auto-revert-mode. autorevert.el likely handles this because it was
originally written to not use inotify at all (and is still that way for
remote files), and likely makes more thorough checks. I have not looked
into that at all. The patch in the other thread makes auto-revert-mode
event based, and is broken by the issue described in this thread.


>> Proposed solutions?
>
> I think it would help if you state explicitly what is the problem,
> that you want to be solved, and why.

The problem is that we provide utility functions in filenotify.el that
claim to do something and do not do it. More to the point of what I'm
doing, I want to fix the event-based auto-revert, as implemented in the
patch I sent to the list a few hours ago. The patch is fine, I think,
but the issue described HERE breaks it.


> 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.

OK. That is reasonable. I have no problems with the filenotify.el API at
all, it's just that the API description is not being respected.

By the way, the other filenotify.el backend for linux (gfile) has an
issue as well. Running the same test with it DOES produce events for
both files, but events come throught only when the user touches emacs.
So when the files are modified, nothing shows up in *Messages*, but
pressing any key in the emacs window makes them pop up. I haven't looked
into the cause of that yet, but intend to shortly.

dima



  reply	other threads:[~2014-10-25  8:27 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
2014-10-25  8:27   ` Dima Kogan [this message]
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=87ppdgfsqt.fsf@secretsauce.net \
    --to=lists@dima.secretsauce.net \
    --cc=eliz@gnu.org \
    --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 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.