From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83r3v984ro.fsf@gnu.org> References: <878uhiji5m.fsf@winky.hogwarts> <83tx058bjm.fsf@gnu.org> <87y4phupt5.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1420482606 29197 80.91.229.3 (5 Jan 2015 18:30:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 18:30:06 +0000 (UTC) Cc: andreas.matthias@gmail.com, 19511@debbugs.gnu.org To: Vitalie Spinu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 19:29:59 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 1Y8CL2-00031C-Mk for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 19:25:12 +0100 Original-Received: from localhost ([::1]:33512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8CL1-0008Aj-SA for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 13:25:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8CKx-00086j-2M for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 13:25:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8CKt-00018o-0h for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 13:25:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8CKs-00018O-UE for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 13:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y8CKs-0005HL-Jm for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 13:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jan 2015 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19511 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19511-submit@debbugs.gnu.org id=B19511.142048226720237 (code B ref 19511); Mon, 05 Jan 2015 18:25:02 +0000 Original-Received: (at 19511) by debbugs.gnu.org; 5 Jan 2015 18:24:27 +0000 Original-Received: from localhost ([127.0.0.1]:37731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8CKI-0005GI-L9 for submit@debbugs.gnu.org; Mon, 05 Jan 2015 13:24:27 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:51205) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8CKF-0005G0-R9 for 19511@debbugs.gnu.org; Mon, 05 Jan 2015 13:24:25 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NHP00900UWZSO00@a-mtaout20.012.net.il> for 19511@debbugs.gnu.org; Mon, 05 Jan 2015 20:24:21 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHP009CWV4LOR30@a-mtaout20.012.net.il>; Mon, 05 Jan 2015 20:24:21 +0200 (IST) In-reply-to: <87y4phupt5.fsf@gmail.com> X-012-Sender: halo1@inter.net.il 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: 140.186.70.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:98046 Archived-At: > From: Vitalie Spinu > Cc: Andreas Matthias , 19511-done@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).