emacs-devel
[Top][All Lists]
Advanced

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

Re: Invisibility bug: `invisible' vs `display'


From: Daniel Brockman
Subject: Re: Invisibility bug: `invisible' vs `display'
Date: Thu, 22 Feb 2007 14:22:33 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

David Kastrup <address@hidden> writes:

> address@hidden (Kim F. Storm) writes:
>
>> Mixing invisible and display properties -- with the desire to actually
>> get the effects of the display property looks very obscure to me, and
>> cannot image that any code is actually relying on such functionality.
>>
>> I think the change is safe, so I installed it.
>
> Sigh.  If you use preview-latex on material where _some_ of it is made
> invisible using TeX-fold-mode, the desired outcome will be to get the
> display, and get it once only.

The bug did not let you override the `invisible' property
using the `display' property whenever you wanted; it _only_
let you do that at the start of invisible text --- clearly
counter-intuitive, counter-useful, illogical, and erroneous.

In other words, the bug prevents you from using `invisible'
to turn text invisible (because that will fail if the first
character happens to be an image or space or something),
while not providing any generally useful feature in return.

The reason I'm laboring this point is that you do not seem to
appreciate the obscurity of the now-eliminated special case.

Are you saying that preview-latex relies on being able to
make visible the _first_ character in a stretch of invisible
text by putting a `display' property on it?

> I can't vouch for the patch being either a step in the
> right or wrong direction.

Ignoring for a moment the fact that the old behavior was
very strange (it was almost exactly like the new behavior,
except for an obscure special case), are there actually any
arguments for having `display' override `invisible'?

If you want some text to show, why not just set `invisible'
to nil on that text?

> But I'd clearly like to see fewer "I think it should work and can't
> imagine anybody actually using it, anyway" patches at this point in
> the game.

One can never be sure that no code is relying on obscure bugs,
but I _can_ imagine that quite some code is actually relying
on the manual being right in that ``any non-`nil' `invisible'
property makes a character invisible [...] if you don't alter
the default value of `buffer-invisibility-spec'.''[1]

-- 
Daniel Brockman <address@hidden>

[1]  (info "(elisp)Invisible Text")





reply via email to

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