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

user69818
  • 403
  • 6
  • 13
  • 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. – lawlist Jan 05 '14 at 06:04
  • 1
    @lawlist That's a typo. Read ...on-execute-function - a customizable variable of python-mode.el. – Andreas Röhler Jan 05 '14 at 08:29
  • @AndreasRöhler Ah, yes you are right. It should have been "execute" not "execution". Thanks. – user69818 Jan 05 '14 at 09:48
  • How do you split vertically? – qed Jun 09 '14 at 11:06

1 Answers1

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

Andreas Röhler
  • 4,804
  • 14
  • 18