[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Added inotify support.
From: |
Michael Albinus |
Subject: |
Re: [PATCH] Added inotify support. |
Date: |
Tue, 11 Dec 2012 17:36:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> I've played a little bit with this. Looks, like not all events are
>> handled by the callback. Testcase:
>>
>> In a shell, a have applied
>>
>> $ inotifywait -mq /tmp/123
>>
>> In another shell, I have started Emacs
>>
>> $ emacs --eval "(inotify-add-watch \"/tmp/123\" t (lambda (&rest
>> rest) (message \"callback %s\" rest)))"
>>
>> Then I have modified&saved /tmp/123. In the first shell, I see
>>
>> /tmp/123 MODIFY
>> /tmp/123 OPEN
>> /tmp/123 MODIFY
>> /tmp/123 CLOSE_WRITE,CLOSE
>>
>> But in Emacs' *Messages* buffer, there's only
>>
>> callback ((1 (modify) 0 nil))
>> callback ((1 (close-write) 0 nil))
>>
>> What do I miss?
>
> No idea. Perhaps Rüdiger could help. Or step with a debugger through
> the code and see what's going on.
I've fixed this in the trunk.
There is still something not clear to me: An inotify event
/tmp/123 CLOSE_WRITE,CLOSE
is transformed into an Emacs event
(file-notify (1 (close-write) 0 nil) callback)
Is there a reason, that CLOSE (and also MOVE) are not handled in
mask_to_aspects?
Best regards, Michael.