help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: why 4 inotfy events when saving a file?


From: Barry Margolin
Subject: Re: why 4 inotfy events when saving a file?
Date: Sun, 10 Mar 2013 20:59:22 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.21821.1362951956.855.help-gnu-emacs@gnu.org>,
 Gregor Zattler <telegraph@gmx.net> wrote:

> Dear Emacs users and developers,
> 
> saving a file from Emacs gives 4 inotify events:
> 
> how to reproduce:
> 
>    on first terminal do:
>       emacs-snapshot -nw -Q /tmp/inotify.test
>       modify file
>    
>    
>    on second terminal do
>       inotifywait -m  -q --format '%e %w%f' /tmp/inotify.test
>    
>    
>    on first terminal do 
>       ^x^s (safe buffer)
>    
>    result on second terminal is:
>       MODIFY /tmp/inotify.test
>       OPEN /tmp/inotify.test
>       MODIFY /tmp/inotify.test
>       CLOSE_WRITE,CLOSE /tmp/inotify.test
> 
> 
> why are there so many events?

To save the backup file. First it renames inotify.test to 
inotify.test.~<version>~, then it writes the buffer to a new 
inotify.test file.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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