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

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

bug#18285: 24.3.92; A combination of `display' on text and `invisible' a


From: Eli Zaretskii
Subject: bug#18285: 24.3.92; A combination of `display' on text and `invisible' and `before/after-string' leads to the before/after string being displayed twice
Date: Fri, 22 Aug 2014 16:31:13 +0300

> Date: Fri, 22 Aug 2014 15:41:51 +0400
> From: Dmitry Gutov <address@hidden>
> CC: address@hidden
> 
> >> Anyway, how about the other way around? I'll like this less, but why not
> >> make `invisible' inactive when `display' is set?
> >
> > That's what Emacs does already.  The only place where invisible still
> > matters in this situation is when deciding how and where to display
> > overlay strings.  I thought I explained that earlier in this thread.
> 
> So, why not make it matter less? "If display is set, don't interpret 
> invisible" should be a straightforward piece of logic.

If that's what people want, it's an easy change.  But the question is,
won't that cause overlay strings not to be displayed in some cases?

> If `display' takes priority over `invisible', I would expect
> 
> (let ((pt (point)))
>    (insert (propertize "a" 'display "bbb"))
>    (let ((o (make-overlay pt (point))))
>      (overlay-put o 'after-string "foo\nbar")))
> 
> and
> 
> (let ((pt (point)))
>    (insert (propertize "a" 'display "bbb"))
>    (let ((o (make-overlay pt (point))))
>      (overlay-put o 'invisible t)
>      (overlay-put o 'after-string "foo\nbar")))
> 
> to be rendered the same.

The question is what would you expect from the second example, if it
used before-string there?  Should the before-string be displayed or
shouldn't it?  Since invisible makes the beginning of the overlay
disappear, under your suggestion it won't be displayed.





reply via email to

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