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.