emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#21869: closed (Redisplay: after echo area diminish


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21869: closed (Redisplay: after echo area diminishes in size, Follow Mode windows aren't resynchronised.)
Date: Sat, 21 Nov 2015 16:03:03 +0000

Your message dated Sat, 21 Nov 2015 18:02:39 +0200
with message-id <address@hidden>
and subject line Re: bug#19576: write-file writes the wrong buffer
has caused the debbugs.gnu.org bug report #21333,
regarding Redisplay: after echo area diminishes in size, Follow Mode windows 
aren't resynchronised.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
21333: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21333
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Redisplay: after echo area diminishes in size, Follow Mode windows aren't resynchronised. Date: Mon, 9 Nov 2015 09:35:46 +0000 User-agent: Mutt/1.5.23 (2014-03-12)
Hello, Emacs.

With a recent copy of the git master, in either X windows or a Linux tty,

emacs -Q

If necessary, make the window wide with the mouse.

C-x C-f src/xdisp.c       ; or any other non-small file.
C-x 3
M-x follow-mode

Note the content of the lines around the window division.

M-: (message "x\ny\nz") <CR>

The echo area expands, and the two Follow Mode windows get correctly
synchronised.  Again, note the content of the lines around the window
division.

C-f

The echo area shrinks back to its normal size.  Note the content of the
lines around the window division.  The two lines at the bottom of the
left hand window are also displayed at the top of the right hand window.
The windows have NOT been synchronised after the change in the echo area
size.  This is a bug.

#########################################################################

Tentative analysis:

Follow Mode puts a function on window-scroll-functions which should be
called any time a window changes size.  At the C-f above,
window-size-change-functions is not being invoked.

The one single place where window-size-change-functions is invoked is in
the function prepare_menu_bars in xdisp.c.

The one single place where prepare_menu_bars is called is fairly early on
in redisplay_internal, at L+137.  This is before the echo area is resized
at L+164.  Thus, the check on changed window sizes happens too early,
before the change in the echo area size.

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#19576: write-file writes the wrong buffer Date: Sat, 21 Nov 2015 18:02:39 +0200
> Date: Sat, 21 Nov 2015 15:56:58 +0000
> Cc: address@hidden, address@hidden, address@hidden
> From: Alan Mackenzie <address@hidden>
> 
> Hello, Eli.
> 
> On Sat, Nov 21, 2015 at 01:35:02PM +0200, Eli Zaretskii wrote:
> > > Date: Thu, 19 Nov 2015 18:03:39 +0200
> > > From: Eli Zaretskii <address@hidden>
> > > Cc: address@hidden, address@hidden, address@hidden
> 
> > > > Date: Wed, 18 Nov 2015 23:23:04 +0000
> > > > Cc: martin rudalics <address@hidden>, address@hidden, address@hidden,
> > > >   address@hidden
> > > > From: Alan Mackenzie <address@hidden>
> 
> > > > > Could you try a simpler patch below?  It seems to fix both your test
> > > > > case and the one originally reported in bug#21333.
> 
> > > > It does indeed fix my test case (I haven't tried it on #21333).  However
> > > > it violates the specification of window-size-change-functions, which
> > > > says that the hook is called _before_ redisplay, not after it has
> > > > started.  I suppose one could argue over what "redisplay" means here,
> > > > but intuitively I would say it is the putting of glyphs into matrices.
> 
> > > "Redisplay" is indeed not defined well enough, but the only reasonable
> > > interpretation of "before redisplay" is that it happens before the
> > > call to redisplay_internal.  And this is false for your suggested
> > > solution as well.  It is false even by your definition, because
> > > prepare_menu_bars already manipulates the glyph matrices, the ones it
> > > creates for the tool bar (and also menu bar on some display types).
> > > And display_echo_area also manipulates glyph matrices (it calls
> > > try_window).
> 
> > > Which is only logical for an event that by itself is triggered as part
> > > of redisplay!  It's redisplay that decides to resize the mini-window,
> > > so calling the hook after that decision _cannot_ possibly count as
> > > being "before redisplay".
> 
> > > IOW, once we, by popular demand, decided to call
> > > window-size-change-functions when the mini-window is resized, we
> > > invalidated that specification.  All the other callers of this hook
> > > are not part of a redisplay cycle, but this one is, and cannot be
> > > anywhere else.
> 
> > > So no matter what change we eventually install, the documentation of
> > > the hook needs to be amended to say that it's called "before redisplay
> > > or at the beginning of a redisplay cycle", and maybe also mention that
> > > the second case is when the mini-window is resized.
> 
> > No further comments, so I've committed the changes I posted here
> > earlier.  I also modified the documentation to be consistent with what
> > the code does.
> 
> Thanks.
> 
> > Please tell me if this bug and bug#21333 could now be closed, or if
> > there are any leftovers.
> 
> I don't think this fix concerns #19576.  The discussion of #21869 seems,
> somehow, to have moved to here.
> 
> But I think that #21333 can be closed, and #21869 certainly can be; both
> of these were about window-size-change-functions not getting called for
> echo area size changes.

Closing.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]