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: Reading D-Bus messages Date: Wed, 12 Aug 2009 11:43:37 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250070254 18021 80.91.229.12 (12 Aug 2009 09:44:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2009 09:44:14 +0000 (UTC) Cc: Mario Lang To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 12 11:44:07 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MbANK-0006Sd-5T for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 11:44:06 +0200 Original-Received: from localhost ([127.0.0.1]:55471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbANI-0005uu-5n for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 05:44:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbANA-0005t5-0V for emacs-devel@gnu.org; Wed, 12 Aug 2009 05:43:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbAN4-0005n4-Bw for emacs-devel@gnu.org; Wed, 12 Aug 2009 05:43:55 -0400 Original-Received: from [199.232.76.173] (port=35343 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbAN4-0005mo-3d for emacs-devel@gnu.org; Wed, 12 Aug 2009 05:43:50 -0400 Original-Received: from mailrelay1.alcatel.de ([194.113.59.95]:47093) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbAN3-00040k-9V for emacs-devel@gnu.org; Wed, 12 Aug 2009 05:43:49 -0400 Original-Received: from destgsu0048.stgl.sel.alcatel.de (destgsu0048.de.alcatel-lucent.com [149.204.242.4]) by mailrelay1.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id n7C9hcVg012259; Wed, 12 Aug 2009 11:43:38 +0200 Original-Received: from slbhn1.alcatel.de (slbhn1.de.alcatel-lucent.com [149.204.90.35]) by destgsu0048.stgl.sel.alcatel.de (8.12.3/8.12.3) with ESMTP id n7C9hcY4012857; Wed, 12 Aug 2009 11:43:38 +0200 (MEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Alcanet-virus-scanned: n7C9hcY4012857 at destgsu0048.stgl.sel.alcatel.de X-Scanned-By: MIMEDefang 2.57 on 149.204.45.72 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114135 Archived-At: Hi, D-Bus messages are arriving to Emacs asynchronously. Unfortunately, there is no trigger mechanism which notifies the arrival of a message; one must poll for new incoming messages via dbus_connection_read_write(). The call of this method is wrapped by xd_read_queued_messages() of dbusbind.c, which is called in gobble_input() (see keyboard.c). D-Bus messages are converted into Emacs events, and stored via kbd_buffer_store_event(). This works fine, as long as Emacs runs in a window manager. redisplay() runs periodically, which includes reading the D-Bus messages. When Emacs is started in a terminal, this does not work anymore. The input handling seems to wait for keyboard interrupts and alike, and does NOT poll anymore, whether there are other incoming events. How shall xd_read_queued_messages() be activated in such a case? Best regards, Michael.