From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Gregor Schmid Newsgroups: gmane.emacs.bugs Subject: Isearch setting of inhibit-point-motion-hooks too inflexible Date: Sun, 27 Oct 2002 12:45:50 +0100 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <15803.53742.404653.98167@gs.qfs.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035716070 4641 80.91.224.249 (27 Oct 2002 10:54:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2002 10:54:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 185l3s-0001Cj-00 for ; Sun, 27 Oct 2002 11:54:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 185l3f-0007vk-00; Sun, 27 Oct 2002 05:54:15 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 185l35-00071C-00 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2002 05:53:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 185l2w-0006aE-00 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2002 05:53:35 -0500 Original-Received: from pop.wor.net ([212.11.225.6] helo=ford.wor.net) by monty-python.gnu.org with esmtp (Exim 4.10) id 185l2v-0006Sb-00 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2002 05:53:30 -0500 Original-Received: from qfs.de (oolon.wor.net [212.11.225.81]) by ford.wor.net (8.11.6/8.11.6/WorNet) with ESMTP id g9RArRX29922 for ; Sun, 27 Oct 2002 11:53:27 +0100 X-Envelope-To: Original-Received: from [212.11.225.81] (HELO gs.qfs.de) by qfs.de (CommuniGate Pro SMTP 3.5.9) with ESMTP id 90266 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2002 11:53:27 +0100 Original-Received: (from gs@localhost) by gs.qfs.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id g9RBjoS02472; Sun, 27 Oct 2002 12:45:50 +0100 Original-To: bug-gnu-emacs@gnu.org X-Mailer: VM 6.96 under Emacs 21.2.1 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3767 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3767 Dear emacs maintainers, since emacs version 20 isearch has had new capabilities for optionally matching invisible text, plus additional features that work well with outline and hideout. This mechanism requires setting `inhibit-point-motion-hooks' to the value of `search-invisible' in `isearch-search'. However, I'm using a homegrown folding mode that makes use of the 'invisible text property and depends on the point motion hooks _not_ being inhibited. It works well with isearch, provided that `search-invisible' is t and `inhibit-point-motion-hooks' is nil during `isearch-search'. With the current implementation of `isearch-search' this is not possible. The following patch against emacs 21.2 will add a new variable `isearch-inhibit-point-motion-hooks' and change `isearch-search' to make use of it. Comments should be self-explanatory. The default settings will maintain the current behaviour. Best regards, Greg ----------ChangeLog----------------------------------------- 2002-10-27 Gregor Schmid * isearch.el (isearch-inhibit-point-motion-hooks): New variable (isearch-search): Make use of isearch-inhibit-point-motion-hooks ----------Patch--------------------------------------------- cd /usr/local/share/emacs/21.2/lisp/ diff -c -p -w /usr/local/share/emacs/21.2/lisp/isearch.el\~ /usr/local/share/emacs/21.2/lisp/isearch.el *** /usr/local/share/emacs/21.2/lisp/isearch.el~ Thu Oct 18 12:06:56 2001 --- /usr/local/share/emacs/21.2/lisp/isearch.el Sun Oct 27 12:05:37 2002 *************** Ordinarily the text becomes invisible ag *** 186,191 **** --- 186,199 ---- :type 'boolean :group 'isearch) + (defvar isearch-inhibit-point-motion-hooks 'search-invisible + "If t `inhibit-point-motion-hooks' is set during search. + nil means don't set `inhibit-point-motion-hooks'. + For any other value (the default) `inhibit-point-motion-hooks' is set to + the value of `search-invisible'. + This variable only needs to be changed for custom modes that use + invisible text and depend on point motion hooks for operation.") + (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") *************** If there is no completion possible, say *** 1577,1583 **** (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp))) (condition-case lossage ! (let ((inhibit-point-motion-hooks search-invisible) (inhibit-quit nil) (case-fold-search isearch-case-fold-search) (retry t)) --- 1585,1597 ---- (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp))) (condition-case lossage ! (let ((inhibit-point-motion-hooks ! (cond ! ((null isearch-inhibit-point-motion-hooks) ! nil) ! ((eq isearch-inhibit-point-motion-hooks t) ! t) ! (t search-invisible))) (inhibit-quit nil) (case-fold-search isearch-case-fold-search) (retry t)) Diff finished at Sun Oct 27 12:20:01 ------------------------------------------------------------