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#10395: 24.0.92; line-prefix text inherits face properties from the preceding line rather than following text Date: Sat, 31 Dec 2011 16:09:41 +0200 Message-ID: <83obuosuhm.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1325340618 17259 80.91.229.12 (31 Dec 2011 14:10:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2011 14:10:18 +0000 (UTC) Cc: 10395@debbugs.gnu.org To: David Edmondson , Stefan Monnier , Chong Yidong , Miles Bader Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 31 15:10:09 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 1RgzdP-0006Il-5k for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2011 15:10:07 +0100 Original-Received: from localhost ([::1]:37856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgzdO-0006q6-An for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2011 09:10:06 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgzdL-0006oj-5S for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2011 09:10:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgzdK-0001vh-27 for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2011 09:10:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgzdJ-0001vO-Us for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2011 09:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RgzgE-0000Ym-KT for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2011 09:13:02 -0500 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: Sat, 31 Dec 2011 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10395 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10395-submit@debbugs.gnu.org id=B10395.13253407692131 (code B ref 10395); Sat, 31 Dec 2011 14:13:02 +0000 Original-Received: (at 10395) by debbugs.gnu.org; 31 Dec 2011 14:12:49 +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 1Rgzg0-0000YK-Qs for submit@debbugs.gnu.org; Sat, 31 Dec 2011 09:12:49 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rgzfx-0000YB-HY for 10395@debbugs.gnu.org; Sat, 31 Dec 2011 09:12:46 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LX200300MZ1LG00@a-mtaout23.012.net.il> for 10395@debbugs.gnu.org; Sat, 31 Dec 2011 16:09:42 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.18.76]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LX2003WGNC2FR50@a-mtaout23.012.net.il>; Sat, 31 Dec 2011 16:09:40 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 31 Dec 2011 09:13:02 -0500 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:55337 Archived-At: > From: David Edmondson > Date: Wed, 28 Dec 2011 12:47:18 +0000 > > If a line-prefix property is added to a region of a buffer, the > displayed line-prefix region inherits the face properties from the > preceding line rather than from the first character on the line, except > if the region so propertised starts at the beginning of the > buffer. As I suspected, this happens simply because we don't change the face used for display until we process the first character that has a different face, in this case the first character on the line. It is possible to change that, but we need to decide first whether the current behavior is wrong or not. IOW, why would the user expect that the line-prefix be rendered using the face that begins _after_ the prefix? This would be unlike anything else in the Emacs display operation. Is this case really different? What if the different face starts on some character that is not the line's first character -- would you, David, expect the line-prefix use that different face? if not, why do so when the different face begins at the line's beginning? Conceptually, a line-prefix and wrap-prefix are just display strings, only specified differently. They therefore behave just like display strings, in that they inherit the face of the _preceding_ text. If you don't want that, you will have to specify face properties for the line-prefix. (This is, btw, the workaround for the problem you had.) So my vote is to leave this as it works now, and maybe document this to avoid surprises. If the decision is nevertheless to change the behavior as David expected, then we need to consider additional issues/complications: . what, if anything, should we do with wrap-prefix? should it also "inherit" the face of the first character of the continuation line? . would the result look as TRT when bidirectional text is involved? If the line with a prefix begins with right-to-left text, the first character of the line will not be the first (leftmost) character on display, while the leftmost character on display might then have a face that is different from that of line-prefix, which will look odd to say the least. . should this "inheritance" be limited to faces, or should other text properties behave like that as well? e.g., what about `mouse-face' or `pointer' properties? Comments are welcome.