From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: Pretest next week Date: Wed, 28 Jan 2009 18:24:00 +0200 Message-ID: <6634D95E-39A0-410C-8F28-065D997D5208@gmail.com> References: <87y6x4ue2u.fsf@cyd.mit.edu> <87mydjv4bd.fsf@cyd.mit.edu> <08054F25-1F90-4795-9FFE-01363F6900CE@gmail.com> <497E6D32.9000707@gnu.org> <87tz7kawln.fsf@cyd.mit.edu> <4980268C.9020104@gnu.org> <3765D6BE-634B-4D1E-AF8B-7822957F88C7@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233159872 4432 80.91.229.12 (28 Jan 2009 16:24:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2009 16:24:32 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, Jason Rumney To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 28 17:25:45 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 1LSDEG-0001pd-DG for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2009 17:25:29 +0100 Original-Received: from localhost ([127.0.0.1]:47598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSDCu-00022C-1f for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2009 11:24:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSDCn-00021n-PO for emacs-devel@gnu.org; Wed, 28 Jan 2009 11:23:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSDCm-00021U-5w for emacs-devel@gnu.org; Wed, 28 Jan 2009 11:23:56 -0500 Original-Received: from [199.232.76.173] (port=39969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSDCl-00021R-Vb for emacs-devel@gnu.org; Wed, 28 Jan 2009 11:23:56 -0500 Original-Received: from ey-out-1920.google.com ([74.125.78.145]:23265) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSDCk-0005wu-8K; Wed, 28 Jan 2009 11:23:54 -0500 Original-Received: by ey-out-1920.google.com with SMTP id 4so31523eyg.24 for ; Wed, 28 Jan 2009 08:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=AS6uvZBQXtd7xOOpleVDmyC7hwFjWaEiydK3lLi9yKE=; b=Hop9c9Qcn86EVAt+AHYQaT4UYXHCzJwiQKymF9bLpsdyCwmh9julz5de8FgKPWulgM mfwORGlpJKs9e6fnjuQI7v6eOcqi3Ypx2PWaKPN2w0wzmGQ0XsKw7bSYxkVuSQONevLG rSSt8H64t5ySFnuatwf51eDh31HrCxD8WUXcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=cP9ylyPvpBUJrSTXDI9ir9TAg3C3Z5ef6ryxDg9IoS424YhVlvL3eaAh+Jlj6D6sEg k8wSMI9Tu8z6XGw2Eu2v9hl2kqC0wVeKudgGvAWM9jd1+xxZq4KpdwHhUpXExxCIvH1t mkPjmZBkl5mUZO05x3sC5ST/Rc2PaiwH4H9Kc= Original-Received: by 10.103.138.16 with SMTP id q16mr5401855mun.114.1233159832853; Wed, 28 Jan 2009 08:23:52 -0800 (PST) Original-Received: from ?192.168.1.101? (i036133.gprs.dnafinland.fi [87.95.36.133]) by mx.google.com with ESMTPS id 31sm34985476nfu.22.2009.01.28.08.23.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jan 2009 08:23:52 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 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:108328 Archived-At: On Jan 28, 2009, at 4:08 PM, Stefan Monnier wrote: >> might be simpler if there's any way to get the conventional >> keyboard.c >> timer-driven input polling done through the QUIT macro under NS. > > There is no such thing as a timer-driven polling in the QUIT macro. > The polling done via the QUIT macro is "polling for some C var to > change", not "polling for some external thingy". Right. The polling I meant was running poll_for_input() in keyboard.c in response to the atimer 'poll_timer' firing, if running in polling mode (Fset_input_interrupt_mode(Qnil)). I wasn't sure if atimers just weren't supposed to be called while tight loops are running, or if some code just wasn't working as expected under NS. My initial thought was to add something like do_pending_atimers(); to QUIT under HAVE_NS. As it turns out, this isn't needed. SIGALRM is triggering alarm_signal_handler() in atimer.c correctly, but run_timers() never gets called under SYNC_INPUT. I don't fully understand why or where the problem is here. But undefining SYNC_INPUT gets poll_for_input() called (and hence Ctrl-g detected) even in tight loops, with no ill effects so far. Patch below. It would be of interest to find out why it fails under the SYNC_INPUT case... I also investigated the SIGIO thing a bit more. I can trigger the handler using kill -IO from the command line. But no SIGIO seems to be being sent to the process when keyboard input is given. -Adrian *** configure.in.~1.583.~ Thu Jan 22 15:08:19 2009 --- configure.in Wed Jan 28 17:47:55 2009 *************** *** 2096,2101 **** --- 2096,2103 ---- fi # We also have mouse menus. HAVE_MENUS=yes + # SYNC_INPUT prevents Ctrl-g detection in many cases. + AC_DEFINE(SYNC_INPUT, 0, [Process async input synchronously.]) fi *** nsterm.m.~1.53.~ Sun Jan 25 21:23:24 2009 --- nsterm.m Wed Jan 28 17:19:50 2009 *************** *** 3746,3752 **** ------------------------------------------------------------------------ -- */ { baud_rate = 38400; ! Fset_input_interrupt_mode (Qt); } --- 3763,3769 ---- ------------------------------------------------------------------------ -- */ { baud_rate = 38400; ! Fset_input_interrupt_mode (Qnil); } ***************