emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs inotify support?


From: Antoine Levitt
Subject: Re: Emacs inotify support?
Date: Sat, 12 Sep 2009 18:36:47 +0200

2009/9/12 Lennart Borgman <address@hidden>
On Sat, Sep 12, 2009 at 12:54 AM, Antoine Levitt
<address@hidden> wrote:
> and what would happen on very frequently modified
> files (ie would I be able to view a log file without being flooded by
> notifications).

Is not this a case when you want notifications?
Imagine a log file on a web server, when there is a new line each second. With a naïve implementation (current dialog each time the file changes), you wouldn't be able to do anything because notifications would be too frequent.




> > Date: Sat, 12 Sep 2009 00:54:50 +0200
> > From: Antoine Levitt <address@hidden>
> > Cc: address@hidden, Emacs Development <address@hidden>
> >
> > if a user has a buffer open with some file
> > and that file changes outside emacs, he won't be notified of changes until
> > he actually tries to modify it. Ideal case : emacs would monitor every file
> > used by buffers, and notify of changes with the current dialog (continue,
> > refresh, etc) in visible buffers.
>
> This use-case does not need any help from the OS to implement the
> feature in Emacs.  It should be quite easy to write a function that
> runs off the idle timer and checks each file that Emacs visits.
>
> The OP was talking about detecting changes in files that Emacs does
> not know about, including in files that are created while Emacs runs.

Indeed. If possible, polling should be avoided, though. And if inotify
or similar notification systems are implemented, it would be easy to
support both files and directories.

reply via email to

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