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: Stefan Monnier
Subject: Re: [PATCH updated] Support for filesystem watching (inotify)
Date: Mon, 06 Jun 2011 12:21:35 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Thanks for your review, I generally agree with your comments.

> 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 dired shouldn't need to know if some other package decided to
watch the same directory, so having several watchers for the same file
should be accepted and work correctly, i.e. both callbacks should be run
when needed.

> I think a simple "file is already in" check is insufficient.
>    +  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).

No, Fcons is the right thing to use there.
We could #define ACONS(a,b,c) Fcons(Fcons(a,b),c)
but that's orthogonal to this patch.


        Stefan



reply via email to

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