From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#21869: [Patch] Redisplay: after echo area diminishes in size, Follow Mode windows aren't resynchronised. Date: Mon, 16 Nov 2015 15:03:57 +0000 Message-ID: <20151116150357.GA7344@acm.fritz.box> References: <20151109093546.GA2284@acm.fritz.box> <56406FA0.8090601@gmx.at> <20151109194200.GE2284@acm.fritz.box> <83egfynbgu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1447713878 6492 80.91.229.3 (16 Nov 2015 22:44:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2015 22:44:38 +0000 (UTC) Cc: 21869@debbugs.gnu.org, pipcet@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 16 23:44:26 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZySVe-0007Dr-0G for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2015 23:44:26 +0100 Original-Received: from localhost ([::1]:51560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZySVd-0000CO-Ha for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2015 17:44:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyLJE-0007q6-Pz for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 10:03:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyLJ8-0002mU-UC for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 10:03:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyLJ8-0002mQ-Rd for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 10:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZyLJ8-0008Sy-Kj for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2015 10:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2015 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21869 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21869-submit@debbugs.gnu.org id=B21869.144768612532469 (code B ref 21869); Mon, 16 Nov 2015 15:03:02 +0000 Original-Received: (at 21869) by debbugs.gnu.org; 16 Nov 2015 15:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:40365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyLIC-0008Rc-TX for submit@debbugs.gnu.org; Mon, 16 Nov 2015 10:02:05 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:61835) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyLIA-0008RI-9H for 21869@debbugs.gnu.org; Mon, 16 Nov 2015 10:02:03 -0500 Original-Received: (qmail 11804 invoked by uid 3782); 16 Nov 2015 15:02:00 -0000 Original-Received: from acm.muc.de (p548A4EBB.dip0.t-ipconnect.de [84.138.78.187]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 16 Nov 2015 16:01:59 +0100 Original-Received: (qmail 7457 invoked by uid 1000); 16 Nov 2015 15:03:57 -0000 Content-Disposition: inline In-Reply-To: <83egfynbgu.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108782 Archived-At: Hello, Eli. On Mon, Nov 09, 2015 at 10:50:57PM +0200, Eli Zaretskii wrote: > > Date: Mon, 9 Nov 2015 19:42:00 +0000 > > From: Alan Mackenzie > > Cc: 21869@debbugs.gnu.org, Pip Cet > > > Probably bug#830 and bug#21333. > > > Pip are you still alive? Have your papers arrived? Quick summary of the bug: with Follow Mode active, with a multi-line display in the echo area, do C-f. The echo area resizes to one line, but the Follow Mode windows don't get resynchronised. Quick summary of the cause: redisplay_internal calls prepare_menu_bars (which invokes the window-size-change-functions hook) before it calls echo_area_display (which resizes the echo area). Thus changes to the echo area size aren't yet in place when window-size-change-functions is invoked. > We had a patch in bug #21333 which was discussed and tested at > length. Please see if it works for your use case as well. If not, > please tell why not. As I said last week, this patch didn't work, for the reasons outlined above. I propose the following strategy to fix the bug: 1. Call resize_mini_window from redisplay_internaal before the call to prepare_menu_bars. 2. Remove the call to resize_mini_window from display_echo_area_1, and make that function of type void. 3. Change the contract of echo_area_display, such that the echo area must have been set to the correct height before calling it. 4. Adapt message3_nolog (the only other function which calls echo_area_display) to call resize_mini_window. As a result of these changes, any change in the size of the echo area would be taken into account when invoking window-size-change-functions. An advantage of this change is that a recursive invocation of redisplay_internal inside echo_area_display could be removed, improving performance. If it would help, I could post an analysis to support the soundness of the above strategy. What do you think? > Thanks. -- Alan Mackenzie (Nuremberg, Germany).