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#9771: 24.0.90; Redisplay problems with control characters Date: Mon, 17 Oct 2011 03:48:27 -0400 Message-ID: References: <871uucr2w1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1318837764 8302 80.91.229.12 (17 Oct 2011 07:49:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2011 07:49:24 +0000 (UTC) Cc: 9771@debbugs.gnu.org To: Johan =?UTF-8?Q?Bockg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 09:49:20 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1RFhwl-0003Ay-Gr for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 09:49:19 +0200 Original-Received: from localhost ([::1]:33168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhwk-0003UM-Ox for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 03:49:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhwf-0003U5-Gh for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:49:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFhwe-0003Xs-3X for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:49:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhwe-0003Xo-0j for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:49:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RFhxR-0006J6-O7 for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:50:01 -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, 17 Oct 2011 07:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9771 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9771-submit@debbugs.gnu.org id=B9771.131883776224195 (code B ref 9771); Mon, 17 Oct 2011 07:50:01 +0000 Original-Received: (at 9771) by debbugs.gnu.org; 17 Oct 2011 07:49:22 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFhwm-0006IB-Vz for submit@debbugs.gnu.org; Mon, 17 Oct 2011 03:49:21 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFhwl-0006I4-1B for 9771@debbugs.gnu.org; Mon, 17 Oct 2011 03:49:19 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RFhvv-0002JH-Ql; Mon, 17 Oct 2011 03:48:27 -0400 In-reply-to: <871uucr2w1.fsf@gnu.org> (message from Johan =?UTF-8?Q?Bockg=C3=A5rd?= on Mon, 17 Oct 2011 00:24:30 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 17 Oct 2011 03:50:01 -0400 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:52708 Archived-At: > From: Johan Bockgård > Date: Mon, 17 Oct 2011 00:24:30 +0200 > > 2. (Old) problem in BUFFER_POS_REACHED_P > > The position hpos = 1 above is not just non-zero; it's also in the > middle of the ^@ control character (the screen line starts with ^). It's > produced by move_it_in_display_line_to: > > #define BUFFER_POS_REACHED_P() \ > [...] > && (it->method == GET_FROM_BUFFER \ > || (it->method == GET_FROM_DISPLAY_VECTOR \ > && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) > > According to the condition above, the position in column 0 before the > ^ glyph (dpvec_index = 0) is not a possible stop point, but the position > between ^ and @ is. Okay, but what is the practical problem with this? > 3. Long lines with display vectors make Emacs really slow (with bidi) It's not the display vectors in general that cause this. It's specifically the display of control characters. E.g., the following test case, which is a small variation of yours, shows no visible slowdown: emacs -Q M-: (require 'disp-table) RET M-: (aset standard-display-table ?x (vconcat "^A")) RET C-u 2000 x M-< Type text... I'll look into this, but is there some real-life use case behind your recipe? Binary nulls in a file generally cause Emacs to make the buffer unibyte, where bidi reordering is disabled. If some optimizations are in order to speed up redisplay in this situation, it would help to have a real-life use case handy, to make sure the optimizations really make a difference. The other parts of the report are more or less clear. Btw, in the future please make a separate bug report for each issue, it makes references to bugs in log messages more straightforward. Thanks.