emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] scratch/follow e8937de: Replace GROUP argument in six


From: Alan Mackenzie
Subject: Re: [Emacs-diffs] scratch/follow e8937de: Replace GROUP argument in six window primitives by new functions.
Date: Thu, 17 Dec 2015 22:14:45 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Juri.

On Wed, Dec 16, 2015 at 02:39:08AM +0200, Juri Linkov wrote:
> > Any objections to me merging (or rebasing) this into the emacs-25
> > branch?  I think it's ready.

> Thanks, Alan.  I have only a small remark: the function name
> ‘recenter-group’ is too ambiguous.  Adding ‘window-group’
> somewhere inside its name would help to narrow its scope, e.g.
> ‘window-group-recenter’, or ‘recenter-window-group’, or
> ‘recenter-in-window-group’ by analogy with ‘pos-visible-in-window-group-p’.

I think it would have to be `recenter-window-group', but is
`recenter-group' really that ambiguous?  People have no problem with
`recenter', which, if anything, is even more ambiguous.

> And one question: are the functions follow-window-start,
> follow-set-window-start, etc. too specific to follow-mode,
> or it would be possible to generalize and move them to window.el
> leaving only ‘follow-all-followers’ as a follow-specific function?

An interesting idea - that would reduce the number of function variables
which Follow Mode needs to set.

In addition to the result of `follow-all-followers', Follow Mode
maintains a cache of the start and end points of each of its windows.
There is also a "cache-invalid" flag which is set in an
after-change-function and cleared by `follow-redisplay', the function
which synchronises the windows.

So, I think it would be possible to move some of the code from follow.el
to window.el, but the interface between them would necessarily be
thicker than just `follow-all-followers'.  It would have to include the
"cache-invalid" flag (probably encapsulated in a function call), and the
`follow-redisplay' function.  I'm not convinced that there would be any
great gain in abstraction.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]