From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#1352: 23.0.60; isearch-success-function Date: Sat, 20 Dec 2008 14:33:46 -0800 Message-ID: <000801c962f3$05f00200$0200a8c0@us.oracle.com> References: <005c01c9477b$6adb8290$0200a8c0@us.oracle.com><87fxlrid7i.fsf@jurta.org><000e01c9484d$cdc82f20$0200a8c0@us.oracle.com> <87hc4yttax.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 1229813027 7723 80.91.229.12 (20 Dec 2008 22:43:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2008 22:43:47 +0000 (UTC) Cc: 1352@emacsbugs.donarmstrong.com To: "'Juri Linkov'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 20 23:44:52 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 1LEAYz-0000fd-Tv for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2008 23:44:50 +0100 Original-Received: from localhost ([127.0.0.1]:57690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEAXn-0001d4-Dn for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2008 17:43:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEAXd-0001YP-Sl for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2008 17:43:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEAXb-0001Wv-B7 for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2008 17:43:25 -0500 Original-Received: from [199.232.76.173] (port=51798 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEAXa-0001Wj-Tx for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2008 17:43:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43263) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEAXZ-0004DI-Fj for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2008 17:43:22 -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 mBKMhJVd031811; Sat, 20 Dec 2008 14:43:19 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBKMe4pC030652; Sat, 20 Dec 2008 14:40:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 20 Dec 2008 22:40:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1352 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1352-submit@emacsbugs.donarmstrong.com id=B1352.122981243129324 (code B ref 1352); Sat, 20 Dec 2008 22:40:03 +0000 Original-Received: (at 1352) by emacsbugs.donarmstrong.com; 20 Dec 2008 22:33:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from acsinet12.oracle.com (acsinet12.oracle.com [141.146.126.234]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBKMXlJZ029313 for <1352@emacsbugs.donarmstrong.com>; Sat, 20 Dec 2008 14:33:49 -0800 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBKMXGWE016954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 20 Dec 2008 22:33:17 GMT Original-Received: from acsmt703.oracle.com (acsmt703.oracle.com [141.146.40.81]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBKMY6VY017012; Sat, 20 Dec 2008 22:34:08 GMT Original-Received: from dradamslap1 (/141.144.160.73) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 20 Dec 2008 14:33:37 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acli7kn/o+Nv+dbST9K4cB+6xjZLYwAAN5xg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 In-Reply-To: <87hc4yttax.fsf@jurta.org> X-Source-IP: acsmt703.oracle.com [141.146.40.81] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.494D72C3.0049:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 20 Dec 2008 17:43:25 -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:23399 Archived-At: > Sorry for not responding to your last input after closing this bug. > I've carefully read you message as I saw it, but found no more > room for improvement. The final change was based on your original > report and approved by Stefan. I think further trying to achieve > the perfection will make this worse. > > In particular, your latest suggestions assume that Isearch is > a library of > functions with well-defined interfaces. This is only partially true. > Rather it is an editor's feature with a set of subfeatures. > So it would > be more practical to use uniform function names that contain > the same name > prefix for all related functions and variables. This will help better > recognizing the used subfeature in other features (like Dired > and Info), > helping mentally connect any related function names to it. > > In essence, what you suggest is using the prefix `isearch-visible' > instead of the current `isearch-filter' in the predicate names. > I see no preference for a property-based `visible' over an > action-based > `filter'. I think the word `visible' is more confusing since > it can be > misinterpreted as "visible to the user" instead of "visible > to isearch". > The existing name `isearch-range-invisible' has no such > problem because > it tests whether the search hit is visible to the user. So the name > `isearch-filter-invisible' connects two features and names together: > > 1. visible - "visible to the user" > 2. filter - "visible to isearch" Thanks for replying. It's a shame that the bug tracker doesn't take such followup mails into account. It apparently includes spam but omits messages in a bug thread after the bug is closed. ;-) Though I disagree in general, I see your argument, especially the possible confusion about visibility, which I also pointed out. I'm OK with the convention you chose, as long as we're consistent. Minor point: `Info-isearch-filter-predicate' does not respect your naming convention: "predicate" does not describe what the filter does. Using your convention, you might call it instead `Info-isearch-filter-body-text' or `Info-isearch-filter-visible-body-text' (which admittedly is a bit long). Another thing you might think about is the `-p' ending. Shouldn't we follow that convention for predicate names? Especially since the doc strings do not mention the return values. I think a predicate's doc string should state when it returns nil vs non-nil, but if you don't want to do that, then the name (`-p') would at least give a clue to the type. You might like to think of these predicates as action functions that perform filtering, but they are not - they have no side effects. They are just predicates that can be used by an action function to filter. It's the difference between `delete-if' (filtering action function) and a predicate passed to it. That distinction is the main point behind the doc strings and names I suggested. I'm OK with your approach, but you might want to finish off some of these loose ends (`-p'; name of the Info predicate; mention return values in doc strings). Thx - Drew