From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Display problems with `before-string' in overlay Date: Mon, 16 Apr 2007 00:31:48 -0400 Message-ID: References: <461C10A0.1010309@gmail.com> <87y7kyvm6a.fsf@stupidchicken.com> <461D49A2.5070803@gmail.com> <461DCB05.7090204@gmail.com> <87r6qof8ln.fsf@stupidchicken.com> <87r6qltzdp.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1176698106 17364 80.91.229.12 (16 Apr 2007 04:35:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 04:35:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 16 06:35:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HdIvb-0007fs-FJ for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2007 06:35:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdJ09-0005Or-WB for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2007 00:39:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdIzd-0004gS-5K for emacs-devel@gnu.org; Mon, 16 Apr 2007 00:39:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdIzc-0004fe-L3 for emacs-devel@gnu.org; Mon, 16 Apr 2007 00:39:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdIzc-0004fW-6Q for emacs-devel@gnu.org; Mon, 16 Apr 2007 00:39:08 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HdIv1-0007mc-NA for emacs-devel@gnu.org; Mon, 16 Apr 2007 00:34:23 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HdIsW-0005Vf-9X; Mon, 16 Apr 2007 00:31:48 -0400 In-reply-to: <87r6qltzdp.fsf@stupidchicken.com> (message from Chong Yidong on Sun, 15 Apr 2007 11:45:38 -0400) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69480 Archived-At: Let me try to explain (again) what the problem is. It boils down to where to display the cursor when point is at the beginning/end of an overlay with a `display' property. Currently, the cursor can show up at the following positions (where OOO denotes the overlay, and ABC denotes the surrounding characters): A B|O O O C (point = 3) A B O O O|C (point = 6) I am not sure what you mean when you say "the cursor can show up". Are you talking about where point is, or where the cursor appears? The problem arises when you have multi-line overlays. In Emacs 21, redisplay used a simple rule (see cursor_row_p): "if PT is at the end of a row, and the row ends with a newline from a string, don't put cursor on that row." This rule is desirable for multi-line before-strings: A B X X X|O C A B X X X O|C I don't understand those examples. What does X stand for? Where is the newline from a string? And why would PT be at the end of that row? If that is two example, what is the relationship between them? I'm completely lost here. But this rule is bad for multi-line display strings, because the cursor gets pushed down to the next line: A B O O |O C (point = 3) A B O O O|C (point = 6) Once again, what is the relationshp between these two examples? This function moves point, it doesn't do anything to _the cursor_ as such. And when it moves point due to a property on an overlay, it moves point to the end of the overlay. So how could that ever put point like this? A B O O |O C (point = 3)