3

I set split-width-threshold to nil, so on execution the python shell will appear in a split window below. However, the shell always occupies half of the frame. Is it possible to adjust the size (automatically on execution)?

The py-split-windows-on-execute-function seems to only accept two options (split-window-vertically and split-window-horizontally).

Emacs version: 24.3

4
  • Your thread is the only webpage in the entire world of Google search that has the term py-split-windows-on-execution-function. Are you sure it is spelled correctly? I didn't find it in the 01/01/2014 Emacs Trunk source either. Commented Jan 5, 2014 at 6:04
  • 1
    @lawlist That's a typo. Read ...on-execute-function - a customizable variable of python-mode.el. Commented Jan 5, 2014 at 8:29
  • @AndreasRöhler Ah, yes you are right. It should have been "execute" not "execution". Thanks. Commented Jan 5, 2014 at 9:48
  • How do you split vertically? Commented Jun 9, 2014 at 11:06

1 Answer 1

2

Thanks, IMO that's a reasonable request. It's here now:

https://bugs.launchpad.net/python-mode/+bug/1266169

After further reflection, the following result: Shrinking the output-buffer only has effect for a very limited number of events. Afterward the buffer is filled and window-size is half-way like the current default.

From this don't see it's justified to hard-code it.

Also there is a solution, which seems to come nearby the desired behavior:

  M-x python RET

switch to py-shell resp. output-buffer and

M-x shrink-window-if-larger-than-buffer RET, it's on C-x -

Than M-x customize-variable RET py-keep-windows-configuration RET

to `t' or 'force

The following run should keep the window small, resp. enlarged.

To make customization easier, extended the menu: Python/Customize/Switches/Display/py-keep-windows-configuration

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.