From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: 25.0.50; gfile-based file notifications are not immediate Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Oct 2014 00:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18861@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14144561857404 (code B ref -1); Tue, 28 Oct 2014 00:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 00:29:45 +0000 Received: from localhost ([127.0.0.1]:37059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiufP-0001vL-UX for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50196) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiufN-0001v5-6N for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiufC-0006Hg-IV for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiufC-0006Hb-GP for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xiuf7-0007gB-29 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xiuf1-0006GM-TV for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:24 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xiuf1-0006G9-I1 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E767420CB8 for ; Mon, 27 Oct 2014 20:29:17 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 27 Oct 2014 20:29:17 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=/i5TsTruFtzx7C/QNjS10kNYAZY=; b=pjEh BQUygHxe0tujSfqeh3h9of6cbx3VqbYAMfQG25D1CZXrvC1DMfTqkdkugHMH9gpR dFIU8bY03J9oQxdoUP17lQVhamb6YAT7LYqazLyk0FeZSCVhuY2LIBwl0wAx9gat H3DbOHzrsF86fXcfupjckI7TSVlMo0ooOe7zf2k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=/i5TsTruFtz x7C/QNjS10kNYAZY=; b=dHWcM3DeGxoHLq/V6f8grNLzbWjm/QlPyg3Di4Czl1W vBUqo8XW6DS8hHE+CcUqiwLnac+h1hZbkVhedjiVVKu1/tvaBi4y4MHR8cHYiTl1 vfbqfSvtokoUim49xBlSm8AVA9bPZI50HR6l/tDAWvIhTJHfLUxdYjTHVJBoUSMw = X-Sasl-enc: WmxjRXYn1Fe5uvQs/nq/PEI4l6jxCOIEb+iSeFwOWydu 1414456157 Received: from shorty.local (unknown [23.243.192.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E48AC00006 for ; Mon, 27 Oct 2014 20:29:17 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Xiuey-0002h2-8m for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 17:29:16 -0700 From: Dima Kogan Date: Mon, 27 Oct 2014 17:29:16 -0700 Message-ID: <87zjchdokj.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a bug-tracker entry for this mailing list post: http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00941.html Contents of the post: In the last few days I started several threads about various details of file notification and auto-revert behavior. This one is about some incorrect behavior of notifications using the 'gfile' (gio from glib) backend. As in the inotify thread, I set up a simple test. I built emacs using ./configure --with-file-notification=gfile I then ran ./emacs --eval "`cat /tmp/tstnotify.el`" -Q -nw with tstnotify.el being (progn (require 'filenotify) (dolist (fil '("/tmp/tst1" "/tmp/tst2")) (file-notify-add-watch fil '(change attribute-change) (lambda (event) (message "notify event %s" event))) (find-file fil)) (switch-to-buffer "*Messages*")) Here I ask for notifications for two files, and print out the events as they come in. While emacs is running this way, I modify those two files using an external tool. I would expect to see modification events for both of these files, as soon as these modifications happen. Instead, the notifications come in either 30 seconds later, or whenever anything goes through emacs's input queue. So the notification is greatly delayed if the user is not touching their emacs. The reason is that when emacs is idle, it's blocking in the pselect() call in xg_select() in process.c. pselect() is an operating-system call, not a glib one. Later on in xg_select() there's some code to kick the glib event loop, but as long as we're sitting in the pselect(), that secondary event loop remains untouched. Even if you kick the event loop in time, the notification is still delayed a few seconds (I verified this with some test code, outside of emacs; can post if anybody wants it). THIS is a separate issue that is likely a bug in glib. On Linux it uses inotify internally, so if one was using Linux, would there be any reason to use this notification scheme instead of using inotify directly? Are there OSs where emacs supports notifications ONLY through glib? From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Oct 2014 04:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18861@debbugs.gnu.org Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.141447031430394 (code B ref 18861); Tue, 28 Oct 2014 04:26:02 +0000 Received: (at 18861) by debbugs.gnu.org; 28 Oct 2014 04:25:14 +0000 Received: from localhost ([127.0.0.1]:37105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiyLJ-0007uA-V2 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 00:25:14 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiyLG-0007u0-2U for 18861@debbugs.gnu.org; Tue, 28 Oct 2014 00:25:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7498720CEA for <18861@debbugs.gnu.org>; Tue, 28 Oct 2014 00:25:09 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 28 Oct 2014 00:25:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=cXmRMQFFJHDI dKoTCkP7TcbWz/Y=; b=PRXJcBiXFEiN3xbTL9VHQUeTPbXa6cqQY2f2ECjRi/rj WJUxwv3mb6Fun5+0bd9MO1ClGhO4oN+PGzi7ui0RsF6ibCFoNJbVQIcq1xA1GbVY OnQKv01tMCS/ogZVhhT64Gw4oQPskpEwY5b/S91zRAfE2O0VetPIHM9E603THZE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=cXmRMQFFJHDIdKoTCkP7TcbWz/Y=; b=gVHIlLE+iBDm5zHWpX4K XV1jJf3uu4zjp/7PoFzPOGTPZ/nbE+H2wfh6XLDUZJN4fhrHJAYqTNevRvDS7fEK 183u17poaHR5jGsvVFIRgEtM/MUDInsLyVEi5HsJTzlaIanOjoXGxXGng5McJFWX V1FEd9Iy1bnfayjacWX4HnA= X-Sasl-enc: NTz4YsdV9DePUvP0YhSkcXCKPX/YH4LqK5FPjCQKHXZT 1414470309 Received: from shorty.local (unknown [23.243.192.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 2C9C8C0000A for <18861@debbugs.gnu.org>; Tue, 28 Oct 2014 00:25:09 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XiyLE-0001FP-13 for 18861@debbugs.gnu.org; Mon, 27 Oct 2014 21:25:08 -0700 References: <87zjchdokj.fsf@secretsauce.net> From: Dima Kogan Date: Mon, 27 Oct 2014 21:22:10 -0700 In-reply-to: Message-ID: <87wq7kes7w.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I just looked into this, and it appears I spoke too soon. The emacs event loop IS correct. It asks glib for a list of file descriptors that need attention, and then calls select() on those and on other file descriptors that emacs cares about. The bug is in glib. It appears that the file descriptors it gives you don't get any activity when a notification occurs, so calling select() on them does anything. Bug report: https://bugzilla.gnome.org/show_bug.cgi?id=739274 If I fix this bug then select() works, but there's a delay of about 1sec between when the file modification is reported by inotify and when glib tells you about it. This is yet another glib bug that I haven't yet looked into. From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Oct 2014 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18861@debbugs.gnu.org Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.141453263932423 (code B ref 18861); Tue, 28 Oct 2014 21:44:01 +0000 Received: (at 18861) by debbugs.gnu.org; 28 Oct 2014 21:43:59 +0000 Received: from localhost ([127.0.0.1]:38053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjEYY-0008Qs-Cv for submit@debbugs.gnu.org; Tue, 28 Oct 2014 17:43:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:38586) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjEYV-0008Qi-Gl for 18861@debbugs.gnu.org; Tue, 28 Oct 2014 17:43:56 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D30A920A43 for <18861@debbugs.gnu.org>; Tue, 28 Oct 2014 17:43:54 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 28 Oct 2014 17:43:54 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=WNBshXDZCL9D zcYlIl+szp52CXQ=; b=E7w4zTDKYwRWAymm9vi+w8nNFS0F8Yx2i2Nc4fGFoASP OvQTF8+eVHqFso8Mdctp9OXJI8tJ1oBiTscI7+PIbnH93mGP5nHXEVigKR7iLTom c9PgbznJOdefbqJgnu06ZiMvvmTOwrFqIMfc5Rlc485z6IA00baOUHWqIZ8GvRg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=WNBshXDZCL9DzcYlIl+szp52CXQ=; b=cG2nQYTMSrHT1oUmHx8V YW80yCvC+/iPQguzVCARjlhwxSoOwLzwKsEogj06DjZZ3FUNKE1E5ymO4JaJadGF PIqKj0Hhbc69lopG1haq+t9YWo5ReJ0RPslLUf0H89ATHeDmc0cNhLVpdBQNJdl9 Q10pLa8QPBzi0F6WenJ0LGc= X-Sasl-enc: tccjkqkeCuyJjF2NZuTwxCCOYY4CUA2tTav9JdBGqsYW 1414532634 Received: from shorty.local (unknown [208.90.186.108]) by mail.messagingengine.com (Postfix) with ESMTPA id 8D426680125 for <18861@debbugs.gnu.org>; Tue, 28 Oct 2014 17:43:54 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XjEYT-0002D3-IE for 18861@debbugs.gnu.org; Tue, 28 Oct 2014 14:43:53 -0700 References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> From: Dima Kogan Date: Tue, 28 Oct 2014 14:30:17 -0700 In-reply-to: <87wq7kes7w.fsf@secretsauce.net> Message-ID: <87vbn3eup2.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Control: tags -1 + patch Hi. A glib maintainer responded to the bug report, and it turns out emacs was using glib slightly incorrectly. I'm attaching a patch to fix the issue, as suggested by the maintainer. With this patch, the pselect() call in emacs does see the glib notification as it should. There is still an issue (also in glib) where this notification comes about 1 second after the actual file system activity, so I'm keeping this bug open. The glib bug tracker entry about THIS problem is here: https://bugzilla.gnome.org/show_bug.cgi?id=739322 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-xg_select-now-acquires-the-glib-context-before-query.patch >From eb3579400f098a7cb43f55e48262c2939ff33254 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 28 Oct 2014 14:29:01 -0700 Subject: [PATCH] xg_select() now acquires the glib context before querying it Prior to this patch we were calling g_main_context_query() without calling g_main_context_acquire(). This resulted in the file descriptors returned by g_main_context_query() missing activity. I.e. something would happen in glib, but a select() on the file descriptors would keep blocking. We now acquire the context, which makes select() return on activity, as it should. This is emacs and glib bugs: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18861 https://bugzilla.gnome.org/show_bug.cgi?id=739274 --- src/xgselect.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xgselect.c b/src/xgselect.c index bf889a9..a830b7d 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -55,11 +55,20 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, GPollFD *gfds = gfds_buf; int gfds_size = ARRAYELTS (gfds_buf); int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; + bool context_acquired = false; int i, nfds, tmo_in_millisec; bool need_to_dispatch; USE_SAFE_ALLOCA; context = g_main_context_default (); + if( g_main_context_acquire(context) != TRUE ) + { + // we couldn't acquire the context. I let this function proceed because it + // handles more than just glib file descriptors + retval = -1; + } + else + context_acquired = true; if (rfds) all_rfds = *rfds; else FD_ZERO (&all_rfds); @@ -152,6 +161,9 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, errno = pselect_errno; } + if (context_acquired) + g_main_context_release(context); + /* To not have to recalculate timeout, return like this. */ if ((our_fds > 0 || (nfds == 0 && tmop == &tmo)) && (retval == 0)) { -- 2.0.0 --=-=-=-- From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Oct 2014 16:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 18861@debbugs.gnu.org Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.141468556326100 (code B ref 18861); Thu, 30 Oct 2014 16:13:01 +0000 Received: (at 18861) by debbugs.gnu.org; 30 Oct 2014 16:12:43 +0000 Received: from localhost ([127.0.0.1]:40690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjsL5-0006mt-4e for submit@debbugs.gnu.org; Thu, 30 Oct 2014 12:12:43 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:48793) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XjsL2-0006mj-79 for 18861@debbugs.gnu.org; Thu, 30 Oct 2014 12:12:41 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s9UGCc5w025760; Thu, 30 Oct 2014 12:12:38 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 21567660F3; Thu, 30 Oct 2014 12:12:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> Date: Thu, 30 Oct 2014 12:12:40 -0400 In-Reply-To: <87vbn3eup2.fsf@secretsauce.net> (Dima Kogan's message of "Tue, 28 Oct 2014 14:30:17 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5110=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5110> : inlines <1461> : streams <1330528> : uri <1830466> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) > Hi. A glib maintainer responded to the bug report, and it turns out > emacs was using glib slightly incorrectly. I'm attaching a patch to fix > the issue, as suggested by the maintainer. Thanks. This is not my area of expertise at all, but since it seems that noone else has replied yet, I'll try to move it along. > + if( g_main_context_acquire(context) != TRUE ) > + { > + // we couldn't acquire the context. I let this function proceed because it > + // handles more than just glib file descriptors > + retval = -1; > + } > + else > + context_acquired = true; [ Please follow our coding conventions: put a space before open parens (and not after, nor before close parens); use /*...*/ for comments; capitalize and punctuate comments; use two spaces between sentences. Also, I think "!g_main_context_acquire (context)" would be cleaner than "g_main_context_acquire (context) != TRUE". I find comparing to NULL, true, or false generally ugly, tho maybe that's just a personal taste of mine that others don't share. ] Why set retval to -1? It seems safer to leave it unchanged (ie. set to 0). Stefan From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Nov 2014 19:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 18861@debbugs.gnu.org Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.141521534227704 (code B ref 18861); Wed, 05 Nov 2014 19:23:01 +0000 Received: (at 18861) by debbugs.gnu.org; 5 Nov 2014 19:22:22 +0000 Received: from localhost ([127.0.0.1]:50364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm69u-0007Cl-0m for submit@debbugs.gnu.org; Wed, 05 Nov 2014 14:22:22 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56388) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm69r-0007Cd-7e for 18861@debbugs.gnu.org; Wed, 05 Nov 2014 14:22:20 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C7CF020B08 for <18861@debbugs.gnu.org>; Wed, 5 Nov 2014 14:22:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 05 Nov 2014 14:22:18 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=+2FltSNkQ4QC FZlVXLLt3kM1Rq0=; b=Dh3keaAkAk2ofaq0ioWkIZ+J6KL1d2MLXHvG2OB7/WFg GOf4/R5tZirChx/gw+HAyuy2SXhduCgUibCJIkGjywVofgcI1gnp1c4IVIAE2NX8 nBnO9tMKSlOaK82oWR4oViMLzp4a7P4jnKRIvP0902NtI8TTNcIvK7pOKfF8lwg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=+2FltSNkQ4QCFZlVXLLt3kM1Rq0=; b=puIMHaMQTl6QcspYFQiA UcrHqKPo07x9BbZmBLmSnz7ONBQ5XcP5q30dKinFO2FcGeNRPU+YydfNR4gAooQt fuCotRnPSukED0gwukwwWknw55OcO3OMMJ7CS1ZV7JTQEzlrjUFjZEA98dKVpq0U s03iHPaelh6jYiMYajCZtJY= X-Sasl-enc: /1oFDHiJP/eheWAp5EM4ZTi/rP2zdkI3aJ5X5g5Lqr7X 1415215338 Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 817ACC0000E; Wed, 5 Nov 2014 14:22:18 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Xm69p-0007yR-B9; Wed, 05 Nov 2014 11:22:17 -0800 References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> From: Dima Kogan Date: Wed, 05 Nov 2014 11:19:46 -0800 In-reply-to: Message-ID: <877fz9cv12.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> Hi. A glib maintainer responded to the bug report, and it turns out >> emacs was using glib slightly incorrectly. I'm attaching a patch to fix >> the issue, as suggested by the maintainer. > > Thanks. This is not my area of expertise at all, but since it seems > that noone else has replied yet, I'll try to move it along. > >> + if( g_main_context_acquire(context) != TRUE ) >> + { >> + // we couldn't acquire the context. I let this function proceed because it >> + // handles more than just glib file descriptors >> + retval = -1; >> + } >> + else >> + context_acquired = true; > > [ Please follow our coding conventions: put a space before open parens > (and not after, nor before close parens); use /*...*/ for comments; > capitalize and punctuate comments; use two spaces between sentences. > Also, I think "!g_main_context_acquire (context)" would be cleaner than > "g_main_context_acquire (context) != TRUE". I find comparing to NULL, > true, or false generally ugly, tho maybe that's just a personal taste > of mine that others don't share. ] > > Why set retval to -1? It seems safer to leave it unchanged (ie. set to 0). OK. How about the attached? The error-handling logic is better, and we don't touch glib if we couldn't acquire the context. However in this patch if we COULDN'T talk to glib, but we COULD talk to our own file descriptors, then xg_select() returns success, and there is no error reporting. Probably not what we want. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-xg_select-now-acquires-the-glib-context-before-query.patch >From 1fcced5536c8d99032303fb0f547aa67a5cccd30 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 28 Oct 2014 14:29:01 -0700 Subject: [PATCH] xg_select() now acquires the glib context before querying it Prior to this patch we were calling g_main_context_query() without calling g_main_context_acquire(). This resulted in the file descriptors returned by g_main_context_query() missing activity. I.e. something would happen in glib, but a select() on the file descriptors would keep blocking. We now acquire the context, which makes select() return on activity, as it should. This is emacs and glib bugs: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18861 https://bugzilla.gnome.org/show_bug.cgi?id=739274 --- src/xgselect.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/xgselect.c b/src/xgselect.c index bf889a9..7dee38d 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -55,19 +55,28 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, GPollFD *gfds = gfds_buf; int gfds_size = ARRAYELTS (gfds_buf); int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; - int i, nfds, tmo_in_millisec; + bool context_acquired = false; + int i, nfds, tmo_in_millisec = -1; bool need_to_dispatch; USE_SAFE_ALLOCA; + /* If we couldn't acquire the context, I let this function proceed because it + handles more than just glib file descriptors. Note that, as implemented, + this failure is completely silent: there is no feedback to the caller. */ context = g_main_context_default (); + if (g_main_context_acquire(context)) + context_acquired = true; if (rfds) all_rfds = *rfds; else FD_ZERO (&all_rfds); if (wfds) all_wfds = *wfds; else FD_ZERO (&all_wfds); - n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, - gfds, gfds_size); + n_gfds = context_acquired ? + g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, + gfds, gfds_size) : + -1; + if (gfds_size < n_gfds) { SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds); @@ -152,6 +161,9 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, errno = pselect_errno; } + if (context_acquired) + g_main_context_release(context); + /* To not have to recalculate timeout, return like this. */ if ((our_fds > 0 || (nfds == 0 && tmop == &tmo)) && (retval == 0)) { -- 2.0.0 --=-=-=-- From unknown Mon Sep 08 16:26:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dima Kogan Subject: bug#18861: closed (Re: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate)) Message-ID: References: <87zjchdokj.fsf@secretsauce.net> X-Gnu-PR-Message: they-closed 18861 X-Gnu-PR-Package: emacs Reply-To: 18861@debbugs.gnu.org Date: Thu, 06 Nov 2014 03:04:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1415243042-29490-1" This is a multi-part message in MIME format... ------------=_1415243042-29490-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18861: 25.0.50; gfile-based file notifications are not immediate which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18861@debbugs.gnu.org. --=20 18861: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18861 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1415243042-29490-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18861-done) by debbugs.gnu.org; 6 Nov 2014 03:03:02 +0000 Received: from localhost ([127.0.0.1]:50678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmDLh-0007e6-EW for submit@debbugs.gnu.org; Wed, 05 Nov 2014 22:03:01 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:55400) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmDLe-0007dr-O4 for 18861-done@debbugs.gnu.org; Wed, 05 Nov 2014 22:02:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au0MAOatTlRLd+sd/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBBFYhAhALNBIUGA0kiFTLcgEBAQEGAQEBAR6RCAeESwWLZJMukH2CEYFvgjSBYh+CegEBAQ X-IPAS-Result: Au0MAOatTlRLd+sd/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBBFYhAhALNBIUGA0kiFTLcgEBAQEGAQEBAR6RCAeESwWLZJMukH2CEYFvgjSBYh+CegEBAQ X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="96074823" Received: from 75-119-235-29.dsl.teksavvy.com (HELO ceviche.home) ([75.119.235.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Nov 2014 22:02:57 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 5D93C660D4; Wed, 5 Nov 2014 22:02:57 -0500 (EST) From: Stefan Monnier To: Dima Kogan Subject: Re: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Message-ID: References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> <877fz9cv12.fsf@secretsauce.net> Date: Wed, 05 Nov 2014 22:02:57 -0500 In-Reply-To: <877fz9cv12.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 05 Nov 2014 11:19:46 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18861-done Cc: 18861-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Thanks Dima, Seeing as noone made any comment, I just installed your patch (with minor tweaks) and hope it does the right thing. Stefan > + if (g_main_context_acquire(context)) ^^ Missing space before paren. > + n_gfds = context_acquired ? > + g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, > + gfds, gfds_size) : > + -1; The GNU coding style recommends to break lines before rather than after operators. > + g_main_context_release(context); ^^ Same. ------------=_1415243042-29490-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 00:29:45 +0000 Received: from localhost ([127.0.0.1]:37059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiufP-0001vL-UX for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50196) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiufN-0001v5-6N for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiufC-0006Hg-IV for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiufC-0006Hb-GP for submit@debbugs.gnu.org; Mon, 27 Oct 2014 20:29:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xiuf7-0007gB-29 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xiuf1-0006GM-TV for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:24 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xiuf1-0006G9-I1 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 20:29:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E767420CB8 for ; Mon, 27 Oct 2014 20:29:17 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 27 Oct 2014 20:29:17 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=/i5TsTruFtzx7C/QNjS10kNYAZY=; b=pjEh BQUygHxe0tujSfqeh3h9of6cbx3VqbYAMfQG25D1CZXrvC1DMfTqkdkugHMH9gpR dFIU8bY03J9oQxdoUP17lQVhamb6YAT7LYqazLyk0FeZSCVhuY2LIBwl0wAx9gat H3DbOHzrsF86fXcfupjckI7TSVlMo0ooOe7zf2k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=/i5TsTruFtz x7C/QNjS10kNYAZY=; b=dHWcM3DeGxoHLq/V6f8grNLzbWjm/QlPyg3Di4Czl1W vBUqo8XW6DS8hHE+CcUqiwLnac+h1hZbkVhedjiVVKu1/tvaBi4y4MHR8cHYiTl1 vfbqfSvtokoUim49xBlSm8AVA9bPZI50HR6l/tDAWvIhTJHfLUxdYjTHVJBoUSMw = X-Sasl-enc: WmxjRXYn1Fe5uvQs/nq/PEI4l6jxCOIEb+iSeFwOWydu 1414456157 Received: from shorty.local (unknown [23.243.192.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E48AC00006 for ; Mon, 27 Oct 2014 20:29:17 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Xiuey-0002h2-8m for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 17:29:16 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 25.0.50; gfile-based file notifications are not immediate Date: Mon, 27 Oct 2014 17:29:16 -0700 Message-ID: <87zjchdokj.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a bug-tracker entry for this mailing list post: http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00941.html Contents of the post: In the last few days I started several threads about various details of file notification and auto-revert behavior. This one is about some incorrect behavior of notifications using the 'gfile' (gio from glib) backend. As in the inotify thread, I set up a simple test. I built emacs using ./configure --with-file-notification=gfile I then ran ./emacs --eval "`cat /tmp/tstnotify.el`" -Q -nw with tstnotify.el being (progn (require 'filenotify) (dolist (fil '("/tmp/tst1" "/tmp/tst2")) (file-notify-add-watch fil '(change attribute-change) (lambda (event) (message "notify event %s" event))) (find-file fil)) (switch-to-buffer "*Messages*")) Here I ask for notifications for two files, and print out the events as they come in. While emacs is running this way, I modify those two files using an external tool. I would expect to see modification events for both of these files, as soon as these modifications happen. Instead, the notifications come in either 30 seconds later, or whenever anything goes through emacs's input queue. So the notification is greatly delayed if the user is not touching their emacs. The reason is that when emacs is idle, it's blocking in the pselect() call in xg_select() in process.c. pselect() is an operating-system call, not a glib one. Later on in xg_select() there's some code to kick the glib event loop, but as long as we're sitting in the pselect(), that secondary event loop remains untouched. Even if you kick the event loop in time, the notification is still delayed a few seconds (I verified this with some test code, outside of emacs; can post if anybody wants it). THIS is a separate issue that is likely a bug in glib. On Linux it uses inotify internally, so if one was using Linux, would there be any reason to use this notification scheme instead of using inotify directly? Are there OSs where emacs supports notifications ONLY through glib? ------------=_1415243042-29490-1-- From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Nov 2014 08:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18861@debbugs.gnu.org Cc: monnier@iro.umontreal.ca, dima@secretsauce.net Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.141526306231212 (code B ref 18861); Thu, 06 Nov 2014 08:38:01 +0000 Received: (at 18861) by debbugs.gnu.org; 6 Nov 2014 08:37:42 +0000 Received: from localhost ([127.0.0.1]:51053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmIZa-00087L-65 for submit@debbugs.gnu.org; Thu, 06 Nov 2014 03:37:42 -0500 Received: from mout.gmx.net ([212.227.17.21]:54110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmIZX-00087D-Nb for 18861@debbugs.gnu.org; Thu, 06 Nov 2014 03:37:40 -0500 Received: from detlef.gmx.de ([87.146.47.108]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lkfii-1YMjqj42J2-00aRlq; Thu, 06 Nov 2014 09:37:34 +0100 From: Michael Albinus References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> <877fz9cv12.fsf@secretsauce.net> Date: Thu, 06 Nov 2014 09:37:31 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 05 Nov 2014 22:02:57 -0500") Message-ID: <87ioisk9mc.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:WOIgcVfJktnRL92e2TKgsZ6NfSSzDpv7nf6ds3IqaXe3wbxAkS9 b5QFNpmm8lEBsIVJ0bB1uGaDwObTN/HImg1h7UkzcZqL3IGskY3iaZZtkj/Mo/i8Tq2BBUj fzJKX+YSniJQeGAjvwo06a0xMCjr5+i+omg+IhbIZQxdXcchOemEHtRCDCkjBsAoya+TpAh 82ylbczHu3FQrHvJQa9ew== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: > Seeing as noone made any comment, I just installed your patch (with minor > tweaks) and hope it does the right thing. Thanks. It is still on my list to step through all the file notifications discussion from the last 3 weeks. But this list is much too long, and I've started with Tramp isues. > Stefan Best regards, Michael. From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Nov 2014 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 18861@debbugs.gnu.org Received: via spool by 18861-submit@debbugs.gnu.org id=B18861.14152985542132 (code B ref 18861); Thu, 06 Nov 2014 18:30:02 +0000 Received: (at 18861) by debbugs.gnu.org; 6 Nov 2014 18:29:14 +0000 Received: from localhost ([127.0.0.1]:52053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmRo2-0000YJ-8c for submit@debbugs.gnu.org; Thu, 06 Nov 2014 13:29:14 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58390) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmRny-0000Y5-Re for 18861@debbugs.gnu.org; Thu, 06 Nov 2014 13:29:12 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 62BFA207AC for <18861@debbugs.gnu.org>; Thu, 6 Nov 2014 13:29:10 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 06 Nov 2014 13:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:references:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=OO3mIxBXlkdE Lu4B4xynESdYjkU=; b=aMu+FwLkyg/jarFnq5b3cTtm+9598RGepgmCtxEVchVk Z07zuJjT0XBW66KgjJ3Hk3G/NAj40uKAQ4zolR1k0tFnT7178aHDjGZ07cxu3NpG 8emwRCftNjEN4WVEldNoS6w5PNK6Y2P68x+oN+xRJwA9pOTF1NEdBDeZ43cqsyc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=OO3mIxBXlkdELu4B4xynESdYjkU=; b=dyOrsEjH5IT7eBfQGs+C vJ4pIZxpzyfldE8THUj8zrjud6ov/wMm5v1B9/cu++LNmA56khFUZXMb7frr9LV/ hmUnpdRbl/tT1Byn761uGiGqkDEm25hR3koaIcKqOsjFXGHRqigdz/u/btEOi5ok D5JPtdQG9M8QxfY6kgA5Vc0= X-Sasl-enc: x23nCP4mgolckVBCxHlctRUF0cQ2zlpolUjcDGeXjq66 1415298550 Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A7EC6801AB; Thu, 6 Nov 2014 13:29:10 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XmRnw-0006XI-Qk; Thu, 06 Nov 2014 10:29:08 -0800 References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> <877fz9cv12.fsf@secretsauce.net> From: Dima Kogan Date: Thu, 06 Nov 2014 10:26:41 -0800 In-reply-to: Message-ID: <87oaskb2tn.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: > Seeing as noone made any comment, I just installed your patch (with minor > tweaks) and hope it does the right thing. Thank you very much, Stefan. Seeing as how there's still a 1-second delay here that's caused by glib, should this bug remain open? There were 2 issues here, and the patch only fixes one of them. glib bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=739322 https://bugzilla.gnome.org/show_bug.cgi?id=627285 This isn't strictly under our control, so maybe it does make sense to close? From unknown Mon Sep 08 16:26:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18861: Acknowledgement (25.0.50; gfile-based file notifications are not immediate) Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Nov 2014 23:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 18861-done@debbugs.gnu.org Received: via spool by 18861-done@debbugs.gnu.org id=D18861.141531693130963 (code D ref 18861); Thu, 06 Nov 2014 23:36:02 +0000 Received: (at 18861-done) by debbugs.gnu.org; 6 Nov 2014 23:35:31 +0000 Received: from localhost ([127.0.0.1]:52251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmWaR-00083K-AU for submit@debbugs.gnu.org; Thu, 06 Nov 2014 18:35:31 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:39055) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmWaQ-00083A-22 for 18861-done@debbugs.gnu.org; Thu, 06 Nov 2014 18:35:30 -0500 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sA6NZSsu004064; Thu, 6 Nov 2014 18:35:28 -0500 Received: by ceviche.home (Postfix, from userid 20848) id C4E3966125; Thu, 6 Nov 2014 18:35:27 -0500 (EST) From: Stefan Monnier Message-ID: References: <87zjchdokj.fsf@secretsauce.net> <87wq7kes7w.fsf@secretsauce.net> <87vbn3eup2.fsf@secretsauce.net> <877fz9cv12.fsf@secretsauce.net> <87oaskb2tn.fsf@secretsauce.net> Date: Thu, 06 Nov 2014 18:35:27 -0500 In-Reply-To: <87oaskb2tn.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 06 Nov 2014 10:26:41 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV5117=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5117> : inlines <1499> : streams <1337191> : uri <1833034> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) > This isn't strictly under our control, so maybe it does make sense to > close? Yes, closing. Stefan