From: Daniel Brockman <daniel@brockman.se>
To: emacs-devel@gnu.org
Subject: Re: Invisibility bug: `invisible' vs `display'
Date: Thu, 22 Feb 2007 03:57:08 +0100 [thread overview]
Message-ID: <87vehu99x7.fsf@wigwam.brockman.se> (raw)
In-Reply-To: 87ps8e9k8e.fsf@wigwam.brockman.se
Daniel Brockman <daniel@brockman.se> writes:
> David Kastrup <dak@gnu.org> writes:
>
>> Daniel Brockman <daniel@brockman.se> writes:
>>
>>> Let me state again what I see: The `display' property
>>> overrides `invisible' if and only if the previous character
>>> is visible. How is this reasonable or useful in any way?
>>
>> 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.
>
> I completely agree.
To clarify, this is exactly what I am trying to fix.
>> I am not saying that the current behavior is perfect, but it would
>> seem you would want to replace it with something that can cause quite
>> a bit of trouble, and I don't think we have the time to shake out all
>> repercussions before the release.
>
> On the contrary, I want to replace the current behavior with
> something that makes `invisible' _always_ override `display'.
>
> The current behavior is for `invisible' to override `display'
> in _almost_ every case. In fact, all except one edge case.
> I simply want to eliminate this anomaly, which is causing me
> quite a bit of trouble.
This patch fixes the problem for me.
*** 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?
--
Daniel Brockman <daniel@brockman.se>
next prev parent reply other threads:[~2007-02-22 2:57 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 [this message]
2007-02-22 11:27 ` Kim F. Storm
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vehu99x7.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 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).