From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43033: 27.1; Two zero-width overlays with before- and after-string property Date: Tue, 25 Aug 2020 09:50:34 +0300 Message-ID: <83ft8b5idh.fsf@gnu.org> References: <1377.1598333200@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38001"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43033@debbugs.gnu.org To: Ikumi Keita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 08:51:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kASnc-0009nN-07 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 08:51:16 +0200 Original-Received: from localhost ([::1]:58864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kASna-0004LX-Qr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 02:51:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kASnP-0004L7-2P for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 02:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kASnO-0005s9-PQ for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 02:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kASnO-000478-MN for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 02:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 06:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43033 X-GNU-PR-Package: emacs Original-Received: via spool by 43033-submit@debbugs.gnu.org id=B43033.159833826215812 (code B ref 43033); Tue, 25 Aug 2020 06:51:02 +0000 Original-Received: (at 43033) by debbugs.gnu.org; 25 Aug 2020 06:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kASnN-00046p-T7 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 02:51:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kASnL-00046X-DD; Tue, 25 Aug 2020 02:51:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33370) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kASnE-0005qy-82; Tue, 25 Aug 2020 02:50:52 -0400 Original-Received: from [176.228.60.248] (port=1280 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kASnD-0000j3-DA; Tue, 25 Aug 2020 02:50:51 -0400 In-Reply-To: <1377.1598333200@localhost> (message from Ikumi Keita on Tue, 25 Aug 2020 14:26:40 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186234 Archived-At: tags 43033 notabug thanks > From: Ikumi Keita > Date: Tue, 25 Aug 2020 14:26:40 +0900 > > (setq ov1 (make-overlay (point-max) (point-max))) > (setq ov2 (make-overlay (point-max) (point-max))) > (overlay-put ov1 'after-string "AFTER") > (overlay-put ov2 'before-string "before") > -------------------------------------------------- > 2. emacs -Q -l /tmp/foo.el > 3. Expected result: *scrach* buffer displays "beforeAFTER" in it > Actual result: *scrach* buffer displays "AFTERbefore" in it This is the expected (albeit somewhat counter-intuitive) behavior: Emacs always sorts after-strings so that they come in front of before-strings, except if they are from the same overlay. This behavior remained unchanged since Emacs 21.1. > [How this behavior affects my usage of overlay] > When the minibuffer has a zero-width overlay at the EOB with > before-string property, `set-minibuffer-message' displays that string > after, not before, the echo area message shown by that function. This is by design: we want the minibuffer message to be as visible as possible, so other overlays are pushed to the right (where they could be hidden if the screen space is insufficient).