emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH updated] Support for filesystem watching (inotify)


From: Rüdiger Sonderfeld
Subject: Re: [PATCH updated] Support for filesystem watching (inotify)
Date: Sun, 5 Jun 2011 01:43:16 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; )

Hi,
thank your for your comments. I changed the arguments and changed an unkown 
aspect into an error. See my reply to Jan Djärv for the version of the patch 
containing the changes.

On Saturday 04 June 2011 22:10:45 Thien-Thi Nguyen wrote:

>    +  /* TODO: check if file is already in the watch_list.  */
> 
> Moreover, you need to decide what to do given, for example:
>  (progn (file-watch "foo" 'modify 'notify-modify)
>         (file-watch "foo" 'move 'notify-move))
> Is this OK, is this an error, is this "close to" an error?
> I think a simple "file is already in" check is insufficient.

Yes, this is a bit complicated. The inotify API itself does not create a 
separate event number if you try to watch the same file. But this could of 
course be done in the implementation by checking which callback corresponds to 
which event. But I'm not sure if this is the right way to handle it.
 
>    +  watch_list = Fcons(Fcons(make_number(watchdesc), Flist(2, args)),
> watch_list);
> 
> You can use ‘acons’: (acons K V ALIST) ≡ (cons (cons K V) ALIST).

Sadly acons is not available from the C API.



reply via email to

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