all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Framework extending window functions for Follow Mode (etc.).
Date: Tue, 10 Nov 2015 14:29:18 -0800	[thread overview]
Message-ID: <m2io59zec5.fsf@Vulcan.attlocal.net> (raw)
In-Reply-To: <20151110131306.GD2626@acm.fritz.box> (Alan Mackenzie's message of "Tue, 10 Nov 2015 13:13:06 +0000")

>>>>> Alan Mackenzie <acm@muc.de> writes:

>> Adding your proposal to the Emacs Wiki Proposals page
>> (http://www.emacswiki.org/emacs/Proposals) would be a good way to liberate the
>> current state of your work from this lengthy discussion, so I can look at it
>> again with fresh eyes.

> Done.

Great proposal. I have an idea about this functionality I'd like to suggest.

Right now we have a set of functions with well-defined behavior. Under certain
conditions of use, those functions are too specific. You'd like to change the
functions' API so that some packages (follow-mode) can change what they mean,
and requiring other packages (isearch) to explicitly allow the override.

Maybe the problem is that we've turned object-orientation inside out. What we
really care about is not the set of functions, but the notion of what "current
window" means. It needs to be broader in scope when follow-mode is active, to
address the notion that multiple windows are being knit together, visually. It
has nothing to do with isearch, so ideally the change shouldn't affect it.

What if we just had `window-start-function', receiving the window as its
argument -- effectively having getter and setters on window objects. Could
follow-mode determine from the argument whether the window was involved in its
"group", and act accordingly? That would avoid API changes, is cheaper to do,
and no modes would have to change.

That is:

          window-start WIND
    calls (funcall window-start-function WIND)
    calls window-object-start WIND

So the current window-start is renamed to window-object-start (or some
internal sounding name), which is reached by indirecting through the variable
window-start-function.

I wonder, though, if such extensibility is worth the extra layer of
indirection. It feels a bit... special-cased and not very elegant, maybe? Do
we care enough about follow-mode to make a core change like this?

It could also be that we're looking too much at a specific solution, by
needing window-start to change its meaning in order to support correct
behavior by isearch. Is there a screencast anywhere, so I could see what
follow-mode with isearch looks like using your patch, and what it looks like
without the patch? Is anyone else using this code?

John



  parent reply	other threads:[~2015-11-10 22:29 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 19:29 Framework extending window functions for Follow Mode (etc.) Alan Mackenzie
2015-11-05 19:36 ` John Wiegley
2015-11-05 20:00   ` Alan Mackenzie
2015-11-07 13:07 ` Alan Mackenzie
2015-11-09 22:30   ` John Wiegley
2015-11-10 11:27     ` Alan Mackenzie
2015-11-10 13:13     ` Alan Mackenzie
2015-11-10 15:20       ` John Wiegley
2015-11-10 22:29       ` John Wiegley [this message]
2015-11-11  0:30         ` Alan Mackenzie
2015-11-11  0:34           ` John Wiegley
2015-11-11 16:15             ` Alan Mackenzie
2015-11-11 16:50               ` John Wiegley
2015-11-11 17:15                 ` Comms and building Emacs. [Re: Framework extending window functions for Follow Mode (etc.).] Alan Mackenzie
2015-11-11 17:58                   ` Alan Mackenzie
2015-11-07 13:26 ` Framework extending window functions for Follow Mode (etc.) martin rudalics
2015-11-07 13:57   ` Alan Mackenzie
2015-11-07 15:18     ` martin rudalics
2015-11-07 16:12       ` Alan Mackenzie
2015-11-07 17:07         ` martin rudalics
2015-11-07 18:55           ` Alan Mackenzie
2015-11-08  9:22             ` martin rudalics
2015-11-08 12:13               ` Alan Mackenzie
2015-11-08 18:10                 ` martin rudalics
2015-11-08 19:57                   ` Alan Mackenzie
2015-11-09  8:25                     ` martin rudalics
2015-11-09 17:03                       ` Alan Mackenzie
2015-11-07 17:54 ` Artur Malabarba
2015-11-07 18:24   ` Alan Mackenzie
2015-11-07 21:58     ` Juri Linkov
2015-11-08  0:29       ` Alan Mackenzie
2015-11-08  9:23         ` martin rudalics
2015-11-09  0:50         ` bug#17453: " Juri Linkov
2015-11-09  0:50         ` Juri Linkov
2015-11-09 15:41           ` bug#17453: " Alan Mackenzie
2015-11-09 15:41           ` Alan Mackenzie
2015-11-10  0:51             ` bug#17453: " Juri Linkov
2015-11-10 11:08               ` Alan Mackenzie
2015-11-11  0:12                 ` Juri Linkov
2015-11-11 16:19                   ` Alan Mackenzie
2015-11-12  0:52                     ` Juri Linkov
2015-11-12  8:22                       ` martin rudalics
2015-11-12 20:14                         ` Juri Linkov
2015-11-17 22:55                           ` Alan Mackenzie
2015-11-18  0:38                             ` Juri Linkov
2015-11-18 17:58                               ` Alan Mackenzie
2015-11-18 21:28                                 ` Alan Mackenzie
2015-11-19  0:45                                 ` Juri Linkov
2015-11-25 19:33                                   ` Alan Mackenzie
2015-11-26 23:03                                     ` Juri Linkov
2015-11-30 20:37                                       ` Alan Mackenzie
2015-12-01  0:07                                         ` Juri Linkov
2015-12-05 16:40                                           ` Alan Mackenzie
2015-12-05 23:06                                             ` Juri Linkov
2015-12-07 19:15                                               ` Alan Mackenzie
2015-12-08  0:42                                                 ` Juri Linkov
2015-11-12 22:15                       ` Alan Mackenzie

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

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

  git send-email \
    --in-reply-to=m2io59zec5.fsf@Vulcan.attlocal.net \
    --to=jwiegley@gmail.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.