GNU bug report logs - #14542
24.3.50; Simultaneous use of display and invisible properties

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 3 Jun 2013 04:37:02 UTC

Severity: minor

Found in version 24.3.50

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 14542 <at> debbugs.gnu.org
Subject: Re: bug#14542: 24.3.50;
	Simultaneous use of display and invisible properties
Date: Mon, 03 Jun 2013 18:49:30 +0300
> From: Jambunathan K <kjambunathan <at> gmail.com>
> Date: Mon, 03 Jun 2013 10:04:51 +0530
> 
> 
> I have a piece of text that has both invisible and display property set.
> The underlying buffer text is invisible but the display engine displays
> the overlay string. i.e., In the example below, I can see {org-defkey}
> in my monitor.  The underlying character "1..." etc is hidden.
> 
> This bug is merely to check whether the above behaviour is as intended
> or a "unknown" side-effect.

It's undefined behavior.  What you see is a consequence of how the
display engine implements application of text properties.  When the
same buffer or string position has more than one property change, the
display engine applies them in this order:

 . 'fontified'
 . 'face'
 . 'display'
 . 'invisible'
 . 'composition'

When 2 properties remove text from display in different ways, the
result depends on the order.

> I have looked at (info "(elisp) Replacing Specs").  I am not sure
> whether the 'invisible property counts as a display spec.

It doesn't.  Display specs are limited to 'display' properties (and
not all of them are "replacing").  The 'invisible' property just makes
the text invisible on display.

> I think it is worth clarifying the desgin or implementation detail
> in the Elisp manual.

Not sure we should leak the implementation into the documentation.
This code is unaltered since it was written 13 years ago, and I don't
think I ever heard any questions about this particular situation.  I
guess it's sufficiently rare.




This bug report was last modified 11 years and 251 days ago.

Previous Next


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