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: Sun, 16 Nov 2008 16:45:34 -0800 Message-ID: <000e01c9484d$cdc82f20$0200a8c0@us.oracle.com> References: <005c01c9477b$6adb8290$0200a8c0@us.oracle.com> <87fxlrid7i.fsf@jurta.org> 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 1226884243 14559 80.91.229.12 (17 Nov 2008 01:10:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 01:10:43 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 1352@emacsbugs.donarmstrong.com To: "'Juri Linkov'" , "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 17 02:11:43 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 1L1seS-0007cL-1k for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Nov 2008 02:11:40 +0100 Original-Received: from localhost ([127.0.0.1]:60836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1sdJ-0000BY-Fe for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2008 20:10:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1sd5-00007G-3F for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2008 20:10:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1sd3-00006P-7Y for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2008 20:10:14 -0500 Original-Received: from [199.232.76.173] (port=46143 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1sd3-00006L-4G for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2008 20:10:13 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47335) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1sd2-00025E-Mh for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2008 20:10:13 -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 mAH1A8r5025036; Sun, 16 Nov 2008 17:10:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAH0t4en020165; Sun, 16 Nov 2008 16:55:04 -0800 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Nov 2008 00:55:04 +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.122688282918794 (code B ref -1); Mon, 17 Nov 2008 00:55:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 17 Nov 2008 00:47:09 +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 mAH0l6Xf018786 for ; Sun, 16 Nov 2008 16:47:07 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:38382) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L1sGa-0001QP-9C for emacs-pretest-bug@gnu.org; Sun, 16 Nov 2008 19:47:00 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L1sGe-0000Vc-OK for emacs-pretest-bug@gnu.org; Sun, 16 Nov 2008 19:47:05 -0500 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:37635) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1sGe-0000QX-Ca for emacs-pretest-bug@gnu.org; Sun, 16 Nov 2008 19:47:04 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAH0js4D023385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Nov 2008 00:45:55 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 mAH0jVXS031485; Mon, 17 Nov 2008 00:45:32 GMT Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 17 Nov 2008 00:45:17 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87fxlrid7i.fsf@jurta.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Thread-Index: AclIMVAGcK9D8EpjT+qer5RidLBt1wAD0v3g X-Source-IP: acsmt707.oracle.com [141.146.40.85] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010205.4920BE9F.0018:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 16 Nov 2008 20:10: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:22428 gmane.emacs.pretest.bugs:23362 Archived-At: Thanks, Juri. Looks better, to me anyway. Some details you might want to consider - 1. This doc string: > ! (defun isearch-filter-invisible (beg end) > ! "Default predicate to filter out invisible text. > ! It filters search hits to those that are visible (at least > partially), > ! unless invisible text too can be searched." > (or (eq search-invisible t) > (not (isearch-range-invisible beg end)))) That explains how the predicate is used, not what it, itself, does. I'd propose something like this: Tests whether the current search hit is visible to Isearch. Returns non-nil if `search-invisible' is t or the text from BEG to END is visible to Isearch as determined by `isearch-range-invisible'. 2. The predicate name. A filter can be used either way: to allow to pass or to keep out. The Isearch filter allows whatever passes the predicate and disallows whatever does not pass it. Regardless of how a predicate might be used, its doc string and name should reflect the quality for which the predicate is true: `bluep' is true if its arg is blue, regardless of whether the predicate is used to filter blueness out or in. It is the quality of being isearch-visible that is tested here; the predicate returns true when the search hit is visible to Isearch. A name that reflects that is `isearch-visible-p'. Or, if we add the prefix `isearch-' systematically, `isearch-isearch-visible-p'. Or `isearch-visible-to-isearch-p'. (This is bound to be somewhat confusing whatever name we use for it, because of the notion of normally invisible text being visible to Isearch.) I'd probably go with just `isearch-visible-p'. 3. Similarly, I'd suggest `dired-isearch-filename-p' instead of `dired-isearch-filter-filenames'. Again, the predicate name should reflect what the predicate does, not how it might be used. In this case, it returns true for a search hit that is a file name. And the doc string: Tests whether the current search hit is a file name. Returns non-nil if the text from BEG to END is part of a visible file name. 4. Likewise, something like `Info-isearch-visible-body-text-p' instead of `Info-isearch-filter-predicate'. Name it after the kind of search hits that pass the test: body text (not header or tag-table text) that is visible. And the doc string: Tests whether the current search hit is a visible body text. Returns non-nil if the text from BEG to END is visible and is not in a header line or a tag table.