Subject: bug#16909: 24.3; scrolling *Completions* window with tab sometimes chooses a wrong window

From: Lukasz Pawelczyk <[email-masked]>
Date: Wed, 5 Mar 2014 00:22:35 +0100

On 1 Mar 2014, at 20:18, martin rudalics <[email-masked]> wrote:

> > How is this supposed to work?
> > The problem is _during_ the Completions buffer is shown, when we're hitting
> > Tab, not when we're done. Besides its window is usually closed
> > automatically.
> 
> We have to detect the moment when the window is closed automatically
> anyway.  At that time we can either kill the buffer or reset
> `other-window-scroll-buffer’.

I’m still not sure that even using this variable is a wise idea. It might be used
by a user to configure his things. A simple custom function that will always scroll
*Completions* window seems like a better choice. You can always scroll
by buffer name. No need to force the usage of scroll-other-window function.

> > Killing the buffer won't make the scroll-other-window work
> > the usuall way.
> 
> How comes?  Ahh... I see.  If `other-window-scroll-buffer' is non-nil
> and the buffer was killed in the meantime `display-buffer' throws an
> arg out of range error.  That's silly ... should be fixed now.

I meant that if you only kill the buffer (after we used autocomplete) and
then user will scroll-other-window (for whatever reason) it won’t behave as
if its value is nil. We’d have to make it nil as well (as you mentioned now).

> > This would work I imagine. But don't do this in general when the
> > Completions buffer is shown, but only when we use autocomplete
> > functionality with Tab _and_ the buffer is shown.
> 
> Could you try doing that?  I have no idea where to start.

If I had an idea where to start I would have sent a patch instead of reporting a bug :-/

-- 
Regards,
Havner