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#11199: 24.0.95; killing right-to-left text at eob leads to inconsistent state Date: Mon, 09 Apr 2012 12:32:39 +0300 Message-ID: <83bon18d3c.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1333964116 27565 80.91.229.3 (9 Apr 2012 09:35:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 09:35:16 +0000 (UTC) Cc: 11199@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 11:35:15 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 1SHB0E-0000A9-AS for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 11:35:14 +0200 Original-Received: from localhost ([::1]:37101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHB0D-0004uA-KD for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 05:35:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHB0A-0004tq-7X for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 05:35:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHB08-0006xi-A4 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 05:35:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHB08-0006xF-77 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 05:35:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SHB10-0002U3-2b for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 05:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 09:36: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.13339641349512 (code B ref 11199); Mon, 09 Apr 2012 09:36:02 +0000 Original-Received: (at 11199) by debbugs.gnu.org; 9 Apr 2012 09:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:46279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHB0Y-0002TN-1U for submit@debbugs.gnu.org; Mon, 09 Apr 2012 05:35:34 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:56289) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHB0V-0002TE-5e for 11199@debbugs.gnu.org; Mon, 09 Apr 2012 05:35:32 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2700500H2ZPY00@a-mtaout22.012.net.il> for 11199@debbugs.gnu.org; Mon, 09 Apr 2012 12:34:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M27005IUH9MQQ00@a-mtaout22.012.net.il>; Mon, 09 Apr 2012 12:34:35 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:58626 Archived-At: > Date: Mon, 09 Apr 2012 17:21:51 +0900 > From: YAMAMOTO Mitsuharu > Cc: Michael Welsh Duggan , > 11199@debbugs.gnu.org > > 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. Yes, that matches my observations, see my last mail today. > 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 Looks like it. Can you trace through set_iterator_to_next and its subroutines, and see why it does so? One way of doing that is to put a breakpoint in set_iterator_to_next conditioned by the value of point (which is available as 'current_buffer->pt'). (If you don't condition by value of point, you will hit the breakpoint too many times.) > or another value should be set to row->end if the subsequent row > starts with some right-to-left text? No, row->end always preserves the last position information of the display iterator, no matter if the text was or wasn't reordered. The correct operation of the display engine when rendering the next line depends on that.