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

From: martin rudalics <[email-masked]>
Date: Thu, 06 Mar 2014 18:27:26 +0100

> Yes, I just have (for the first time, my bug report was about 24.3).
 > And 2 things:
 >
 > 1. I still get invalid buffer, Meaning:
 > - (setq other-window-scroll-buffer "*Completions*")
 > - C-M-v always scrolls Completions buffer as it should
 > - kill the completions buffer
 > - C-M-v -> "Invalid buffer'

I checked in another fix.  Try now with emacs -Q

(progn
   (with-current-buffer (get-buffer-create "*foo*")
     (dotimes (i 100)
       (insert "foo......\n\n....foo....\n\n......foo\n\n....foo...."))
     (goto-char (point-min)))
   (display-buffer "*foo*")
   (with-current-buffer (get-buffer-create "*bar*")
     (dotimes (i 100)
       (insert "bar......\n\n....bar....\n\n......bar\n\n....bar...."))
     (goto-char (point-min)))
   (set-window-buffer (split-window) "*bar*")
   (setq other-window-scroll-buffer (get-buffer "*foo*")))

and do C-M-v.  It should scroll *foo*'s window.  Next do

(kill-buffer "*foo*")

It should scroll *bar*'s window now.

 > 2. But most interestingly, on the latest trunk I cannot reproduce my
 > original issue anymore.
 > Contrary to 24.3 TAB for auto-complete seems to work just fine. I'll
 > investigate this more
 > to make sure it really is as it should and will report my findings.
 > If it's just a coincidence (my local work environment is playing tricks on
 > me) I'll
 > try to implement some fix this weekend.
 >
 > Were you ever able to reproduce this issue on trunk? If so, when?

Always.  On the attached screenshot you see the selected window at the
bottom right and the *Completions* window at the bottom left.  I can't
scroll the *Completions* window via C-M-v from the selected window.  So
I'm afraid you still have to look into this.

martin