From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 16 19:41:06 2012 Received: (at submit) by debbugs.gnu.org; 16 Apr 2012 23:41:06 +0000 Received: from localhost ([127.0.0.1]:37483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJvXc-0007X7-Nr for submit@debbugs.gnu.org; Mon, 16 Apr 2012 19:41:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35104) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJvXb-0007Wd-0Z for submit@debbugs.gnu.org; Mon, 16 Apr 2012 19:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJvXP-00025Y-WA for submit@debbugs.gnu.org; Mon, 16 Apr 2012 19:40:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:32893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJvXP-00025O-Su for submit@debbugs.gnu.org; Mon, 16 Apr 2012 19:40:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJvXO-0007Mb-9Z for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 19:40:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJvXL-00024N-NB for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 19:40:49 -0400 Received: from orlando.hostforweb.net ([216.246.45.90]:33056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJvXL-00023J-IS for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 19:40:47 -0400 Received: from localhost ([127.0.0.1]:60642) by orlando.hostforweb.net with smtp (Exim 4.69) (envelope-from ) id 1SJvXH-0008BE-Pg for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 18:40:44 -0500 Date: Tue, 17 Apr 2012 08:40:40 +0900 Message-ID: From: Katsumi Yamaoka To: bug-gnu-emacs@gnu.org Subject: 24.1.50; cursor doesn't move in a long line Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130004 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.4) Emacs/24.1.50 (i686-pc-cygwin) Cancel-Lock: sha1:VQjJwePN/wc+h1Kv7gMWxlzL+pI= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: Linux 2.6? (barebone, rare!) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, When I view an html source, of which lines are very long, I meet with a symptom that C-f, C-b, and so forth don't move the cursor. One discovered yesterday that it happens only when the header line exists in a buffer (we use emacs-w3m that ises the header line for the tab browsing). Here's a recipe to reproduce this with Emacs -Q: (let ((fox "The quick brown fox jumps over the lazy dog.")) (pop-to-buffer "*testing*") (erase-buffer) (setq header-line-format fox) (dotimes (var 1000) (insert fox " ")) (goto-char (point-min)) (search-forward "fox" nil t 500)) Could this be fixed? Thanks in advance. Regards, From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 16 22:59:03 2012 Received: (at 11261) by debbugs.gnu.org; 17 Apr 2012 02:59:03 +0000 Received: from localhost ([127.0.0.1]:37581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJyd9-00060l-KC for submit@debbugs.gnu.org; Mon, 16 Apr 2012 22:59:03 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:45982) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJyd4-00060U-2G for 11261@debbugs.gnu.org; Mon, 16 Apr 2012 22:58:58 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2L00300S7BXR00@a-mtaout22.012.net.il> for 11261@debbugs.gnu.org; Tue, 17 Apr 2012 05:58:41 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2L003GES9TRA40@a-mtaout22.012.net.il>; Tue, 17 Apr 2012 05:58:41 +0300 (IDT) Date: Tue, 17 Apr 2012 05:56:52 +0300 From: Eli Zaretskii Subject: Re: bug#11261: 24.1.50; cursor doesn't move in a long line In-reply-to: X-012-Sender: halo1@inter.net.il To: Katsumi Yamaoka Message-id: <834nsjrrpn.fsf@gnu.org> References: X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11261 Cc: 11261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Tue, 17 Apr 2012 08:40:40 +0900 > From: Katsumi Yamaoka > > (let ((fox "The quick brown fox jumps over the lazy dog.")) > (pop-to-buffer "*testing*") > (erase-buffer) > (setq header-line-format fox) > (dotimes (var 1000) > (insert fox " ")) > (goto-char (point-min)) > (search-forward "fox" nil t 500)) > > Could this be fixed? This is a clear regression, so I will look into it ASAP. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 17 11:31:35 2012 Received: (at 11261-done) by debbugs.gnu.org; 17 Apr 2012 15:31:36 +0000 Received: from localhost ([127.0.0.1]:38496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKANP-0007pT-Dh for submit@debbugs.gnu.org; Tue, 17 Apr 2012 11:31:35 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:52721) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKANJ-0007p8-Vn for 11261-done@debbugs.gnu.org; Tue, 17 Apr 2012 11:31:30 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2M00D00QM0TS00@a-mtaout22.012.net.il> for 11261-done@debbugs.gnu.org; Tue, 17 Apr 2012 18:31:11 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2M00DPZR3X0IF0@a-mtaout22.012.net.il>; Tue, 17 Apr 2012 18:31:10 +0300 (IDT) Date: Tue, 17 Apr 2012 18:29:22 +0300 From: Eli Zaretskii Subject: Re: bug#11261: 24.1.50; cursor doesn't move in a long line In-reply-to: <834nsjrrpn.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: yamaoka@jpl.org Message-id: <833982s7fx.fsf@gnu.org> References: <834nsjrrpn.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11261-done Cc: 11261-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Tue, 17 Apr 2012 05:56:52 +0300 > From: Eli Zaretskii > Cc: 11261@debbugs.gnu.org > > > Date: Tue, 17 Apr 2012 08:40:40 +0900 > > From: Katsumi Yamaoka > > > > (let ((fox "The quick brown fox jumps over the lazy dog.")) > > (pop-to-buffer "*testing*") > > (erase-buffer) > > (setq header-line-format fox) > > (dotimes (var 1000) > > (insert fox " ")) > > (goto-char (point-min)) > > (search-forward "fox" nil t 500)) > > > > Could this be fixed? > > This is a clear regression, so I will look into it ASAP. Fixed in revision 107846 on the emacs-24 branch. The patch is below, if you don't want to wait for the next pretest. Thanks. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-13 18:08:18 +0000 +++ src/ChangeLog 2012-04-17 15:25:17 +0000 @@ -1,3 +1,14 @@ +2012-04-17 Eli Zaretskii + + * xdisp.c (string_buffer_position_lim): Limit starting position to + BEGV. + (set_cursor_from_row): If called for a mode-line or header-line + row, return zero immediately. + (try_cursor_movement): If inside continuation line, don't back up + farther than the first row after the header line, if any. Don't + consider the header-line row as "partially visible", even if + MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261) + 2012-04-13 Atsuo Ohki (tiny change) * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n" (bug#11238). === modified file 'src/xdisp.c' --- src/xdisp.c 2012-04-09 12:46:34 +0000 +++ src/xdisp.c 2012-04-17 15:25:17 +0000 @@ -4979,7 +4979,7 @@ string_buffer_position_lim (Lisp_Object Lisp_Object limit, prop, pos; int found = 0; - pos = make_number (from); + pos = make_number (max (from, BEGV)); if (!back_p) /* looking forward */ { @@ -13690,6 +13690,13 @@ set_cursor_from_row (struct window *w, s comes from a text property, not from an overlay. */ int string_from_text_prop = 0; + /* Don't even try doing anything if called for a mode-line or + header-line row, since the rest of the code isn't prepared to + deal with such calamities. */ + xassert (!row->mode_line_p); + if (row->mode_line_p) + return 0; + /* Skip over glyphs not having an object at the start and the end of the row. These are special glyphs like truncation marks on terminal frames. */ @@ -14906,6 +14913,8 @@ try_cursor_movement (Lisp_Object window, else if (rc != CURSOR_MOVEMENT_SUCCESS && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) { + struct glyph_row *row1; + /* If rows are bidi-reordered and point moved, back up until we find a row that does not belong to a continuation line. This is because we must consider @@ -14916,24 +14925,28 @@ try_cursor_movement (Lisp_Object window, /* FIXME: Revisit this when glyph ``spilling'' in continuation lines' rows is implemented for bidi-reordered rows. */ - while (MATRIX_ROW_CONTINUATION_LINE_P (row)) + for (row1 = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + MATRIX_ROW_CONTINUATION_LINE_P (row); + --row) { /* If we hit the beginning of the displayed portion without finding the first row of a continued line, give up. */ - if (row <= w->current_matrix->rows) + if (row <= row1) { rc = CURSOR_MOVEMENT_MUST_SCROLL; break; } xassert (row->enabled_p); - --row; } } if (must_scroll) ; else if (rc != CURSOR_MOVEMENT_SUCCESS && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) + /* Make sure this isn't a header line by any chance, since + then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield non-zero. */ + && !row->mode_line_p && make_cursor_line_fully_visible_p) { if (PT == MATRIX_ROW_END_CHARPOS (row) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 17 18:22:21 2012 Received: (at 11261-done) by debbugs.gnu.org; 17 Apr 2012 22:22:21 +0000 Received: from localhost ([127.0.0.1]:38827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKGmy-0001CZ-T9 for submit@debbugs.gnu.org; Tue, 17 Apr 2012 18:22:21 -0400 Received: from orlando.hostforweb.net ([216.246.45.90]:44014) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKGmw-0001CL-Oh for 11261-done@debbugs.gnu.org; Tue, 17 Apr 2012 18:22:19 -0400 Received: from localhost ([127.0.0.1]:53486) by orlando.hostforweb.net with smtp (Exim 4.69) (envelope-from ) id 1SKGmg-0004HT-5P; Tue, 17 Apr 2012 17:22:02 -0500 Date: Wed, 18 Apr 2012 07:21:55 +0900 Message-ID: From: Katsumi Yamaoka To: Eli Zaretskii Subject: Re: bug#11261: 24.1.50; cursor doesn't move in a long line References: <834nsjrrpn.fsf@gnu.org> <833982s7fx.fsf@gnu.org> Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130004 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.4) Emacs/24.1.50 (i686-pc-cygwin) Cancel-Lock: sha1:ZylVDUvTVFCMu4G9/jf+sPC/H5c= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11261-done Cc: 11261-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eli Zaretskii wrote: > Fixed in revision 107846 on the emacs-24 branch. The patch is below, > if you don't want to wait for the next pretest. Thank you for fixing this so quickly. I started a daily work, that is to bootstrap the fresh Emacs trunk, having applied a patch. (It takes 2~3 hours on Cygwin even in a very fast PC. :<) From unknown Mon Aug 11 21:12:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 May 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator