0

When using M x sql-postgres to launch the SQL mode window, emacs (as of 25.x) seems to be making smart choices about where the SQL run-time window will show. That is, it splits the viewport and shows the runtime at the bottom by default. But when I resize emacs to full screen (or enough width), SQL runtime shows on the right hand side. My question is:

Can one make the new SQL run time window to always appear at the bottom?

(I observed similar behavior for python and other programming modes when launching the runtime window. Sometimes, I just felt it easier that the runtime always pop up at the same location.)

1
  • Check the value of split-width-threshold. It sounds like you might want to set it higher than the width of a full screen Emacs.
    – Omar
    Jun 27, 2020 at 17:39

1 Answer 1

1

Try setting display-buffer-alist:

(add-to-list
 'display-buffer-alist
 '((lambda (buffer action)
     (with-current-buffer buffer
       (derived-mode-p 'sql-interactive-mode)))
   display-buffer-at-bottom))

Or use shackle with a rule like this

(setq shackle-rules '((sql-interactive-mode :select t :align 'below :size 0.25)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.