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: Sun, 21 Dec 2008 17:57:41 -0800 Message-ID: <000901c963d8$ad5081b0$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><000801c962f3$05f00200$0200a8c0@us.oracle.com> <87d4flukgn.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 1229912623 4957 80.91.229.12 (22 Dec 2008 02:23:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2008 02:23:43 +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 Mon Dec 22 03:24:48 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 1LEaTO-00009Q-6w for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Dec 2008 03:24:46 +0100 Original-Received: from localhost ([127.0.0.1]:34509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEaSB-00050n-BD for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Dec 2008 21:23:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEaS6-0004yz-MT for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2008 21:23:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEaS2-0004yn-7J for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2008 21:23:26 -0500 Original-Received: from [199.232.76.173] (port=59353 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEaS2-0004yk-4r for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2008 21:23:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48523) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEaS1-0002IY-Lh for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2008 21:23:21 -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 mBM2NJnO001440; Sun, 21 Dec 2008 18:23:19 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBM255NG029298; Sun, 21 Dec 2008 18:05:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 22 Dec 2008 02:05:05 +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.122991107527151 (code B ref 1352); Mon, 22 Dec 2008 02:05:05 +0000 Original-Received: (at 1352) by emacsbugs.donarmstrong.com; 22 Dec 2008 01:57:55 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBM1vq6N027145 for <1352@emacsbugs.donarmstrong.com>; Sun, 21 Dec 2008 17:57:53 -0800 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBM1wBmx018348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Dec 2008 01:58:14 GMT Original-Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBM1vkMq028639; Mon, 22 Dec 2008 01:57:47 GMT Original-Received: from dradamslap1 (/24.5.135.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Dec 2008 01:57:36 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87d4flukgn.fsf@jurta.org> Thread-Index: Aclj1d1fjjdQgu44QS+2U1zj4rsrDAAAW0Vw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt706.oracle.com [141.146.40.84] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.494EF411.012B:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 21 Dec 2008 21:23:26 -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:23425 Archived-At: > > 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). > > I agree that the current name is inappropriate. But your suggestions > are no better. First, there is no such a term as `body' in the Info > documentation, so it will cause questions what is a body > (answer: no header and not tag node). What is worse is that after > adding more conditions to this predicate we'll need to rename it. > I remember long ago you proposed to filter out header lines. Adding > such a condition for the header line would require renaming from a > name like `Info-isearch-filter-node-text' (if this function existed > at that time) to what you just proposed. In future when it makes > sense to add more conditions like skipping `* Menu' > where actually the tag `* Menu' is part of the node's body, the name > you proposed becomes wrong and needs to be renamed to a name like > `Info-isearch-filter-body-text-without-menu-tag', and so on. > > That's why I think we should find a general name for the > default predicate. I think it should be simply `Info-isearch-filter' > without any specifics. Agreed. > > Another thing you might think about is the `-p' ending. Shouldn't we > > follow that convention for predicate names? > > `-p' is usually added to short names that have no other indication > that they are predicates (e.g. `display-images-p'). I don't think that qualification is part of the convention. > But filter predicates already have a prefix `isearch-filter' > that indicates that a function is a filter. As I mentioned, in English, "filter" is ambiguous in this context. It can, as you intend it, mean a filter (noun), which could be interpreted as a predicate. (As I pointed out, though, even then it the name doesn't say what the predicate quality is - what's being filtered in or out.) But "filter" here can also mean the action (verb) to filter. These functions do not do any filtering on their own - they have no side effects. I think the suffix `-p' would help make clear that these are pure predicates, nothing more. And I think that's the Emacs convention (without your added qualification), but I could be mistaken about that. > Adding `-p' will make such names more ugly. Yes, but also clearer. > > 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. > > I like your doc strings, so instead of adding `-p' I'll fix > doc strings using your variants :-) > > BTW, I noticed that the name `isearch-filter-invisible' is logically > incorrect because the name should say whether the test is passed. > So I'll replace it with `isearch-filter-visible'. That's part of what I was saying in previous feedback I gave. The function name should, if possible, indicate whether it is filtering out or filtering in (e.g. keep-lines vs flush-lines). Anyway, thanks for looking at this again. - Drew