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: Using glib's g_file_monitor_file and g_file_monitor_directory Date: Wed, 05 Jun 2013 15:25:23 +0200 Message-ID: <878v2od70c.fsf@gmx.de> References: <87zjxxn6th.fsf@gmx.de> <83mwrd6c54.fsf@gnu.org> <87obbtaie8.fsf@gmx.de> <83bo7ozc0q.fsf@gnu.org> <87zjxxn6th.fsf@gmx.de> <87hajqpjn1.fsf@gmx.de> <8738t7pewc.fsf@gmx.de> <83fvx7p1h4.fsf@gnu.org> <877gihc3qm.fsf@gmx.de> <83mwrd6c54.fsf@gnu.org> <87obbtaie8.fsf@gmx.de> <83bo7ozc0q.fsf@gnu.org> <87bo7ngwj8.fsf@gmx.de> <83mwr7xm7b.fsf@gnu.org> <3d7gibw6sa.fsf@fencepost.gnu.org> <83bo7nxim8.fsf@gnu.org> <834ndfxh0g.fsf@gnu.org> <2cobbnt897.fsf@fencepost.gnu.org> <87ip1vq8wy.fsf@gmx.de> <51AD8485.90201@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1370438742 26264 80.91.229.3 (5 Jun 2013 13:25:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Jun 2013 13:25:42 +0000 (UTC) Cc: Jan =?utf-8?Q?Dj=C3=A4rv?= , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 05 15:25:41 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 1UkDie-0006tG-3V for ged-emacs-devel@m.gmane.org; Wed, 05 Jun 2013 15:25:40 +0200 Original-Received: from localhost ([::1]:57135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDid-00035k-LH for ged-emacs-devel@m.gmane.org; Wed, 05 Jun 2013 09:25:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDiX-0002yx-5I for emacs-devel@gnu.org; Wed, 05 Jun 2013 09:25:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkDiV-0003Zq-Hz for emacs-devel@gnu.org; Wed, 05 Jun 2013 09:25:33 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:60086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDiV-0003Zd-5J for emacs-devel@gnu.org; Wed, 05 Jun 2013 09:25:31 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.27]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LwkcQ-1UMAUr3yXY-016SIx for ; Wed, 05 Jun 2013 15:25:30 +0200 Original-Received: (qmail invoked by alias); 05 Jun 2013 13:25:29 -0000 Original-Received: from p5DCA363C.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [93.202.54.60] by mail.gmx.net (mp027) with SMTP; 05 Jun 2013 15:25:29 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/UxxxXfGPUB0uZTae8RBn+i6qoQUyRgoUaHDOGeS EtxgfM+l+eVc8h In-Reply-To: <51AD8485.90201@cs.ucla.edu> (Paul Eggert's message of "Mon, 03 Jun 2013 23:09:09 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.19 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:160104 Archived-At: Paul Eggert writes: > I tried the new monitor and it made Emacs freeze. > I was running "emacs -nw", which I think may help explain the problem. > Fedora 17, x86-64. Here's what I ran: > > (gfile-add-watch "/tmp/foo" '() (lambda (ev) (message "%s" ev))) > > Here are the diagnostics that were blatted > onto my screen before Emacs froze: > > (process:11082): GLib-GObject-CRITICAL **: gtype.c:2722: You forgot to > call g_type_init() I've committed a patch to the trunk which prevents this crash. However, if you call "emacs -nw", you won't get any notification. I suppose we need an generalized g_main_loop integration, synchronized with the code in gtkutil.c. Likely, we must move this code out of gtkutil.c and gfilenotify.c. Jan? Best regards, Michael.