GNU bug report logs - #40821
Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones)

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Fri, 24 Apr 2020 15:57:01 UTC

Severity: wishlist

Full log


Message #37 received at 40821 <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 40821 <at> debbugs.gnu.org
Subject: Re: bug#40821: Margin strings are displayed in reverse order of
 overlay priority (low-priority specs hide high-priority ones)
Date: Wed, 13 May 2020 11:58:26 -0400
On 25/04/2020 03.58, Eli Zaretskii wrote:
> The strings are not concatenated, they are displayed one after
> another, in the order they are processed by the display engine.

I wonder if this should be its separate issue, but the order of strings in the margins changes as the point moves around in the buffer:

(with-current-buffer (get-buffer-create "overlay props")
  (erase-buffer)
  (delete-all-overlays)
  (setq-local left-margin-width 5)
  (save-excursion (insert "test\ntest\n"))
  (let ((ov1 (make-overlay (point-min) (point-max)))
        (ov2 (make-overlay (point-min) (point-at-eol))))
    (overlay-put
     ov1
     'before-string
     #("!" 0 1 (display
                ((margin left-margin) "c"))))
    (overlay-put
     ov2
     'before-string
     #("!" 0 1 (display
                ((margin left-margin) "3")))))
  (display-buffer (current-buffer)))

In this example, moving the point back and forth between point-min and 1+ point-min causes the margins to display alternatively "c3" and "3c".
Is this a bug?




This bug report was last modified 5 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.