views:

44

answers:

1

I split windows to view two different parts of the selected buffer simultaneously. If I switch to another buffer in one of the windows and then switch back to the original buffer, I'll lose the previous window position---I'll see the same parts of the selected buffer in both windows. How can I restore window positions amongst buffer switches?

+3  A: 

I think if you use clone-indirect-buffer-other-window(bound to C-x 4 c by default) to obtain the two windows, the window positions will be preserved independently. See Indirect Buffers.

huaiyuan
That's exactly what I was looking for. Thanks. I've been using Emacs for several years now, but didn't know about this feature.
Török Gábor