all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: Daniel Brockman <daniel@brockman.se>
Cc: emacs-devel@gnu.org
Subject: Re: Invisibility bug: `invisible' vs `display'
Date: Thu, 22 Feb 2007 12:27:01 +0100	[thread overview]
Message-ID: <m37iuaxwje.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <87vehu99x7.fsf@wigwam.brockman.se> (Daniel Brockman's message of "Thu\, 22 Feb 2007 03\:57\:08 +0100")

Daniel Brockman <daniel@brockman.se> writes:

> When folding stretches of code, it does not make sense to
> have images in between cluster all together and stick out
> in spite of the invisibility of the region.

That is clearly a bug.

> This patch fixes the problem for me.

Thank you.

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.



> *** old/emacs/src/xdisp.c	2006-12-30 00:29:45.000000000 +0100
> --- new/emacs/src/xdisp.c	2007-02-22 03:29:37.000000000 +0100
> ***************
> *** 762,769 ****
>     /* Handle `face' before `display' because some sub-properties of
>        `display' need to know the face.  */
>     {&Qface,		FACE_PROP_IDX,		handle_face_prop},
> -   {&Qdisplay,		DISPLAY_PROP_IDX,	handle_display_prop},
>     {&Qinvisible,		INVISIBLE_PROP_IDX,	handle_invisible_prop},
>     {&Qcomposition,	COMPOSITION_PROP_IDX,	handle_composition_prop},
>     {NULL,		0,			NULL}
>   };
> --- 762,769 ----
>     /* Handle `face' before `display' because some sub-properties of
>        `display' need to know the face.  */
>     {&Qface,		FACE_PROP_IDX,		handle_face_prop},
>     {&Qinvisible,		INVISIBLE_PROP_IDX,	handle_invisible_prop},
> +   {&Qdisplay,		DISPLAY_PROP_IDX,	handle_display_prop},
>     {&Qcomposition,	COMPOSITION_PROP_IDX,	handle_composition_prop},
>     {NULL,		0,			NULL}
>   };
>
> I don't know enough about the display code to be able to say
> whether this is a safe change, but it seems very logical to
> me to handle the `invisible' property first, since invisible
> text should just be skipped.
>
> In fact, why not move it all the way to the top of that list?

It seems like the natural thing to do, but I'm not confident that
it is ok to skip handling the `fontified' property.

But it seems superfluous to process face properties on invisible text,
so it looks safe to move Qinvisible before the Qface entry.
Can anyone see any problems with that??

--
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2007-02-22 11:27 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 [this message]
2007-02-22 11:42             ` David Kastrup
2007-02-22 13:22               ` Daniel Brockman
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=m37iuaxwje.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=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.