Suppose I am editing a file in python-mode. If I start the Python interpreter using M-x run-python (or C-c C-p), the Python interpreter opens in a window (*Python*) in the bottom half of the frame. Is there a way to automatically set the height of the Python interpreter window? I don't want the interpreter to take up half the height of the frame. I want it to take up less than half of the frame height.


You can use shackle,

for example

(require 'shackle)
(setq shackle-rules '(("*Python*" :align bottom :size 0.25)))

Or if you use use-package

(use-package shackle
:ensure t
:defer t
:commands shackle-mode
(setq shackle-rules '(("*Python*" :align bottom :size 0.25))))

As you can see :align tells us where the buffer will appear and :size (between 0 and 1) lets you decide how much the frame it will take.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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