all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Brockman <daniel@brockman.se>
To: emacs-devel@gnu.org
Subject: Re: Invisibility bug: `invisible' vs `display'
Date: Thu, 22 Feb 2007 14:22:33 +0100	[thread overview]
Message-ID: <87ps82gwdi.fsf@wigwam.brockman.se> (raw)
In-Reply-To: 863b4yxvu3.fsf@lola.quinscape.zz

David Kastrup <dak@gnu.org> writes:

> storm@cua.dk (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 <daniel@brockman.se>

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

  reply	other threads:[~2007-02-22 13:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 19:00 Invisibility bug: `invisible' vs `display' Daniel Brockman
2007-02-12 20:39 ` Daniel Brockman
2007-02-12 23:46 ` Chong Yidong
2007-02-13  1:09   ` Daniel Brockman
2007-02-13  7:13     ` David Kastrup
2007-02-13 14:59       ` Daniel Brockman
2007-02-22  2:57         ` Daniel Brockman
2007-02-22 11:27           ` Kim F. Storm
2007-02-22 11:42             ` David Kastrup
2007-02-22 13:22               ` Daniel Brockman [this message]
2007-02-22 13:38                 ` David Kastrup
2007-02-22 14:15                   ` Daniel Brockman
2007-02-22 17:19                     ` Johan Bockgård
2007-02-22 17:37                     ` David Kastrup
2007-02-22 20:39                       ` Daniel Brockman
2007-02-22 21:00                         ` David Kastrup
2007-02-22 21:23                           ` Daniel Brockman
2007-02-22 21:51                             ` David Kastrup
2007-02-23 13:23                               ` Daniel Brockman
2007-02-22 17:08               ` Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ps82gwdi.fsf@wigwam.brockman.se \
    --to=daniel@brockman.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.