From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Todays exercise of sanity (or does "see" really match "not"?) Date: Wed, 23 Mar 2005 12:01:41 +0100 Message-ID: References: <002301c52e18$c9b014a0$0200a8c0@sedrcw11488> <200503211349.j2LDnxX12741@raven.dms.auburn.edu> <003401c52e20$d6f79c70$0200a8c0@sedrcw11488> <87hdj4vppf.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1111577537 1148 80.91.229.2 (23 Mar 2005 11:32:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2005 11:32:17 +0000 (UTC) Cc: juri@jurta.org, lennart.borgman.073@student.lu.se, teirllm@dms.auburn.edu, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 12:32:16 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DE45l-0005wS-RB for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 12:32:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE4NF-00063k-G2 for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 06:50:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DE3ul-0006Ci-Bg for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:20:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DE3tI-0005fk-SP for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:19:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE3tH-0005Px-6m for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:19:12 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DE3cS-0007z4-Ew for emacs-devel@gnu.org; Wed, 23 Mar 2005 06:01:48 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DE3cK-0007xo-HF; Wed, 23 Mar 2005 06:01:40 -0500 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Wed, 23 Mar 2005 11:07:07 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:35032 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35032 --=-=-= storm@cua.dk (Kim F. Storm) writes: > Instead we can explicitly put an inivisible property together with > the display property on a priece of "hidden" text which should be > ignored by searches. That need a little work to check all uses of > display properties, but it doesn't break any old code relying on the > current behaviour. > > I don't know whether it actually works to put both invisible and > display on some text (with the effect of showing the image and > ignoring the under-laying text). It did in the past. I remember that effect from when we were desperately trying to find a combination of text properties that would work with both Emacs and XEmacs. > Would someone make some examples to check it? I just patched up preview-latex to place the invisible property on the overlays it creates (obviously, not the desired default behavior). Now this is using overlays, not text properties, but the results should be pretty much the same. And the results are that stuff is not found indeed when using isearch. query-replace-regexp, however, still finds it. Non-interactive search doesn't find it. I also remember that in the Emacs-21.1 code base, placing the "invisible" property on displayed stuff had the effect that scrolling did no longer account for the amount of vertical space taken by the image. However, with the current HEAD, this effect is not to be seen. In case that you want to experiment with it, here is the patch I used. Unfortunately, the main work is done in a macro, so you need something like (let ((load-path (cons "." load-path))) (load "preview.el")) to let it take effect unless you recompile and reinstall preview-latex. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment --- prv-emacs.el 18 Mar 2005 22:36:24 +0100 1.63 +++ prv-emacs.el 23 Mar 2005 11:48:08 +0100 @@ -168,6 +168,7 @@ `(propertize "x" 'display ,glyph + 'invisible t 'mouse-face 'highlight 'help-echo ,(if (stringp helpstring) @@ -347,12 +348,12 @@ (overlay-put ov 'category 'preview-overlay) (if (eq (overlay-start ov) (overlay-end ov)) (overlay-put ov 'before-string (car strings)) - (dolist (prop '(display keymap mouse-face help-echo)) + (dolist (prop '(invisible display keymap mouse-face help-echo)) (overlay-put ov prop (get-text-property 0 prop (car strings)))) (overlay-put ov 'before-string nil)) (overlay-put ov 'face nil)) - (dolist (prop '(display keymap mouse-face help-echo)) + (dolist (prop '(invisible display keymap mouse-face help-echo)) (overlay-put ov prop nil)) (overlay-put ov 'face 'preview-face) (unless (cdr strings) --=-=-= -- David Kastrup, Kriemhildstr. 15, 44793 Bochum --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--