How do I tell in emacs window orientation, e.g. if it was created by vertical or horizontal split? alternatively, how can I tell if window can be resized vertically or horizontally?
on a related note, is there a tutorial for programming emacs windows, e.g. size, buffers associated, properties, etc.?
Thank you very much.
was able to dig up current-window-configurationand set-window-configuration. I am still learning emacs, so I am not sure what to do with configuration object of how to modify.
I’m assuming you’re using the term ‘window’ to mean Emacs windows and not top level application windows (which in Emacs terminology are frames). If that’s what you’re looking for, zdav’s answer provides some useful information.
There are two functions
window-heightandwindow-width. You could trivially code up a function which tells you whether a window is taller than it is wider (implying that it was created with a vertical split) or vice-versa. Window sizes are changed usingshrink-windowandenlarge-window. They have arguments to be told the resize horizontally if that’s what you’re looking for. There are a few other functions likewindow-splittable-petc. which can help you with splitting windows.For the entire scoop on playing with windows, consult the manual.