Subject: Re: bug#14676: 24.3.50; winner doesn't immediately notice windows created by server

From: Michael Heerdegen <[email-masked]>
Date: Thu, 20 Jun 2013 23:54:25 +0200

Stefan Monnier <[email-masked]> writes:

> >> (add-hook 'server-switch-hook 'winner-save-old-configurations)
> >> fixes the problem for me.  Should we do something like that in the
> >> definition of `winner-mode'?
> > I don't much like this solution.
>
> I think the better solution is to move the (run-hooks
> 'post-command-hook) in server.el.  Currently it's run at the end of
> server-visit-files which I think is simply too early.  It should be run
> at the end of server-execute instead.  And that should fix your problem
> as well since winner-mode hooks itself on post-command-hook.

That sounds reasonable.  I tested your approach quickly, and it worked.

Michael.