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#17453: Isearch doesn't work properly with Follow Mode. Date: Tue, 03 Nov 2015 01:28:40 +0200 Organization: LINKOV.NET Message-ID: <87d1vs56c7.fsf__26232.5113676072$1446507025$gmane$org@mail.linkov.net> References: <20140509224458.GA4205@acm.acm> <20151029232302.GB3812@acm.fritz.box> <87h9l6627a.fsf@mail.linkov.net> <20151031235651.GE1853@acm.fritz.box> <87bnbddzpk.fsf@mail.linkov.net> <20151102092853.GA11804@acm.fritz.box> <20151102123512.GB11804@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446507025 20546 80.91.229.3 (2 Nov 2015 23:30:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 23:30:25 +0000 (UTC) Cc: Alan Mackenzie , 17453@debbugs.gnu.org, Stefan Monnier , emacs-devel To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 00:30:14 2015 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 1ZtOYI-0000E7-29 for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 00:30:14 +0100 Original-Received: from localhost ([::1]:44746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtOYH-0006KN-9C for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 18:30:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtOYD-0006KB-SL for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:30:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtOY9-000581-Ri for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:30:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtOY9-00057g-PI for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:30:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtOY8-0008O4-RD for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 18:30:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Nov 2015 23:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17453 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17453-submit@debbugs.gnu.org id=B17453.144650697232145 (code B ref 17453); Mon, 02 Nov 2015 23:30:04 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 2 Nov 2015 23:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:50137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtOXb-0008MN-PL for submit@debbugs.gnu.org; Mon, 02 Nov 2015 18:29:32 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:49106 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtOXI-0008Lg-33 for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 18:29:30 -0500 Original-Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 9B04D103006C; Mon, 2 Nov 2015 15:29:10 -0800 (PST) Original-Received: from localhost.linkov.net (62.65.227.66.cable.starman.ee [62.65.227.66]) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPA id 2CFF51030063; Mon, 2 Nov 2015 15:29:08 -0800 (PST) In-Reply-To: (Artur Malabarba's message of "Mon, 2 Nov 2015 14:18:59 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.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: 208.118.235.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:108328 Archived-At: > +(defvar isearch-lazy-highlight-ongoing-search nil > + "Dynamically bound to t in `isearch-lazy-highlight-search'. > +This can be used by `isearch-search-fun-function' to detect > +whether its return value is being run for a proper user search or > +a lazy highlight search.") > + > (defun isearch-lazy-highlight-search () > "Search ahead for the next or previous match, for lazy highlighting. > Attempt to do the search exactly the way the pending Isearch would." > (condition-case nil > (let ((case-fold-search isearch-lazy-highlight-case-fold-search) > + (isearch-lazy-highlight-ongoing-search t) > (isearch-regexp isearch-lazy-highlight-regexp) > (isearch-regexp-function isearch-lazy-highlight-regexp-function) > (isearch-lax-whitespace Please note that this is unnecessary because all functions that override isearch-search-fun-function use its =E2=80=98bounds=E2=80=99 arg to detec= t whether it's called from isearch-search or isearch-lazy-highlight-search with the valu= e either nil or non-nil correspondingly. > @@ -279,8 +279,13 @@ isearch-lazy-highlight > "Controls the lazy-highlighting during incremental search. > When non-nil, all text in the buffer matching the current search > string is highlighted lazily (see `lazy-highlight-initial-delay' > -and `lazy-highlight-interval')." > - :type 'boolean > +and `lazy-highlight-interval'). > + > +When multiple windows display the current buffer, the > +highlighting is displayed only on the selected window, unless > +this variable is set to the symbol `all-windows'." > + :type '(choice boolean > + (const :tag "On, and applied to all windows" all-wind= ows)) > :group 'lazy-highlight > :group 'isearch) > =20 > @@ -3162,7 +3167,8 @@ isearch-lazy-highlight-update > ;; but lower than isearch main overlay's 1001 > (overlay-put ov 'priority 1000) > (overlay-put ov 'face lazy-highlight-face) > - (overlay-put ov 'window (selected-window)))) > + (unless (eq isearch-lazy-highlight 'all-wind= ows) > + (overlay-put ov 'window (selected-window))= ))) This is a good option that follow-mode could set (or users to customize).