From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: isearch hooks (was: query-replace-interactive not documented) Date: Fri, 18 Jun 2004 23:19:32 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040528.181649.25475113.wl@gnu.org> <200405291737.i4THbPJ06689@raven.dms.auburn.edu> <878yeyczec.fsf@mail.jurta.org> <87n03aa4jk.fsf@mail.jurta.org> <87d63wy6ux.fsf_-_@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1087615262 25112 80.91.224.253 (19 Jun 2004 03:21:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2004 03:21:02 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jun 19 05:20:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbWPZ-0001my-00 for ; Sat, 19 Jun 2004 05:20:57 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbWPY-0003Vb-00 for ; Sat, 19 Jun 2004 05:20:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbWQg-0008UH-TW for emacs-devel@quimby.gnus.org; Fri, 18 Jun 2004 23:22:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BbWPz-00088Y-Oy for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:21:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BbWPx-00087I-SA for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:21:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbWPx-00086p-EG for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:21:21 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BbWOH-0006NO-PW for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:19:37 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BbWOC-0001Gx-NA; Fri, 18 Jun 2004 23:19:32 -0400 Original-To: Juri Linkov In-reply-to: <87d63wy6ux.fsf_-_@mail.jurta.org> (message from Juri Linkov on Fri, 18 Jun 2004 23:00:09 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25102 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25102 The patch below adds two hooks `isearch-wrapped-hook' and `isearch-failed-hook'. Thanks for working on it. However, I have a feeling that `isearch-failed-hook' is not implemented properly for the intended use. If isearch should move between info nodes, the natural way is that a failing search should switch nodes and then try again. To do that, this hook should run shortly after the actual search primitive, and it should be run with run-hook-with-args-until-success, and if it succeeds then isearch-success should be t--as if the search primitive had succeeded. So it won't put "Failed " in the echo area, for instance. I just looked at isearch.el and came across isearch-search-fun-function. I have a feeling that the right way to make isearch search through multiple nodes or buffers is to define a new low-level search function and interface it through isearch-search-fun-function. Does that look right to you?