From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Brockman Newsgroups: gmane.emacs.devel Subject: Re: Invisibility bug: `invisible' vs `display' Date: Thu, 22 Feb 2007 03:57:08 +0100 Message-ID: <87vehu99x7.fsf@wigwam.brockman.se> References: <87sldbtd50.fsf@wigwam.brockman.se> <87hctraqhh.fsf@stupidchicken.com> <87hctq6eyd.fsf@wigwam.brockman.se> <861wkucyxw.fsf@lola.quinscape.zz> <87ps8e9k8e.fsf@wigwam.brockman.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172113067 13023 80.91.229.12 (22 Feb 2007 02:57:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Feb 2007 02:57:47 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 03:57:40 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HK49L-00038o-5x for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 03:57:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK49K-0006w0-Us for ged-emacs-devel@m.gmane.org; Wed, 21 Feb 2007 21:57:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HK49A-0006vm-87 for emacs-devel@gnu.org; Wed, 21 Feb 2007 21:57:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HK499-0006va-7N for emacs-devel@gnu.org; Wed, 21 Feb 2007 21:57:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK498-0006vX-Tr for emacs-devel@gnu.org; Wed, 21 Feb 2007 21:57:26 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HK498-00066m-Cm for emacs-devel@gnu.org; Wed, 21 Feb 2007 21:57:26 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HK48w-0005Ej-SM for emacs-devel@gnu.org; Thu, 22 Feb 2007 03:57:14 +0100 Original-Received: from c-b1fee255.09-32-6c6b7013.cust.bredbandsbolaget.se ([85.226.254.177]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Feb 2007 03:57:14 +0100 Original-Received: from daniel by c-b1fee255.09-32-6c6b7013.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Feb 2007 03:57:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 64 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-b1fee255.09-32-6c6b7013.cust.bredbandsbolaget.se X-Face: :&2UWGm>e24)ip~'K@iOsA&JT3JX*v@1-#L)=dUb825\Fwg#`^N!Y*g-TqdS AevzjFJe96f@V'ya8${57/T'"mTd`1o{TGYhHnVucLq!D$r2O{IN)7>.0op_Y`%r;/Q +(]`3F-t10N7NF\.Mm0q}p1:%iqTi:5]1E]rDF)R$9.!,Eu'9K':y9^U3F8UCS1M+A$ 8[[[WT^`$P[vu>P+8]aQMh9giu&fPCqLW2FSsGs User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:NxKuMGIINy58XhclPjofhk4pgjY= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66596 Archived-At: Daniel Brockman writes: > David Kastrup writes: > >> Daniel Brockman 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