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: Using glib's g_file_monitor_file and g_file_monitor_directory Date: Wed, 29 May 2013 13:40:08 -0400 Message-ID: References: <87zjxxn6th.fsf@gmx.de> <87hajqpjn1.fsf@gmx.de> <8738t7pewc.fsf@gmx.de> <51A4C2E9.8040000@cs.ucla.edu> <83d2sbp1ao.fsf@gnu.org> <51A4D4FE.2020202@cs.ucla.edu> <87y5axaogx.fsf@gmx.de> <87txllaneq.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369849399 18436 80.91.229.3 (29 May 2013 17:43:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 May 2013 17:43:19 +0000 (UTC) Cc: Eli Zaretskii , Paul Eggert , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 29 19:43:17 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 1UhkP7-0002EY-BW for ged-emacs-devel@m.gmane.org; Wed, 29 May 2013 19:43:17 +0200 Original-Received: from localhost ([::1]:60660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhkP6-0003ky-Ro for ged-emacs-devel@m.gmane.org; Wed, 29 May 2013 13:43:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhkP0-0003dw-3A for emacs-devel@gnu.org; Wed, 29 May 2013 13:43:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhkOv-0007dZ-Fv for emacs-devel@gnu.org; Wed, 29 May 2013 13:43:10 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:42220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhkOc-0007Dx-N6; Wed, 29 May 2013 13:43:05 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r4THe8ms014356; Wed, 29 May 2013 13:40:08 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1C339B4319; Wed, 29 May 2013 13:40:08 -0400 (EDT) In-Reply-To: <87txllaneq.fsf@gmx.de> (Michael Albinus's message of "Wed, 29 May 2013 16:09:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4594=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4594> : streams <970341> : uri <1433377> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:159900 Archived-At: >>> I believe all events which are not raised by an user action (keyboard, >>> mouse, etc) shall be handled by such a separate queue. Currently, >>> TIMER_EVENT, BUFFER_SWITCH_EVENT, DBUS_EVENT and FILE_NOTIFY_EVENT would >>> fall into this category. Maybe also USER_SIGNAL_EVENT. >> I'm not sure I'd put BUFFER_SWITCH_EVENT in there, but I agree about the >> other ones. > I haven't used it yet, but the doc in termhooks.h says > BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */ > This doesn't sound like triggered by a user action. AFAIK this event is only inserted when we're waiting for user input (see record_asynch_buffer_change). Furthermore, I'd argue that the right way to handle such switches is to consider them as bugs (i.e. we could just throw BUFFER_SWITCH_EVENT away). Stefan