all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Emre Yolcu <mail@emreyolcu.com>
Cc: 71030@debbugs.gnu.org
Subject: bug#71030: Display property of overlay-arrow-string is not honored
Date: Sun, 19 May 2024 11:39:36 +0300	[thread overview]
Message-ID: <86h6eub3g7.fsf@gnu.org> (raw)
In-Reply-To: <636BA946-8D23-42AB-AB8B-47A9035B322D@emreyolcu.com> (message from Emre Yolcu on Sat, 18 May 2024 13:33:04 -0400)

> From: Emre Yolcu <mail@emreyolcu.com>
> Date: Sat, 18 May 2024 13:33:04 -0400
> Cc: 71030@debbugs.gnu.org
> 
> Eli Zaretskii <eliz@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.





      reply	other threads:[~2024-05-19  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18  4:00 bug#71030: Display property of overlay-arrow-string is not honored Emre Yolcu
2024-05-18 11:35 ` Eli Zaretskii
2024-05-18 17:33   ` Emre Yolcu
2024-05-19  8:39     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h6eub3g7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71030@debbugs.gnu.org \
    --cc=mail@emreyolcu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.