From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Testing redisplay code in batch Date: Thu, 24 Sep 2020 14:31:58 -0400 Message-ID: References: <83zh5ftffa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32424"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: psainty@orcon.net.nz, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 24 20:35:44 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLW5o-0008JU-1z for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Sep 2020 20:35:44 +0200 Original-Received: from localhost ([::1]:43832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLW5m-0002Es-Vp for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Sep 2020 14:35:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLW2I-00011x-7E for emacs-devel@gnu.org; Thu, 24 Sep 2020 14:32:06 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLW2F-0007tZ-IQ; Thu, 24 Sep 2020 14:32:05 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 71C328161A; Thu, 24 Sep 2020 14:32:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id ED27580921; Thu, 24 Sep 2020 14:31:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1600972319; bh=MIluc6Wu/nzXpxQ6polEwXZCYkkNBBuBXwCR0lJe0cw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AkAqk/IKPbjDYuLrvOphPidK7bpt3PkgsWJ0PoreG3arpIhxSHrpnbkl9nLPpHBVJ hJ2RXoHoXZ8dkzzsf2fqmuJMdUthazOPbHSA3qaAt9mPoT9pxvrb2LwVp0P9wcT2pj dlj4TSnoWv48/cLLyCJc202ldvM5eXB7ummSXERtaF3GOzNLeAqHu84EZGFxIHePz7 O/HyQNzP4jFMT2Nnap8EdqKiW52v1VYhhRxGJrnH+XPm576GaXLhapWhxz8uhu5FfI 6AvHy8PFa8TWow9huubqwPLz0VAHiPkpQAzKfvufF0VHL5ezei9jtHXUpYIO8Xj5Jl FoLxo78uN9nhg== Original-Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B44961202CE; Thu, 24 Sep 2020 14:31:59 -0400 (EDT) In-Reply-To: <83zh5ftffa.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Sep 2020 17:31:05 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/24 12:41:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256398 Archived-At: > Thanks. I have a couple of minor comments: Based on your comments, I assume you consider that this feature is acceptable for `master` once it's clean. >> + if (FRAME_INITIAL_P (f)) >> + paused_p = false; /* No actual display to update! */ > > I'd appreciate a comment here saying why setting paused_p to false is > the consequence of "no display to update". It's not. The other branch sets `paused_p` so we need to set it as well. The comment explains why we don't do anything else *beside* setting `paused_p`. Not sure how best to explain that in the comment. I changed it to: /* No actual display to update so the "update" is a nop and obviously isn't interrupted by pending input. */ paused_p = false; >> - /* 10 is arbitrary, >> + /* 80/40 is arbitrary, > Why not 80x25? 80x25 it is, then ;-) >> @@ -1136,6 +1136,7 @@ make_initial_frame (void) >> init_frame_faces (f); >> >> last_nonminibuf_frame = f; >> + echo_area_window = f->minibuffer_window; > > Why is this bit needed? Ah, good question. Without it I got an assertion failure in xdisp.c:18241 if (MINI_WINDOW_P (w)) { if (w == XWINDOW (echo_area_window) && !NILP (echo_area_buffer[0])) because XWINDOW complains that `echo_area_window` is not a window. Maybe the better fix is to change `init_xdisp` so it also sets `echo_area_window` when `noninteractive`? >> - move_it_by_lines (&it, 0); >> + move_it_by_lines (&it, 0); /* bug#43519 */ > > This is unrelated (and unneeded, IMO). Indeed, it's just a temporary hack I added so I can quickly find that spot in the code (via `C-x v =`) when I need to (un)comment it as I test my patch ;-) >> @@ -15414,8 +15414,8 @@ redisplay_internal (void) >> /* No redisplay if running in batch mode or frame is not yet fully >> initialized, or redisplay is explicitly turned off by setting >> Vinhibit_redisplay. */ >> - if (FRAME_INITIAL_P (SELECTED_FRAME ()) >> - || !NILP (Vinhibit_redisplay)) >> + if (/* FRAME_INITIAL_P (SELECTED_FRAME ()) >> + * || */ !NILP (Vinhibit_redisplay)) >> return; > > This should be done cleaner, and should also update the commentary. Do you think it's otherwise acceptable as-is? I was thinking of only allowing redisplay in `FRAME_INITIAL_P` under the control of some special config var. > How about a small NEWS item about this? I'll see to it, Stefan