[Top][All Lists]

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

Re: question about pop-to-buffer

From: Thierry Volpiatto
Subject: Re: question about pop-to-buffer
Date: Sun, 30 Sep 2012 20:37:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> Also, I have noticed that window-right/left can also handle vertical
>> splitting (I.e I was looking for something like window-above/bottom and
>> I discover that window-right/left do this).
>> Maybe that can be documented somewhere?
> No, and I probably should have called them window--right and
> window--left, but I faintly recall having called them from somewhere
> outside window.el.  These functions are only useful to avoid writing
>   (and window (window-parent window) (window-next-sibling window)))
> which is needed for technical reasons because usually the minibuffer
> window is the "sibling" of the frame's root window and the window tree
> functions should not work on the minibuffer window.  Anyone interested
> finds the rationale in the comment preceding `window-right'.
> The functions you are interested in are either
> `window-next-sibling' and `window-prev-sibling' plus `window-combined-p'
>   where the latter is needed to find out whether any such sibling is
>   horizontally or vertically aligned - an information `window-right' and
>   `window-left' won't give you anyway, or
> `window-in-direction'.
> If you tell me more precisely how you want to use them, I can provide
> more information.
I want a function that return the window at the left of the selected one
or nil if none.
Same for above, right, below.

If a window is returned I use it, otherwise (nil) I use the selected

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?

Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

reply via email to

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