From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: how to control isearch for invisible text Date: Mon, 14 Aug 2006 10:43:03 -0400 Message-ID: References: <854pwh3y55.fsf@lola.goethe.zz> <85d5b3yenv.fsf@lola.goethe.zz> <85d5b3tshe.fsf@lola.goethe.zz> <85k65bsa23.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155566624 24574 80.91.229.2 (14 Aug 2006 14:43:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Aug 2006 14:43:44 +0000 (UTC) Cc: rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 14 16:43:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GCdfE-0007OB-3x for ged-emacs-devel@m.gmane.org; Mon, 14 Aug 2006 16:43:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCdfD-0008QP-Jm for ged-emacs-devel@m.gmane.org; Mon, 14 Aug 2006 10:43:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GCdf0-0008Q5-0D for emacs-devel@gnu.org; Mon, 14 Aug 2006 10:43:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GCdew-0008Ps-GP for emacs-devel@gnu.org; Mon, 14 Aug 2006 10:43:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCdew-0008Pp-Br for emacs-devel@gnu.org; Mon, 14 Aug 2006 10:43:18 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GCdki-0001ql-ES; Mon, 14 Aug 2006 10:49:16 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 5469B2CEB7D; Mon, 14 Aug 2006 10:43:14 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 34806452B; Mon, 14 Aug 2006 10:43:03 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1F07C6C9DB; Mon, 14 Aug 2006 10:43:03 -0400 (EDT) Original-To: David Kastrup In-Reply-To: <85k65bsa23.fsf@lola.goethe.zz> (David Kastrup's message of "Mon, 14 Aug 2006 15:48:04 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca 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:58382 Archived-At: >>>>> "David" == David Kastrup writes: > Stefan Monnier writes: >>> This is pretty useless, since in your kind of application, it would >>> be important to know window-point rather than point. The >>> documentation of window-point already states: >> >> So it's called multiple times on the same buffer for each window >> that displays the buffer. And you pass the window as argument (so >> you rename it to pre-redisplay-functions). Big deal. Next >> "problem"? >> >>> And that is precisely the same problem with reveal-mode: sit-for can >>> be called inside of save-excursions, and the current window-point need >>> not correspond with the point relevant at top-level. >> >> What matters is what is displayed. Which is why a >> pre-redisplay-hoook is what is needed. > But how would reveal-mode know what point position it should act on? > For example, when outline-mode is active, and I type `)', should > show-paren-mode open an overlay on `(', even if this causes > recentering? After all, `pos-visible-in-window-p' is consulted by > show-paren-mode before redisplay. Of course, a pre-redisplay-hook is not the only thing needed. In some cases it's enough, in others it's more tricky. But it's a damn good starting point. Stefan