GNU bug report logs -
#71030
Display property of overlay-arrow-string is not honored
Previous Next
Full log
Message #11 received at 71030 <at> debbugs.gnu.org (full text, mbox):
> From: Emre Yolcu <mail <at> emreyolcu.com>
> Date: Sat, 18 May 2024 13:33:04 -0400
> Cc: 71030 <at> debbugs.gnu.org
>
> Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > It is not very clear to me what, specifically, did you try and what
> > did you expect to happen as result. Would you mind showing a simple
> > recipe, starting from "emacs -Q", that should have displayed the
> > overlay arrow, but didn't?
>
> Sorry for not being clear. Here is a recipe:
>
> 1. Launch with "emacs -Q".
> 2. Switch to the scratch buffer.
> 3. Copy the following into the buffer and evaluate each expression:
>
> (setq-default left-fringe-width 0)
> (setq-default left-margin-width 1)
> (setq overlay-arrow-string
> (propertize ">" 'display `((margin left-margin)
> ,(propertize ">" 'face 'default))))
>
> 4. Invoke "M-x occur", and enter "setq" when prompted for a regexp.
> 5. Switch to the Occur buffer and move between the matches by pressing "n"
> and "p".
>
> Expected behavior: Indicator arrow ">" appears in the margin.
> Current behavior: Indicator arrow ">" appears in the buffer.
Thanks, I understand now. What you want to do is not currently
supported: we basically disregard the properties of
overlay-arrow-string and always display the string in the text-area.
The function get_overlay_arrow_glyph_row will need to be enhanced to
support displaying the overlay arrow in the margin via 'display'
properties.
> 6 (extra). Evaluate the following expression:
>
> (setq overlay-arrow-string (propertize ">" 'face 'shadow))
>
> Unlike the display property, the face property does get applied and the
> appearance of the arrow in the Occur buffer changes.
Yes, the above function explicitly accounts for the string's 'face'
property (and only that property), so it works. But try setting the
face of the display string, like this:
(setq overlay-arrow-string
(propertize ">" 'display `((margin left-margin)
,(propertize ">" 'face 'shadow))))
and you will see that the face is ignored, since it's part of the
'display' property spec.
This bug report was last modified 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.