From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: filenotify.el Date: Mon, 22 Jul 2013 20:28:39 +0200 Message-ID: <87r4eqla94.fsf@gmx.de> References: <87d2ra9z4x.fsf@gmx.de> <7765700.YGZAUaTNB1@descartes> <87y595uthx.fsf@gmx.de> <51ED774C.4010309@lanl.gov> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374517738 11721 80.91.229.3 (22 Jul 2013 18:28:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 18:28:58 +0000 (UTC) Cc: =?utf-8?Q?R=C3=BCdiger?= Sonderfeld , emacs-devel@gnu.org To: Davis Herring Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 20:28:59 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1Kqt-0000Va-Vy for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 20:28:56 +0200 Original-Received: from localhost ([::1]:41226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Kqt-0000XT-Iw for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 14:28:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Kqp-0000TQ-Kr for emacs-devel@gnu.org; Mon, 22 Jul 2013 14:28:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Kqo-0000h1-95 for emacs-devel@gnu.org; Mon, 22 Jul 2013 14:28:51 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:60054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Kqn-0000gZ-Tb for emacs-devel@gnu.org; Mon, 22 Jul 2013 14:28:50 -0400 Original-Received: from detlef.gmx.de ([93.202.51.185]) by mail.gmx.com (mrgmx002) with ESMTPS (Nemesis) id 0MNHqL-1V3EWM2tQ1-006u8O for ; Mon, 22 Jul 2013 20:28:48 +0200 In-Reply-To: <51ED774C.4010309@lanl.gov> (Davis Herring's message of "Mon, 22 Jul 2013 12:17:48 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:ZdooJq3ID0kDFJ/MFwqL1/89i+kMd0UpNtAUj/5Tw8w+TfOoWII cEXaK9uOIwA1r3LlKOwqsnnh9C4CxPURDHq4fOPG7kp0mHMgZ3QTzdmnIpwzyuTVPeKOszI 458CMW4LHuFw4YaeFesUHmSd0QmWkIsRFQf7UvsIvzMVLMCzDSmy0/TClgowTojdvtCjUxN 9VRTOxKtdpA8YAZcfe6cA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162072 Archived-At: Davis Herring writes: > 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. Example: mounted directories. (file-notify-supported-p "/mnt/dir") will return t when either gfilenotify or inotify are linked to Emacs. And file-notify-add-watch won't fail in either case. But likely, in the inotify case you won't see events, because it does not support mounted directories. In the gfilenotify case it shall work, because glib's implementation uses polling, when other mechanisms fail. file-notify-supported-p is not such clever yet. But users of filenotify.el shall apply this function already, for the future when file-notify-supported-p improves. > Davis Best regards, Michael.