unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: david.reitter@gmail.com, emacs-devel@gnu.org
Subject: Re: Truncating scroll runs that copy to where we copied to
Date: Tue, 22 Nov 2011 18:09:55 +0900	[thread overview]
Message-ID: <wlwras5xr0.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <E1RSm5e-0000hI-Ap@fencepost.gnu.org>

>>>>> On Tue, 22 Nov 2011 03:52:30 -0500, Eli Zaretskii <eliz@gnu.org> 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



  reply	other threads:[~2011-11-22  9:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20  7:13 Truncating scroll runs that copy to where we copied to YAMAMOTO Mitsuharu
2011-11-20 18:23 ` Eli Zaretskii
2011-11-21  0:19   ` YAMAMOTO Mitsuharu
2011-11-21 23:50     ` David Reitter
2011-11-22  6:04       ` Eli Zaretskii
2011-11-22  6:22         ` YAMAMOTO Mitsuharu
2011-11-22  8:25           ` Eli Zaretskii
2011-11-22  8:47             ` YAMAMOTO Mitsuharu
2011-11-22  7:26         ` YAMAMOTO Mitsuharu
2011-11-22  8:52           ` Eli Zaretskii
2011-11-22  9:09             ` YAMAMOTO Mitsuharu [this message]
2011-11-22  9:54               ` Eli Zaretskii
2011-11-23  0:41                 ` YAMAMOTO Mitsuharu
2011-11-26 12:44                   ` Eli Zaretskii
2011-11-28  1:10                     ` YAMAMOTO Mitsuharu
2011-11-22  0:33 ` YAMAMOTO Mitsuharu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlwras5xr0.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=david.reitter@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).