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: Tue, 10 Nov 2015 13:49:58 +0000 Message-ID: <20151110134958.GE2626@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 1447163366 18940 80.91.229.3 (10 Nov 2015 13:49:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2015 13:49:26 +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 Tue Nov 10 14:49:14 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 1Zw9IP-0004Yx-Th for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2015 14:49:14 +0100 Original-Received: from localhost ([::1]:59910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9IP-0003if-6P for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2015 08:49:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9IH-0003iN-RX for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2015 08:49:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw9IE-00055c-GE for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2015 08:49:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9IE-00055Q-CG for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2015 08:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zw9IE-0005Za-41 for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2015 08:49: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: Tue, 10 Nov 2015 13:49: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.144716330521378 (code B ref 21869); Tue, 10 Nov 2015 13:49:02 +0000 Original-Received: (at 21869) by debbugs.gnu.org; 10 Nov 2015 13:48:25 +0000 Original-Received: from localhost ([127.0.0.1]:59839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zw9Hd-0005Yj-4k for submit@debbugs.gnu.org; Tue, 10 Nov 2015 08:48:25 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:31861) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zw9HI-0005YG-UH for 21869@debbugs.gnu.org; Tue, 10 Nov 2015 08:48:24 -0500 Original-Received: (qmail 52318 invoked by uid 3782); 10 Nov 2015 13:48:03 -0000 Original-Received: from acm.muc.de (p579E9232.dip0.t-ipconnect.de [87.158.146.50]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 10 Nov 2015 14:48:01 +0100 Original-Received: (qmail 3494 invoked by uid 1000); 10 Nov 2015 13:49:58 -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:108613 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? > > Here's a proposed fix. It seems to work. Do you think there are any > > problems with it? > 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. I had to struggle with the posts in that bug archive. I'm not entirely certain whether there was more than one patch in the thread, and if so whether I tried out the one you mean. For clarity, the patch I tried was the one from Pip Cet's opening post in the thread, this one: ######################################################################### >From 243be700591979554e61bbdff0f00f30cc386f7b Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 23 Aug 2015 21:46:42 +0000 Subject: [PATCH] Call `window-size-change-functions' after mini-window size changes. * window.c (resize_frame_windows): Set FRAME_WINDOW_SIZES_CHANGED flag. (grow_mini_window): Likewise. (shrink_mini_window): Likewise. --- src/window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/window.c b/src/window.c index 863a792..68bc9e5 100644 --- a/src/window.c +++ b/src/window.c @@ -4094,6 +4094,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) } fset_redisplay (f); + FRAME_WINDOW_SIZES_CHANGED (f) = true; } @@ -4531,6 +4532,7 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) /* Enforce full redisplay of the frame. */ /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ fset_redisplay (f); + FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); } @@ -4570,6 +4572,7 @@ shrink_mini_window (struct window *w, bool pixelwise) /* Enforce full redisplay of the frame. */ /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ fset_redisplay (f); + FRAME_WINDOW_SIZES_CHANGED (f) = true; adjust_frame_glyphs (f); unblock_input (); } ######################################################################### This patch didn't solve my problem. I think the reason is that window-size-change-functions is called at the start of redisplay, but the shrinking of the echo area back to 1 line only takes place later. Hence there is no way that window-size-change-functions can then be invoked. In my proposed change, I change the definition of w-s-c-functions, so that they get called both when a user action has changed window sizes (as at present) and when redisplay changes the echo area/minibuffer size. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).