unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 17453@debbugs.gnu.org, emacs-devel@gnu.org
Subject: Re: bug#17453: Isearch doesn't work properly with Follow Mode.
Date: Thu, 29 Oct 2015 23:23:02 +0000	[thread overview]
Message-ID: <20151029232302.GB3812@acm.fritz.box> (raw)
In-Reply-To: <jwva9aqbcl9.fsf-monnier+emacsbugs@gnu.org>

Hello, Stefan, hello, Emacs.

Resuming a conversation from a year and a half ago, in it I had proposed
a patch which made isearch work properly in a Follow Mode set of
windows.  In the end, you rejected my patch (in effect), because...

On Fri, May 09, 2014 at 10:40:07PM -0400, Stefan Monnier wrote:

> I must say I really dislike this hard-coding of follow-mode support in
> isearch.el.  Isearch should not know so much about follow-mode and
> follow-mode should not know so much about Isearch either.

> IOW we should try harder to come up with more general hooks.

That irritated me at the time, but you were right - putting Follow Mode
support directly into isearch would not have been a good idea.

I've recently started working on the bug again, and although it's not
your job anymore, I'd still appreciate you giving me some feedback on my
new approach.

What I propose is that several functions which operate on windows have
extended versions which operate on @dfn{groups of windows}, this meaning
(for the moment) Follow Mode groups of windows.  These new functions are
flexible enough to work with methods other than Follow Mode of grouping
windows, should such ever be implemented.

The new functions are window*-start, window*-end, set-window*-start,
recenter*, pos-visible-in-window*-p, move-to-window*-line, and sit*-for.

window*-start returns the window-start of the _first_ window in the
group, window*-end returns the window-end of the _last_ window in the
group, and so on, all these functions doing the Right Thing for a group
of windows.  sit*-for exists, because Follow Mode needs a chance to
resynchronise its windows before redisplay happens.

If Follow Mode is not enabled, all the above functions do the Right
Thing on the single window.

In addition, there is a function window*-windows, which returns an
ordered list of the windows involved (or a list of the single window
when F.M. is not active).

I have a trial implementation of the above, and a trial adaptation of
isearch.el which uses it.  It works.

What do you think?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



       reply	other threads:[~2015-10-29 23:23 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140509224458.GA4205@acm.acm>
     [not found] ` <jwva9aqbcl9.fsf-monnier+emacsbugs@gnu.org>
2015-10-29 23:23   ` Alan Mackenzie [this message]
2015-10-31 22:35     ` bug#17453: Isearch doesn't work properly with Follow Mode John Wiegley
2015-10-31 23:25       ` Alan Mackenzie
2015-10-31 23:41         ` John Wiegley
2015-11-01 11:59           ` Alan Mackenzie
2015-11-01  0:17       ` Drew Adams
2015-10-31 23:13     ` Artur Malabarba
2015-10-31 23:32       ` Alan Mackenzie
2015-11-01 12:20         ` Artur Malabarba
2015-11-01 12:23           ` Artur Malabarba
2015-11-01 13:52             ` Alan Mackenzie
2015-11-01 16:50               ` Eli Zaretskii
2015-11-01 18:27                 ` Alan Mackenzie
2015-11-01 19:46                   ` Artur Malabarba
2015-11-01 20:15                     ` Alan Mackenzie
2015-11-01 21:37                       ` Artur Malabarba
2015-11-01 20:42                     ` Artur Malabarba
2015-11-01 20:54                   ` Eli Zaretskii
2015-11-01 22:19                     ` Alan Mackenzie
2015-10-31 23:35     ` Juri Linkov
2015-10-31 23:56       ` Alan Mackenzie
2015-11-02  0:14         ` Juri Linkov
2015-11-02  3:35           ` Eli Zaretskii
2015-11-02  9:28           ` Alan Mackenzie
2015-11-02 11:53             ` Artur Malabarba
2015-11-02 12:14               ` Artur Malabarba
2015-11-02 12:39                 ` Alan Mackenzie
2015-11-02 12:35               ` Alan Mackenzie
2015-11-02 13:10                 ` Artur Malabarba
2015-11-02 14:18                   ` Artur Malabarba
2015-11-02 15:44                     ` Alan Mackenzie
2015-11-02 23:22                       ` Juri Linkov
2015-11-03 12:31                         ` Alan Mackenzie
2015-11-02 23:28                     ` Juri Linkov
2015-11-02 23:33             ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151029232302.GB3812@acm.fritz.box \
    --to=acm@muc.de \
    --cc=17453@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).