From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#11199: 24.0.95; killing right-to-left text at eob leads to inconsistent state Date: Mon, 09 Apr 2012 17:21:51 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83bon2ad9z.fsf@gnu.org> <8762dacc3w.fsf@maru.md5i.com> <831uny9ekk.fsf@gnu.org> <87ty0uasiq.fsf@maru.md5i.com> <83y5q67z7h.fsf@gnu.org> <87lim6as39.fsf@maru.md5i.com> <83wr5q7yf1.fsf@gnu.org> <87hawuar05.fsf@maru.md5i.com> <83ty0u7x0h.fsf@gnu.org> NNTP-Posting-Host: plane.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 1333959742 32004 80.91.229.3 (9 Apr 2012 08:22:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 08:22:22 +0000 (UTC) Cc: 11199@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 10:22:20 2012 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 1SH9rb-0007RS-Jj for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 10:22:15 +0200 Original-Received: from localhost ([::1]:59143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SH9ra-0006zd-P4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 04:22:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SH9rW-0006zJ-Sp for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 04:22:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SH9rU-0004oI-8m for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 04:22:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SH9rU-0004oB-5l for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 04:22:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SH9sM-0007W0-8x for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 04:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 08:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11199 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11199-submit@debbugs.gnu.org id=B11199.133395977428870 (code B ref 11199); Mon, 09 Apr 2012 08:23:02 +0000 Original-Received: (at 11199) by debbugs.gnu.org; 9 Apr 2012 08:22:54 +0000 Original-Received: from localhost ([127.0.0.1]:46172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH9sD-0007Vb-PY for submit@debbugs.gnu.org; Mon, 09 Apr 2012 04:22:54 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:62365) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SH9sA-0007VQ-1G for 11199@debbugs.gnu.org; Mon, 09 Apr 2012 04:22:52 -0400 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 C2049C0561; Mon, 9 Apr 2012 17:21:51 +0900 (JST) In-Reply-To: <83ty0u7x0h.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58623 Archived-At: >>>>> On Mon, 09 Apr 2012 00:07:42 +0300, Eli Zaretskii said: > Well, it would help if you could find out how does row->end get out > of sync with row->maxpos, for this specific row. Both end and > maxpos are set near the end of display_line, around line 19480 of > xdisp.c. They are identical when bidi-display-reordering is turned > off, but different when it's on (because maxpos-1 gives the largest > buffer position of the characters in the row, while end-1 gives the > buffer position of the rightmost character on display). In this > case, it looks like row->end came from a totally different screen > line, the one that was killed by C-k. I wonder how could that > happen and which code is responsible. Perhaps some code tries to > reuse existing rows, and goofs. It seems that row->end gets "out of sync" much earlier than C-k, actually just after C-x C-e in Step 4 in the original recipe. It is set at the part you mentioned above in display_line: 19473 row->end = it->current; and it->current has been updated by 19379 /* Consume the line end. This skips over invisible lines. */ 19380 set_iterator_to_next (it, 1); Maybe set_iterator_to_next has skipped too much, or another value should be set to row->end if the subsequent row starts with some right-to-left text? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp