emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#33435: closed (27.0.50; A use case for recursive d


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#33435: closed (27.0.50; A use case for recursive display specifications)
Date: Thu, 03 Oct 2019 16:44:01 +0000

Your message dated Thu, 3 Oct 2019 18:42:48 +0200
with message-id <CADwFkmkNJbtR71kXSFv=address@hidden>
and subject line Re: bug#33435: 27.0.50; A use case for recursive display 
specifications
has caused the debbugs.gnu.org bug report #33435,
regarding 27.0.50; A use case for recursive display specifications
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
33435: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33435
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; A use case for recursive display specifications Date: Mon, 19 Nov 2018 18:51:37 +0000
This is a feature request: I'd like to be able to display an empty line
as a non-empty line with images in it.

If there's a way to do that with standard display specs, I haven't
found it. It's possible I'm merely missing an obvious way to do so.

I think there are two almost-equivalent approaches to achieving this:

1. interpret a list of display specifications by displaying the first
element of the list, then the second, and so, on, so I could use
(put-text-property beg end 'display `(,image1 ,image2 ,image3 "\n"))

2. allow a single level of recursion in display specifications, so I
could use
(put-text-property beg end 'display (concat (propertize " " 'display
image1) (propertize " " 'display image2) (propertize " " 'display
image3) "\n"))

I've tried simply disabling the checks for recursive display
specifications and (2) appears to work, but I don't know the precise
rationale for their existence, so it's possible that breaks the display
engine somehow.

If the problem is merely the possibility of creating an infinite loop
by setting a string's display property to the string itself (indeed,
in my test build, that crashes emacs), that could be avoided while
still allowing a single level of recursion.

(I'm using this to highlight syntactic indentation with SVG images,
and that's much prettier if empty lines are interpreted as being
indented to the minimum of the preceding and following levels of
indentation, rather than merely being empty.)



--- End Message ---
--- Begin Message --- Subject: Re: bug#33435: 27.0.50; A use case for recursive display specifications Date: Thu, 3 Oct 2019 18:42:48 +0200
skrev Pip Cet <address@hidden> writes:

> On Thu, Oct 3, 2019 at 12:20 AM Stefan Kangas <address@hidden> wrote:
> > Is this feature request still relevant, or did Eli's reply solve this
> > use case?  Thanks.
>
> I think we can close this bug. It would be nice to have a way to do
> this without using overlays or modifying buffer text (the latter of
> which is what I ended up doing), but hopefully new ideas for how to
> handle overlay/text properties will take care of that one day...
>
> Thanks!

Thank you for clarifying!  Closing now.

Best regards,
Stefan Kangas


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]