I've lost all my changes in the edited file because of the wrong input arguments for window-in-direction. Here's is what happened: I forgot that the minibuffer was activated, and in the buffer called the command windmove-display-down. But it displayed the text buffer in the minibuffer window. Then I noticed this and exited the minibuffer. But exiting the minibuffer wiped off the contents of the minibuffer window, i.e. cleared the text buffer that was displayed in the minibuffer window. This is because currently windmove-display-in-direction doesn't send the arg 'nomini' to window-in-direction. And it can't send this arg, because currently window-in-direction ignores the value 'nomini', and doesn't send its MINIBUF arg to walk-window-tree unchanged. So here is a patch to avoid such accidents. It sends MINIBUF arg from window-in-direction to MINIBUF arg of walk-window-tree: