Despite respectable variety of display-buffer-* functions some of them stand out with lack of flexibility, such as display-buffer-at-bottom or display-buffer-below-selected that exist in absence of reverse variant.
Assuming that decision was intentional, I would like to know what limitations are stopping these procedures from following the suit, or if there exists an easy way to create opposite implementation on the spot using existing inventory.
To make it more clear, here's my own attempt at making display-buffer-above-selected which only exposes the duplication that lays burden on those that seek to replace missing functionality.
window-in-directionit is either'above,'below,'left, or'right.(defun lawlist-display-buffer-above (buffer alist) (let ((window (cond ((get-buffer-window buffer (selected-frame)) (get-buffer-window buffer (selected-frame))) ((window-in-direction 'above) (window-in-direction 'above)) ((window-in-direction 'left) (window-in-direction 'left)) (t (selected-window))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) (select-window (get-buffer-window (buffer-name buffer))) ))You will need to adjust the conditions to suit your needs.M-x report-emacs-bug.(cond (x x) (y y) (z z))is the same as(cond (x) (y) (z))and also(or x y z). Thanks for the advice, I will make use of it.