From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Mon, 27 Sep 2010 22:47:34 -0400 Message-ID: <4CA15746.9090806@cornell.edu> References: <878w2tx6gk.fsf@gmx.de> <4C9B452E.1040101@cornell.edu> <4C9B63A1.2060604@cornell.edu> <87y6asy0uh.fsf@gmx.de> <4C9BBD5C.30201@cornell.edu> <83tylgtbo8.fsf@gnu.org> <871v8jhcw2.fsf@gmx.de> <4C9CB57E.1010708@swipnet.se> <8339sztayd.fsf@gnu.org> <87tyleetju.fsf@gmx.de> <4C9DA26F.4030007@swipnet.se> <87mxr5epfa.fsf@gmx.de> <4C9E39A1.8050608@swipnet.se> <87hbhdee7k.fsf@gmx.de> <4C9F7563.3090608@swipnet.se> <87mxr4bb9s.fsf@gmx.de> <4C9F9C49.5090107@swipnet.se> <87bp7jb3jy.fsf@gmx.de> <4CA0F23B.6050109@cornell.edu> <878w2mzxqp.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285642092 9979 80.91.229.12 (28 Sep 2010 02:48:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Sep 2010 02:48:12 +0000 (UTC) Cc: =?ISO-8859-1?Q?Jan_Dj=E4rv?= , emacs-devel To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 28 04:48:12 2010 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.69) (envelope-from ) id 1P0QEZ-0001iH-3z for ged-emacs-devel@m.gmane.org; Tue, 28 Sep 2010 04:48:11 +0200 Original-Received: from localhost ([127.0.0.1]:41332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0QEU-0003jO-CU for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 22:47:54 -0400 Original-Received: from [140.186.70.92] (port=54650 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0QEM-0003id-BR for emacs-devel@gnu.org; Mon, 27 Sep 2010 22:47:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0QEI-0002YT-Kl for emacs-devel@gnu.org; Mon, 27 Sep 2010 22:47:43 -0400 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:60664 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0QEI-0002YP-BF for emacs-devel@gnu.org; Mon, 27 Sep 2010 22:47:42 -0400 Original-Received: from [127.0.0.1] (cpe-67-249-196-94.twcny.res.rr.com [67.249.196.94]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id o8S2lb7E029638; Mon, 27 Sep 2010 22:47:38 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 In-Reply-To: <878w2mzxqp.fsf@gmx.de> X-Antivirus: avast! (VPS 100927-1, 09/27/2010), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Solaris 9 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:131042 Archived-At: On 9/27/2010 5:23 PM, Michael Albinus wrote: > Ken Brown writes: > >> To finish off the Cygwin issue that started this thread, dbus now >> works fine in emacs-24 under Cygwin, but not in emacs-23. Would >> anyone object if I were to apply the following patch to the emacs-23 >> branch to fix the (Cygwin-specific) problem there? >> >> === modified file 'src/keyboard.c' >> --- src/keyboard.c 2010-07-05 17:16:59 +0000 >> +++ src/keyboard.c 2010-09-27 19:33:05 +0000 >> @@ -4107,7 +4107,7 @@ >> interrupt handlers have not read it, read it now. */ >> >> /* Note SIGIO has been undef'd if FIONREAD is missing. */ >> -#ifdef SIGIO >> +#if defined (SIGIO) || defined (CYGWIN) >> gobble_input (0); >> #endif /* SIGIO */ >> if (kbd_fetch_ptr != kbd_store_ptr) > > Likely it is sufficient to move the call of xd_read_queued_messages out > of gobble_input: > > --8<---------------cut here---------------start------------->8--- > *** ~/src/emacs-23/src/keyboard.c.~100064~ 2010-09-27 23:18:30.840864838 +0200 > --- ~/src/emacs-23/src/keyboard.c 2010-09-27 23:18:01.942112064 +0200 > *************** > *** 4106,4111 **** > --- 4106,4116 ---- > /* One way or another, wait until input is available; then, if > interrupt handlers have not read it, read it now. */ > > + #ifdef HAVE_DBUS > + /* Read D-Bus messages. */ > + xd_read_queued_messages (); > + #endif /* HAVE_DBUS */ > + > /* Note SIGIO has been undef'd if FIONREAD is missing. */ > #ifdef SIGIO > gobble_input (0); > *************** > *** 7051,7061 **** > gobble_input (expected) > int expected; > { > - #ifdef HAVE_DBUS > - /* Read D-Bus messages. */ > - xd_read_queued_messages (); > - #endif /* HAVE_DBUS */ > - > #ifdef SIGIO > if (interrupt_input) > { > --- 7056,7061 ---- > --8<---------------cut here---------------end--------------->8--- This works for me. Maybe you should test it too when you get a chance and then check it in if you're satisfied. Ken