From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Using glib's g_file_monitor_file and g_file_monitor_directory Date: Thu, 21 Mar 2013 10:06:32 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87ehf8zw2f.fsf@lifelogs.com> References: <87zjxxn6th.fsf@gmx.de> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363875044 19761 80.91.229.3 (21 Mar 2013 14:10:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2013 14:10:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 21 15:11:07 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 1UIgCq-0006qt-C3 for ged-emacs-devel@m.gmane.org; Thu, 21 Mar 2013 15:11:00 +0100 Original-Received: from localhost ([::1]:36937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIgCP-000287-Cf for ged-emacs-devel@m.gmane.org; Thu, 21 Mar 2013 10:10:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIgCD-00026g-LX for emacs-devel@gnu.org; Thu, 21 Mar 2013 10:10:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIgBr-0007KY-Ai for emacs-devel@gnu.org; Thu, 21 Mar 2013 10:10:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIgBr-0007HO-4c for emacs-devel@gnu.org; Thu, 21 Mar 2013 10:09:59 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UIgBx-00069t-AA for emacs-devel@gnu.org; Thu, 21 Mar 2013 15:10:05 +0100 Original-Received: from pool-72-70-75-213.bstnma.east.verizon.net ([72.70.75.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Mar 2013 15:10:05 +0100 Original-Received: from tzz by pool-72-70-75-213.bstnma.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Mar 2013 15:10:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-72-70-75-213.bstnma.east.verizon.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:7V3+tox4+fSTtU+pDsTOI/5MLdI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:158026 Archived-At: On Wed, 20 Mar 2013 21:40:26 +0100 Michael Albinus wrote: MA> for GNU/Linux systems, we have inotify support now. As discussed when it MA> was added, there are some drawbacks. So it seems to work for local file MA> systems only; network file systems might work, or not. MA> There is an alternative: glib's functions g_file_monitor_file and MA> g_file_monitor_directory. They will use inotify when it is MA> applicable. Otherwise, they implement polling, which is something we MA> would need also in Emacs, when no native file monitoring is possible. MA> g_file_monitor_file works even for gvfs mounted filesystems (I've tested MA> with mounts of kind davs://..., smb://... and ftp://...). Likely, via MA> polling. MA> And it also has a kqueue backend for NetBSD (see MA> https://mail.gnome.org/archives/commits-list/2012-November/msg03867.html). I MA> don't know whether this is used widely, 'tho. MA> What about adding this interface to Emacs, on C level? It could be in MA> parallel to, or replacing the inotify interface. I am in favor, replacing the existing inotify backend and keeping the same API if possible, but there should be a way to avoid polling, even disable it by default, and I hope it's asynchronous to some degree. You can imagine how slow polling a ftp connection can be... Ted