From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)' Date: Thu, 27 Jun 2013 00:31:13 +0300 Organization: JURTA Message-ID: <87vc50pmzw.fsf@mail.jurta.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372283290 5910 80.91.229.3 (26 Jun 2013 21:48:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 21:48:10 +0000 (UTC) Cc: 14714@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 26 23:48:10 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrxZR-0006ZF-Bh for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2013 23:48:09 +0200 Original-Received: from localhost ([::1]:41796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrxZQ-0001FE-Os for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2013 17:48:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrxZM-0001C9-FZ for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2013 17:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrxZL-0005c6-1W for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2013 17:48:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrxZK-0005bx-V7 for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2013 17:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UrxZK-0003kh-Av for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2013 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2013 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14714 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14714-submit@debbugs.gnu.org id=B14714.137228325614378 (code B ref 14714); Wed, 26 Jun 2013 21:48:02 +0000 Original-Received: (at 14714) by debbugs.gnu.org; 26 Jun 2013 21:47:36 +0000 Original-Received: from localhost ([127.0.0.1]:43726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrxYu-0003jq-6x for submit@debbugs.gnu.org; Wed, 26 Jun 2013 17:47:36 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:51605 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrxYq-0003jY-UU for 14714@debbugs.gnu.org; Wed, 26 Jun 2013 17:47:33 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 01B05258B9E91C; Wed, 26 Jun 2013 14:47:30 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 25 Jun 2013 14:46:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75619 Archived-At: > Actually, shouldn't we revert this change and use > (add-function :before-while ...) on isearch-filter-predicate instead? Currently I'm exploring possibilities of using `:before-while' instead of `run-hook-with-args-until-failure'. IIUC, it can be used to replace hooks, so that for example, when someone wants to put an additional function on `find-file', it's possible to use `add-function' instead of appending that function to `find-file-hook' (or `find-file-hooks' that is an obsolete alias of `find-file-hook'). But in case of `isearch-filter-predicate', I don't understand where and on which function to put additional predicate functions. `isearch-filter-predicate' is a variable, not a function, so it can't be used for the PLACE argument of `add-function'. What I'm trying is: (defvar isearch-filter-predicate nil) (add-function :before-while isearch-filter-predicate (lambda (b e) (message "b"))) (add-function :after-while isearch-filter-predicate (lambda (b e) (message "a"))) (funcall isearch-filter-predicate 1 2) This fails with the error: (void-function nil)