From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode. Date: Sun, 1 Nov 2015 19:46:12 +0000 Message-ID: References: <20140509224458.GA4205@acm.acm> <20151029232302.GB3812@acm.fritz.box> <20151031233225.GD1853@acm.fritz.box> <20151101135253.GB2768@acm.fritz.box> <83k2q1y893.fsf@gnu.org> <20151101182733.GE2768@acm.fritz.box> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1446407181 31700 80.91.229.3 (1 Nov 2015 19:46:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Nov 2015 19:46:21 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 01 20:46:20 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zsya4-0001f5-FH for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 20:46:20 +0100 Original-Received: from localhost ([::1]:38607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsya3-0007BN-LA for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 14:46:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsyZz-0007BH-Nj for emacs-devel@gnu.org; Sun, 01 Nov 2015 14:46:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsyZy-0004ml-RB for emacs-devel@gnu.org; Sun, 01 Nov 2015 14:46:15 -0500 Original-Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:34900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsyZx-0004mP-9B; Sun, 01 Nov 2015 14:46:13 -0500 Original-Received: by lbbes7 with SMTP id es7so75655058lbb.2; Sun, 01 Nov 2015 11:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Ab7V6BUumvFHL6ZCq9KtH8a1/TDA0jGelyrFgx2bD9Y=; b=SnbbJqKVBtDwD9/kbAWuC7ujlisG+kWzuSHDMp7TceMYShtgHFTvqDVOuyYQqcPeLw qYcA+H0ZXTz6zro+3s/DBFOVuKNTa4AVc+OOhG3sdAVn75aNl7d70OnapEVKuLAJT5yj ZAFSfR3HwiownyewisHfdAibXoiF/fMh1xlV/Jv8ZcjZH1GKcwjSea0cMPgzE6kcbzhi HG9mmsYVnpOxgBsBDoh4h8okhq8p7s6v3XhhmuF+ifb8mg02oVP3GIWK2yxRDB6CpAiE KgFx+K7LFvvUAZqUGi+KtOgpsbXK/9OSCqTktbRVG3P40Fbzoms2+t90BQfDmscax7Yb unrA== X-Received: by 10.112.235.65 with SMTP id uk1mr8107399lbc.118.1446407172546; Sun, 01 Nov 2015 11:46:12 -0800 (PST) Original-Received: by 10.112.63.71 with HTTP; Sun, 1 Nov 2015 11:46:12 -0800 (PST) In-Reply-To: <20151101182733.GE2768@acm.fritz.box> X-Google-Sender-Auth: 6jIcviQaULDsk3sk2N8enTo1qzo X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193077 Archived-At: >> How is this "not having isearch know about Follow mode"? I see that >> knowledge on every step of this patch, whenever you call the new >> functions. > > It has no knowledge of the internals of Follow Mode. window*-start is > merely an abstract interface, currently with two implementations > associated with it, a default one for normal windows and a Follow Mode > one. [...] > I'm not sure I really understand your question. At several points in > isearch, functions need to be called which eventually end up calling > Follow Mode functions. This is not about the window*- functions. There are several places where your patch checks whether follow-mode is on, turns it off, or turns it back on. I think this is still too attached to follow mode. Isearch really shouldn't worry about disabling or enabling other libraries. The idiomatic Emacs way to do this is to add hooks to isearch, and run them at useful places. Then packages like follow-mode can add stuff to these hooks and do what they want (like, enable/disable itself).