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: file watch feature missing on darwin Date: Wed, 22 Jan 2014 10:56:37 +0100 Message-ID: <87vbxcz6ei.fsf@gmx.de> References: <87sitahfjc.fsf@gmx.de> <87mwjigyox.fsf@gmx.de> <5F01B759-6927-4029-835F-9FFB4CD6313B@swipnet.se> <87iou6gtv0.fsf@gmx.de> <87bnzastap.fsf@gmx.de> <52DF88C1.7090606@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390384617 25171 80.91.229.3 (22 Jan 2014 09:56:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2014 09:56:57 +0000 (UTC) Cc: Leo Liu , emacs-devel To: "Jan D." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 22 10:57:03 2014 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 1W5uYN-0002BL-CZ for ged-emacs-devel@m.gmane.org; Wed, 22 Jan 2014 10:56:59 +0100 Original-Received: from localhost ([::1]:34449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5uYN-0006J5-0q for ged-emacs-devel@m.gmane.org; Wed, 22 Jan 2014 04:56:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5uYE-0006H4-Du for emacs-devel@gnu.org; Wed, 22 Jan 2014 04:56:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5uY6-0005C8-WE for emacs-devel@gnu.org; Wed, 22 Jan 2014 04:56:50 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:58546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5uY6-0005C2-MB for emacs-devel@gnu.org; Wed, 22 Jan 2014 04:56:42 -0500 Original-Received: from detlef.gmx.de ([93.209.85.60]) by mail.gmx.com (mrgmx103) with ESMTPS (Nemesis) id 0MGB7j-1W8OrP44Ln-00FC1l for ; Wed, 22 Jan 2014 10:56:41 +0100 In-Reply-To: <52DF88C1.7090606@swipnet.se> (Jan D.'s message of "Wed, 22 Jan 2014 10:00:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:wHw1KNLP7FQhZM4JPQqrprj85eIaCWa1KVVT4b0tT/B5vqZTXoW FUPDf6Y2OquLuTIxgnVc+at+AuRInn5EzKYRSUiRs2N7vaXSJLyrIIO6Us8U5BD4Py+5Pfl GanSM2Asf/GBUVLR0g4rKCO3a+EQeWBYiEt4Blmg47YGhQLQDrXHBVPCcljs1yxOWd6XEeg OODPil5SCm5JCzIrAKWJQ== 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:168880 Archived-At: "Jan D." writes: Hi Jan, >> I'm just checking how to receive file notification events in batch >> mode. It works fine when inotify.c is linked with Emacs, using >> (read-event ...), but I'm not able to receive events when gfilenotify.c >> is linked. >> >> No problem when Emacs runs interactively. Do you know, how I could >> retrieve events in that case? > > The select in the NS port runs in another thread. So just switching > to xg_select will not do. You have to explicitly check if in batch > mode, then check if GLib has file descriptors we don't know about, and > then call xg_select in the main thread. Thanks. I've created Bug#16519 for the time being, 'cause I'm not skilled to fix it immediately. Will start to read respective documentation & sources ... > Jan D. Best regards, Michael.