From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#40821: Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones) Date: Sat, 25 Apr 2020 20:36:07 +0300 Message-ID: <83h7x779iw.fsf@gnu.org> References: <33007735-30b9-4c52-c440-929686e1cb0e@gmail.com> <83o8rg809k.fsf@gnu.org> <5da7af4f-0f8c-c79c-38d7-ed7465d9b34d@gmail.com> <83sggr7jbf.fsf@gnu.org> <84be9f87-15ac-f501-13ba-5ce0372332ac@gmail.com> <83imhn7at9.fsf@gnu.org> <949b79b9-0009-6f36-7d6d-8be895d2cf19@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21844"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40821@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 25 19:37:30 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 1jSOk5-0005ZT-75 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 19:37:29 +0200 Original-Received: from localhost ([::1]:41800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSOk4-0005ME-9W for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 13:37:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47952) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSOjl-0005M4-Cm for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 13:37:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSOje-0006T9-Ik for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 13:37:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSOjd-0006SB-O1 for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 13:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSOjd-0000AR-KY for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Apr 2020 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40821 X-GNU-PR-Package: emacs Original-Received: via spool by 40821-submit@debbugs.gnu.org id=B40821.1587836193607 (code B ref 40821); Sat, 25 Apr 2020 17:37:01 +0000 Original-Received: (at 40821) by debbugs.gnu.org; 25 Apr 2020 17:36:33 +0000 Original-Received: from localhost ([127.0.0.1]:60289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSOjB-00009i-Au for submit@debbugs.gnu.org; Sat, 25 Apr 2020 13:36:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSOj8-00009V-Jp for 40821@debbugs.gnu.org; Sat, 25 Apr 2020 13:36:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58522) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSOj3-000503-AB; Sat, 25 Apr 2020 13:36:25 -0400 Original-Received: from [176.228.60.248] (port=4871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jSOix-0003FE-A1; Sat, 25 Apr 2020 13:36:25 -0400 In-Reply-To: <949b79b9-0009-6f36-7d6d-8be895d2cf19@gmail.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Sat, 25 Apr 2020 13:21:13 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179019 Archived-At: > Cc: 40821@debbugs.gnu.org > From: Clément Pit-Claudel > Date: Sat, 25 Apr 2020 13:21:13 -0400 > > > Yes, but is it reasonable to ask the display engine to figure that out > > for you? You are talking about something that is clearly application > > logic; other applications might want some other logic to have other > > overlays "win". > > I think it is reasonable: we already have a notion of overlays "winning", namely their priority. But you want to change that, based I don't really understand on what? The handling of overlays by their priorities is mainly for when each overlay is created by a different Lisp program, when coordination is hard or impossible. This is not the case here. > > As expected: faces are merged, but fringe bitmaps aren't. > > Yes, which is the outlandish part :) I don't think I see it that way. > > What you described is actually the order of _increasing_ priority. Or > > am I confused? > > Of, yes, you're completely right; sorry for mixing up the terms. > I meant to say that, if highest-priority overlays were displayed first in the margin, then on narrow margins specs from high-priority overlays would take precedence. And we are right back to square one... I can only reiterate my suggestion: don't rely on the display engine to solve the problems in such cases. The best solution is for the Lisp program to apply its logic and put only the overlays it needs. I'm not saying this just out of stubbornness. Handling of overlays is a notoriously complex part of the display engine, because they interact with faces, invisible properties, and display properties in complicated ways. We shouldn't complicate it more where Lisp programs which create the overlays can DTRT instead.