From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Truncating scroll runs that copy to where we copied to Date: Tue, 22 Nov 2011 18:09:55 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <8339dibqlc.fsf@gnu.org> <6D358885-0CD8-4FC0-9598-549AB7E3D4AC@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1321953018 21260 80.91.229.12 (22 Nov 2011 09:10:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 09:10:18 +0000 (UTC) Cc: david.reitter@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 22 10:10:08 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSmMf-0005Kb-A7 for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 10:10:05 +0100 Original-Received: from localhost ([::1]:55967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSmMe-0007Km-Jy for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 04:10:04 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSmMb-0007Ja-M9 for emacs-devel@gnu.org; Tue, 22 Nov 2011 04:10:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSmMa-0004Sl-GT for emacs-devel@gnu.org; Tue, 22 Nov 2011 04:10:01 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSmMY-0004SN-Ki; Tue, 22 Nov 2011 04:09:59 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id C7CC1C0561; Tue, 22 Nov 2011 18:09:55 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146140 Archived-At: >>>>> On Tue, 22 Nov 2011 03:52:30 -0500, Eli Zaretskii said: > Are you saying that this loop was implemented under the assumption > that there's no overlap in the destinations? Of course, I don't know the intention of the original author, but overlaps mean not only buggy behavior, but also redundant graphics operations. That's why I said "Such truncation can also avoid unnecessary copy in the actual graphics operation." in my first post. > Anyway, if the problem is that assign_row leaves the `from' row with > bogus glyph information (and I know it does, as I recently fixed an > assertion violation caused by that), then isn't the problem in > assign_row, to be fixed there? Assignment as a concept does not > imply a change to the source in any way, so having a function called > assign_row that actually destroys the source means people will (and > do) introduce bugs when they use their mental model of assignment. > Alternatively, maybe we should assign only those rows that have > their enabled_p flag set? Why would we even want to copy disabled > glyph rows? This alternative is actually what I tried first. But I thought truncation could also avoid redundant graphics operations as explained above. Actually, I thought that if I posted this alternative, then I would receive the other-way-round comment, i.e., why not truncate overlaps? > Your changes are not here, but elsewhere, which makes me bother if > we are not dancing around the bug and sweeping the root cause under > a thick carpet. > Also, what about the unconditional setting of to->enabled_p to 1 in > the above loop, regardless of what was that flag in `from'? Does it > look right to you? In the current code, to->enabled_p seems already be set to 1 unconditionally. Maybe I don't understand the question. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp