From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Nested display strings Date: Sat, 23 Apr 2011 19:44:18 +0300 Message-ID: <83k4ekc3z1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1303577072 19888 80.91.229.12 (23 Apr 2011 16:44:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2011 16:44:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 23 18:44:28 2011 Return-path: Envelope-to: ged-emacs-devel@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 1QDfwa-0007J8-7a for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2011 18:44:28 +0200 Original-Received: from localhost ([::1]:40632 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDfwZ-0006BL-Oo for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2011 12:44:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDfwX-0006BG-2l for emacs-devel@gnu.org; Sat, 23 Apr 2011 12:44:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDfwW-0007XW-Av for emacs-devel@gnu.org; Sat, 23 Apr 2011 12:44:24 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:50457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDfwW-0007XL-3G for emacs-devel@gnu.org; Sat, 23 Apr 2011 12:44:24 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LK400I005MQXW00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 23 Apr 2011 19:44:22 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.55.52]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK400J6A6HS2L10@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 23 Apr 2011 19:44:17 +0300 (IDT) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138655 Archived-At: The following 4 lines define two overlays with display strings, with the second overlay "nested" inside the first one: (defvar myov1 (make-overlay 16 51)) (overlay-put myov1 'display "STRING1") (defvar myov2 (make-overlay 29 43)) (overlay-put myov2 'display "STRING2") If you evaluate this in the *scratch* buffer, the result is this: ;; This buffer STRING1STRING2STRING1, and for Lisp evaluation. That is, STRING1 is displayed twice! Is this a bug or a feature? I asked Gerd M=F6llmann, and he told me that this is an accident: wha= t he really meant was, once STRING1 is displayed, to skip to the end of its overlay, so that the nested overlay myov2 would not be displayed at all. However, after so many years (this is how Emacs behaves since v21.1), perhaps we should keep this behavior. Does anyone know any real-life use cases where this "feature" is needed or would be beneficial? The reason I'm asking is that whether we keep or remove this feature affects the detailed design of how bidirectional text should be reordered in the presence of display properties and overlay strings.