From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: filenotify.el Date: Mon, 22 Jul 2013 15:00:53 -0400 Message-ID: References: <87d2ra9z4x.fsf@gmx.de> <7765700.YGZAUaTNB1@descartes> <87y595uthx.fsf@gmx.de> <51ED774C.4010309@lanl.gov> <87r4eqla94.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374519661 32480 80.91.229.3 (22 Jul 2013 19:01:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 19:01:01 +0000 (UTC) Cc: =?iso-8859-1?Q?R=FCdiger?= Sonderfeld , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 21:01:01 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 1V1LLx-0004QZ-Mp for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 21:01:01 +0200 Original-Received: from localhost ([::1]:60288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1LLx-0003BR-CO for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 15:01:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1LLt-000387-OQ for emacs-devel@gnu.org; Mon, 22 Jul 2013 15:00:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1LLq-0004l9-Rt for emacs-devel@gnu.org; Mon, 22 Jul 2013 15:00:57 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:58400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1LLq-0004ky-N9 for emacs-devel@gnu.org; Mon, 22 Jul 2013 15:00:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rw7r/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFG4rw7r/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="19547034" Original-Received: from 184-175-14-235.dsl.teksavvy.com (HELO pastel.home) ([184.175.14.235]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Jul 2013 15:00:47 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6B3F262E1C; Mon, 22 Jul 2013 15:00:53 -0400 (EDT) In-Reply-To: <87r4eqla94.fsf@gmx.de> (Michael Albinus's message of "Mon, 22 Jul 2013 20:28:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:162073 Archived-At: >> 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