unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14542: 24.3.50; Simultaneous use of display and invisible properties
@ 2013-06-03  4:34 Jambunathan K
  2013-06-03 15:49 ` Eli Zaretskii
  2013-11-15  5:20 ` Jambunathan K
  0 siblings, 2 replies; 3+ messages in thread
From: Jambunathan K @ 2013-06-03  4:34 UTC (permalink / raw)
  To: 14542


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.  I have looked at (info "(elisp) Replacing
Specs").  I am not sure whether the 'invisible property counts as a
display spec.  I think it is worth clarifying the desgin or
implementation detail in the Elisp manual.

Just in case it matters, the 'display property is added right after
(insert ...) operation.  The invisible property is added as part of
font-lock operation.


,---- (text-properties-at (point))
| (invisible t fontified t display
| 	   #("{org-defkey}" 0 12
| 	     (face font-lock-function-name-face)))
`----

,---- (overlays-at (point))
| nil
`----

,---- C-u C-x =
|              position: 122 of 2707 (4%), column: 4
|             character: 1 (displayed as 1) (codepoint 49, #o61, #x31)
|     preferred charset: ascii (ASCII (ISO646 IRV))
| 
| There are text properties here:
|   display              [Show]
|   fontified            t
|   invisible            t
| 
| [back]
`----

 GNU Emacs 24.3.50.2 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-06-03 on debian-6.05
Bzr revision: 112824 rgm@gnu.org-20130602182638-wbn53t13ukjyzxq5
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#14542: 24.3.50; Simultaneous use of display and invisible properties
  2013-06-03  4:34 bug#14542: 24.3.50; Simultaneous use of display and invisible properties Jambunathan K
@ 2013-06-03 15:49 ` Eli Zaretskii
  2013-11-15  5:20 ` Jambunathan K
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2013-06-03 15:49 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 14542

> From: Jambunathan K <kjambunathan@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#14542: 24.3.50; Simultaneous use of display and invisible properties
  2013-06-03  4:34 bug#14542: 24.3.50; Simultaneous use of display and invisible properties Jambunathan K
  2013-06-03 15:49 ` Eli Zaretskii
@ 2013-11-15  5:20 ` Jambunathan K
  1 sibling, 0 replies; 3+ messages in thread
From: Jambunathan K @ 2013-11-15  5:20 UTC (permalink / raw)
  To: 14542-done


OP here.  Closed.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-15  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03  4:34 bug#14542: 24.3.50; Simultaneous use of display and invisible properties Jambunathan K
2013-06-03 15:49 ` Eli Zaretskii
2013-11-15  5:20 ` Jambunathan K

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).