emacs-devel
[Top][All Lists]
Advanced

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

Re: filenotify.el


From: Stefan Monnier
Subject: Re: filenotify.el
Date: Mon, 22 Jul 2013 15:00:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> Why not just let the error from the underlying notification request
>> appear?  (This is the usual bit about "don't call stat(2) before
>> open(2); just deal with failures from the latter".)
> That would be possible, yes. But I hope to improve
> file-notify-supported-p, that it could also return a correct answer in
> case the underlying library does not support the filesystem in question.

But if you can do that for file-notify-supported-p, presumably you can
also arrange for file-notify-add-watch to fail in those cases.
I agree with Davis that in general it's better to run
file-notify-add-watch and handle any error it might signal, than to
use a function like file-notify-supported-p.

The only case where file-notify-supported-p makes sense is when you want
to know if file-notify-add-watch would work before you know whether you
want to call file-notify-add-watch.  Can't think of too many situations
where this would be the case.


        Stefan



reply via email to

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