GNU bug report logs - #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

Previous Next

Package: emacs;

Reported by: Dmitry <dgutov <at> yandex.ru>

Date: Sun, 17 Aug 2014 22:36:02 UTC

Severity: normal

Found in version 24.3.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18285 <at> debbugs.gnu.org
Subject: Re: 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: Sun, 24 Aug 2014 05:28:42 +0400
On 08/23/2014 12:55 AM, Eli Zaretskii wrote:

> Look at the code inside load_overlay_strings that handles this, to
> understand what I'm saying.

Do you mean the situation when the `invisible' overlay starts before the 
`display' starts? And then we skip to the end because of `invisible', 
but that position is covered by `display', so if we ignore the 
`invisible' there, `before-string' would not be displayed?

>>> 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.

This doesn't seem to apply to the second example, because the overlay 
with `invisible' and the `display' prop start at the same position, so 
the beginning of the overlay would not be "made disappear".

I'm not sure what to do in the "mixed" cases like described above, 
though. Maybe only make `invisible' ignored when `display' covers the 
entirety of its span.

Or maybe this complexity is an argument in favor of `invisible' taking 
priority over `display', after all.

That sounds like it may be easier to implement, or at least specify: 
don't handle `display' only when it's entirely covered by `invisible'.

> You asked to ignore the invisible, so it will change.

Basically, my suggestion was to ignore it when `display' already 
performs all of its job. But the edge cases make it more complicated.




This bug report was last modified 3 years and 38 days ago.

Previous Next


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