GNU bug report logs - #19511
25.0.50; Failed assertions in redisplay() code. (dispnew.c:1405; xdisp.c:17524)

Previous Next

Package: emacs;

Reported by: Andreas Matthias <andreas.matthias <at> gmail.com>

Date: Sun, 4 Jan 2015 23:21:02 UTC

Severity: normal

Found in version 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 19511 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: andreas.matthias <at> gmail.com, 19511 <at> debbugs.gnu.org
Subject: Re: bug#19511: 25.0.50;
 Failed assertions in redisplay() code. (dispnew.c:1405; xdisp.c:17524)
Date: Mon, 05 Jan 2015 20:24:27 +0200
> From: Vitalie Spinu <spinuvit <at> gmail.com>
> Cc: Andreas Matthias <andreas.matthias <at> gmail.com>,  19511-done <at> debbugs.gnu.org
> Date: Mon, 05 Jan 2015 08:59:02 -0800
> 
> > I hope Polymode will be changed to not call bury-buffer in that
> > situation (I always thought bury-buffer is strictly for interactive
> > use, FWIW).
> 
> Bury-buffer is used to "hide" from the indirect buffer from the
> user. That was the easiest way to implement that and should have been
> rewritten anyways.

bury-buffer is a command.  A command typically does a lot of dwim-ish
stuff that is not directly related to its main job.  If you needed to
merely put the buffer at the end of buffer-list, you could have called
bury-buffer-internal instead, which does precisely that and nothing
else.  Assuming you really need to manipulate buffer-list at all.

> Removing it doesn't change the fact that buffers are switched
> (with-current-buffer ...) inside font-lock-fontify-region-function. But
> I guess that's not an issue (right?).

Right, that's not the issue.  The problem is the call to
switch-to-prev-buffer that bury-buffer does.  That results in a call
to set-window-buffer, which is the one that invalidates window_end_pos
etc.

> Would it be enough to remove `bury-buffer` call to get back the
> optimization?

Probably, but if you show me the changes, I can see if they achieve
that.

> What are other elisp functions that can potentially invalidate
> window_end?

Any function that calls apply_window_adjustment, for example.  Which
is called in just a handful of places, see window.c.  Also
set-window-start and functions that split or delete windows.
Basically, those that really change the window's display (and
therefore shouldn't be called in a fontification function).




This bug report was last modified 10 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.