From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: redisplay-dont-pause does not work Date: Fri, 09 Jun 2006 13:50:10 +0200 Message-ID: <85lks6sg3x.fsf@lola.goethe.zz> References: <4483F292.2040302@soem.dk> <8564jgotvf.fsf@lola.goethe.zz> <20060605113149.FC61.SLAWOMIR.NOWACZYK.847@student.lu.se> <851wu4osca.fsf@lola.goethe.zz> <44853B02.4040504@soem.dk> <85wtbud2ru.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149853906 23292 80.91.229.2 (9 Jun 2006 11:51:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2006 11:51:46 +0000 (UTC) Cc: Slawomir Nowaczyk , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 09 13:51:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FofVw-0001dW-Ox for ged-emacs-devel@m.gmane.org; Fri, 09 Jun 2006 13:50:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FofVw-0008KC-CQ for ged-emacs-devel@m.gmane.org; Fri, 09 Jun 2006 07:50:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FofVl-0008Jk-MI for emacs-devel@gnu.org; Fri, 09 Jun 2006 07:50:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FofVl-0008JP-6h for emacs-devel@gnu.org; Fri, 09 Jun 2006 07:50:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FofVl-0008JL-3K for emacs-devel@gnu.org; Fri, 09 Jun 2006 07:50:45 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fofdn-0004RK-CL for emacs-devel@gnu.org; Fri, 09 Jun 2006 07:59:03 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FofVj-0004Zz-IK; Fri, 09 Jun 2006 07:50:43 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id C18481C464FD; Fri, 9 Jun 2006 13:50:11 +0200 (CEST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Tue, 06 Jun 2006 13:40:43 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:55784 Archived-At: storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > >> If we are going to be mess around with sit-for's argument, we might as >> well use >> >> (sit-for -1) >> >> This is perfectly logical, since then no input has been seen during >> the time interval [0, limit]. > > Excellent idea. Given that `redisplay-dont-pause' did not work previously in connection with sit-for (has there been some released Emacs version where it did something useful?), I think changing the call interface for sit-for to make negative arguments ignore pending input would be a logical idea. However, `redisplay-dont-pause' seems intended to be a user option, and it is heeded at some points in the code. In dispnew.c I find: /* Update display of window W. FORCE_P non-zero means that we should not stop when detecting pending input. */ static int update_window (w, force_p) struct window *w; int force_p; { struct glyph_matrix *desired_matrix = w->desired_matrix; int paused_p; int preempt_count = baud_rate / 2400 + 1; extern int input_pending; extern Lisp_Object do_mouse_tracking; #if GLYPH_DEBUG /* Check that W's frame doesn't have glyph matrices. */ xassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))); xassert (updating_frame != NULL); #endif /* Check pending input the first time so that we can quickly return. */ if (redisplay_dont_pause) force_p = 1; else detect_input_pending_ignore_squeezables (); /* If forced to complete the update, or if no input is pending, do the update. */ What is strange here is that if the function is entered with "force_p" set, but not redisplay_dont_pause, then it will still do the input detection thingy. I don't know whether this is intended: I have no clue about redisplay. Other functions checking `redisplay_dont_pause' are update_frame_1, and of course recently sit_for. All of the functions appear to have a "force_p" argument as well, which might suffice for passing the information down the call chain from sit_for, but I am not too certain about it. And the way it reads in ChangeLog.21, `redisplay_dont_pause' might be intended for use as a global variable representing a user preference. It might probably make sense to retain that functionality (though I have my doubts that it corresponds to consistent behavior), but still make sit-for use its own argument for doing an unconditional refresh: those functions seem not really too related. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum