[Top][All Lists]

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

Re: question about pop-to-buffer

From: martin rudalics
Subject: Re: question about pop-to-buffer
Date: Mon, 01 Oct 2012 17:48:46 +0200

> I want a function that return the window at the left of the selected one
> or nil if none.
> Same for above, right, below.

Then I suppose `window-in-direction' is the function you want.

> If a window is returned I use it, otherwise (nil) I use the selected
> one.
> Actually I use window-left/right and it works fine, but IIUC, I don't
> need the first checking:
> (and window (window-parent window) (window-next-sibling window)))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I can use directly window-next/prev-sibling, right?

Probably.  But note that in a one-window frame after C-x 3 evaluating
(window-next-sibling) gets you the window on the right.  If you now do
C-x 2 and then evaluate (window-next-sibling) you get the window below.


reply via email to

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