From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Text Properties And Buffer Modification Date: Thu, 06 Dec 2018 12:28:25 +0200 Message-ID: <83k1kn6jau.fsf@gnu.org> References: <83y3948ov2.fsf@gnu.org> <87wooofnqf.fsf@fastmail.fm> <83o9a08jfq.fsf@gnu.org> <834lbr95nq.fsf@gnu.org> <5C082139.6060802@gmx.at> <831s6v94e9.fsf@gnu.org> <5C08E6E2.6080703@gmx.at> <83lg536mhp.fsf@gnu.org> <5C08F58F.5000004@gmx.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1544092776 21129 195.159.176.226 (6 Dec 2018 10:39:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2018 10:39:36 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 06 11:39:32 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUr46-0005Jd-UO for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2018 11:39:31 +0100 Original-Received: from localhost ([::1]:40001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUr6D-0005EK-G4 for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2018 05:41:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUr4R-0001g7-1O for emacs-devel@gnu.org; Thu, 06 Dec 2018 05:40:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUqta-0001BC-9c for emacs-devel@gnu.org; Thu, 06 Dec 2018 05:28:46 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUqta-0001B6-62; Thu, 06 Dec 2018 05:28:38 -0500 Original-Received: from [176.228.60.248] (port=4038 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gUqtY-0002s5-Dp; Thu, 06 Dec 2018 05:28:38 -0500 In-reply-to: <5C08F58F.5000004@gmx.at> (message from martin rudalics on Thu, 06 Dec 2018 11:10:23 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231678 Archived-At: > Date: Thu, 06 Dec 2018 11:10:23 +0100 > From: martin rudalics > CC: monnier@iro.umontreal.ca, emacs-devel@gnu.org > > I tried to find all occurrences of the string MODIFF in xdisp.c and > look at the context of every occurrence I found. I then tried to find > out whether that context provided any clue that the display engine > would handle a text property differently from an overlay change. In > particular I tried to find out whether there were any redisplay > optimizations where this was the case. Probably I'm missing something > but the "you will see" hinted at something quite obvious. Maybe you > can name 2 or 3 such occurrences and I will then try to look harder. The optimization I had in mind is try_window_id. You will see there that this optimization is disabled if overlays were changed, but not if the buffer (including text properties) was changed. you will also see there that buffer-modification tick is used there to update the unchanged text at beginning and end of the buffer when necessary. The other place where the buffer modification tick is used is in mark_window_display_accurate_1. If we somehow disrupt that, we could have excess re-entries into redisplay, because Emacs might think some windows are not yet up to date. There's also a place in redisplay_internal where we set the update_mode_line flag of the selected window when that window's buffer was modified, and a similar use in window_buffer_changed.