From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1352: 23.0.60; isearch-success-function Date: Sat, 15 Nov 2008 15:39:35 -0800 Message-ID: <005c01c9477b$6adb8290$0200a8c0@us.oracle.com> Reply-To: Drew Adams , 1352@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226793107 17001 80.91.229.12 (15 Nov 2008 23:51:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2008 23:51:47 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 16 00:52:50 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L1Uwa-0000Y9-WA for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2008 00:52:49 +0100 Original-Received: from localhost ([127.0.0.1]:52915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1UvS-0008S0-OI for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Nov 2008 18:51:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1UuF-0007qZ-ND for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 18:50:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1Uu5-0007nv-PR for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 18:50:15 -0500 Original-Received: from [199.232.76.173] (port=58669 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1Uu4-0007ng-Is for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 18:50:12 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58962) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1Uu3-0002lj-SY for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 18:50:12 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAFNo8r0030010; Sat, 15 Nov 2008 15:50:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAFNj3kF028364; Sat, 15 Nov 2008 15:45:03 -0800 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Nov 2008 23:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1352 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122679237527119 (code B ref -1); Sat, 15 Nov 2008 23:45:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 15 Nov 2008 23:39:35 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAFNdWbI027113 for ; Sat, 15 Nov 2008 15:39:33 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:60412) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L1Ujf-0006Ni-Ig for emacs-pretest-bug@gnu.org; Sat, 15 Nov 2008 18:39:27 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L1Uji-00020l-O6 for emacs-pretest-bug@gnu.org; Sat, 15 Nov 2008 18:39:31 -0500 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:58834 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1Uji-00020d-DP for emacs-pretest-bug@gnu.org; Sat, 15 Nov 2008 18:39:30 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAFNe1xT017678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 15 Nov 2008 23:40:02 GMT Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAFNdb2u028824 for ; Sat, 15 Nov 2008 23:39:39 GMT Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 15 Nov 2008 15:39:20 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AclHe2qABZ8MZmFzR7ydpVVHRhHdtg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt707.oracle.com [141.146.40.85] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.491F5DAD.006E:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 15 Nov 2008 18:50:14 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22398 gmane.emacs.pretest.bugs:23356 Archived-At: The name of `isearch-success-function' seems wrong, if we believe the doc string. The doc string suggests that it is a predicate that filters the search hits that would otherwise be available. That's very general. If that's true, then the name should reflect this meaning - perhaps `isearch-predicate'. Similarly, the name of `isearch-success-function-default' should be something that suggests its very limited meaning: it filters search hits to those that are visible, unless invisible text too can be searched. It is a particular kind of search filter, and its name should reflect that particularity. Also, in `isearch-search', there is this: ;; Clear RETRY unless we matched some invisible text ;; and we aren't supposed to do that. (if (or (not isearch-success) (bobp) (eobp) (= (match-beginning 0) (match-end 0)) (funcall isearch-success-function (match-beginning 0) (match-end 0))) (setq retry nil))) The code here is general; it is not related to text visibility. So the comment is not general enough. It is a vestige that is appropriate now only when the value of `isearch-success-function' is `isearch-success-function-default'. The comment should instead say that we clear RETRY unless the search predicate says to skip this search hit. It seems like this is a partly finished enhancement to behavior that was originally only for searching invisible text. Seems like this was generalized to an arbitrary predicate that filters possible search hits - but the job seems only half done. The code presumably works in a general way, but the comments and symbol names are inappropriate. The comments and the variable and function names need to reflect the new behavior, and this behavior should be documented for users. Users should know how to take advantage of this feature, defining their own search predicates that filter the search hits that would normally be available, so that hits that dissatisfy the predicate are skipped. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-08 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping'