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: martin rudalics
Subject: bug#20100: 24.4.91; Can't scroll a window while in minibuffer
Date: Sat, 14 Mar 2015 09:17:04 +0100

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

It's a trap.  Commands that implicitly work on the selected window
should not be used programmatically.  Such commands are `recenter',
`enlarge-window', `shrink-window', `split-window-below' and
`split-window-right'.  When used in applications the only way to make
them behave is to wrap them in `with-selected-window' :-(

There are also more specialized commands like `recenter-top-bottom' or
`move-to-window-line-top-bottom' whose doc-strings don't explain what
they do.  Never use them in programs!

martin, closing this bug





reply via email to

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