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 Date: Sun, 20 Jun 2004 15:18:49 -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> <87smcro0nx.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1087759181 21368 80.91.224.253 (20 Jun 2004 19:19:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Jun 2004 19:19:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Jun 20 21:19:37 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 1Bc7qr-0005dy-00 for ; Sun, 20 Jun 2004 21:19:37 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bc7qr-00032i-00 for ; Sun, 20 Jun 2004 21:19:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bc7s4-0003G8-5Y for emacs-devel@quimby.gnus.org; Sun, 20 Jun 2004 15:20:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bc7s0-0003EP-Qg for emacs-devel@gnu.org; Sun, 20 Jun 2004 15:20:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bc7s0-0003DZ-87 for emacs-devel@gnu.org; Sun, 20 Jun 2004 15:20:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bc7s0-0003DJ-4c for emacs-devel@gnu.org; Sun, 20 Jun 2004 15:20:48 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bc7q5-0004IH-Mh for emacs-devel@gnu.org; Sun, 20 Jun 2004 15:18:49 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Bc7q5-0007ow-8d; Sun, 20 Jun 2004 15:18:49 -0400 Original-To: Juri Linkov In-reply-to: <87smcro0nx.fsf@mail.jurta.org> (message from Juri Linkov on Sat, 19 Jun 2004 21:36:18 +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:25128 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25128 It doesn't look right since `isearch-search-fun' is used to specify the function to call for the search different from the default `search-forward' or `re-search-forward'. But in the intended cases default functions are suitable to search the text in the buffer. What is needed is to switch locations on the search when the search in the current buffers is failed. The function that isearch-search-fun specifies can do all of those jobs. Do you see what I mean? In the newest version I added a new variable `isearch-wrap-failed'. If it is set to non-nil the search will not pause for displaying the message "Failing I-search..." but will immediately wrap the search to the location found by `isearch-wrap-functions'. This is the wrong way to do it. Wrapping should NEVER happen immediately after the basic search fails. You might want to do something else after the basic search fails, but that thing is not wrapping!