bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20100: 24.4.91; Can't scroll a window while in minibuffer


From: Oleh Krehel
Subject: bug#20100: 24.4.91; Can't scroll a window while in minibuffer
Date: Fri, 13 Mar 2015 19:41:38 +0100

> It apparently is _not_ selected (at least not in your snippet).  With
> emacs -Q evaluate the following code:
>
> (let ((buffer (get-buffer-create "*buffer*"))
>       (window (selected-window))
>       (line 0))
>   (set-window-buffer nil buffer)
>   (with-current-buffer buffer
>     (while (< line 100)
>       (insert (format "%02d\n" line))
>       (setq line (1+ line))))
>
>   (with-selected-window (minibuffer-window)
>     (with-selected-window window
>       (goto-char (point-min))
>       (forward-line 25)
>       (recenter))
>     (insert "This is your minibuffer window!")
>     (sit-for 5)))
>
> Can you see the difference?

Thanks, using `with-selected-window' instead of `with-current-buffer'
solved it. I thought that they should be equivalent. Apparently they are not.

So the problem is solved, thanks again.

Oleh





reply via email to

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