From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Mon, 2 Nov 2015 09:28:53 +0000 Message-ID: <20151102092853.GA11804@acm.fritz.box> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1446457582 14819 80.91.229.3 (2 Nov 2015 09:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2015 09:46:22 +0000 (UTC) Cc: 17453@debbugs.gnu.org, Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 10:46:11 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 1ZtBgm-0005pM-TX for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 10:46:09 +0100 Original-Received: from localhost ([::1]:41091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtBgl-00017Q-Vz for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2015 04:46:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtBPL-0004AV-FZ for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 04:28:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtBPG-0006YH-Cq for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 04:28:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtBPG-0006YD-3S for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 04:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtBPF-0003zB-Vo for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2015 04:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Nov 2015 09:28:01 +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.144645642915260 (code B ref 17453); Mon, 02 Nov 2015 09:28:01 +0000 Original-Received: (at 17453) by debbugs.gnu.org; 2 Nov 2015 09:27:09 +0000 Original-Received: from localhost ([127.0.0.1]:48499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtBOO-0003y2-V9 for submit@debbugs.gnu.org; Mon, 02 Nov 2015 04:27:09 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:22319) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtBOM-0003xs-TA for 17453@debbugs.gnu.org; Mon, 02 Nov 2015 04:27:07 -0500 Original-Received: (qmail 19931 invoked by uid 3782); 2 Nov 2015 09:27:05 -0000 Original-Received: from acm.muc.de (p5B147B71.dip0.t-ipconnect.de [91.20.123.113]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 02 Nov 2015 10:27:04 +0100 Original-Received: (qmail 12003 invoked by uid 1000); 2 Nov 2015 09:28:53 -0000 Content-Disposition: inline In-Reply-To: <87bnbddzpk.fsf@mail.linkov.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:108294 gmane.emacs.devel:193102 Archived-At: Hi, Juri. On Mon, Nov 02, 2015 at 02:14:47AM +0200, Juri Linkov wrote: > >> >>From another perspective, settings lazy-highlight-buffer to t > >> (implemented in bug#21092) and removing the current restriction of > >> (overlay-put ov 'window (selected-window)) will lazy-highlight matches > >> in all follow windows with no effort. > > I wasn't actually aware of that fix. > > There were three main problems my patch fixed: > > 1) Searching commands were restricted to a single follow window. This > > was caused by the lazy highlighting mechanism, as you say. > > 2) Lazy highlighting was only being done in a single window. > > 3) In scrolling commands, point was restricted to the singled window, > > rather than being able to move freely throughout all the windows. > IIUC, lazy highlighting is not a problem anymore, .... It is. With Follow Mode enabled, lazy highlighting is only occurring in the one window, not all of them. > .... so the remaining problem is how to switch windows when the next > search position happens to be in an adjacent window. That problem only shows itself when lazy-highlighting is enabled. This suggests that the solution is to fix the lazy-highliting code so as not to mess up the window arrangement. The other problem which still exists is that when isearch-allow-scroll is enabled, point cannot be scrolled into a neighbouring Follow Mode window. > Since there is no other core library that require so much changes to > adapt to follow-mode, .... I don't think we know this. > .... and there are already some mode-specific hooks in follow.el like > compilation-filter-hook, indicates that it's the responsibility of > follow.el to support isearch in follow-mode. There is nothing Follow Mode can do about isearch restricting its lazy-highlighting and bounds for scrolling to one single window. Isearch itself must be adapted for Follow Mode to work with it. > So I believe the right way to do this is like Artur presented in a > short patch, .... I don't actually understand that patch, I'll need to study the wierd/new constructs used in it, like `when-let'. However, I'm certain that that patch will not fix all the problems discussed in this post. One way or another, isearch MUST work with the window boundaries of the entire Follow Mode group. > .... and maybe it's possible to simplify it even more by using > isearch-update-post-hook with a follow-align-compilation-windows like > hook. I mean something like (add-hook 'isearch-update-post-hook > follow-align-isearch-windows t t) Hmm. I see that more as complicatifying rather than simplifying. The imperative, set out by Stefan 18 months ago, was to keep internal Follow Mode stuff out of isearch. -- Alan Mackenzie (Nuremberg, Germany).