~tcaswell-gmail/python-mode/window_fix

  • Committer: Thomas Caswell
  • Date: 2012-12-22 21:06:14 UTC
  • Revision ID: tcaswell@gmail.com-20121222210614-789f0ao82a4eilcb
- Re-wrote py-shell-manage-windows
- added helper function
- added custom switch py-on-execute-buffer-management-p
- removed (delete-other-windows) from code

I interpret the new switch as meaning 'try to make sure that the output buffer is visible after the code runs' ( py-on-execute-buffer-management-p )

If buffer management is disabled then everything else is ignored and emacs will not change anything about your buffers/windows.

If buffer management is enabled, then I interpret the switch flag as meaning 'make sure the current buffer/window after execution is the output buffer' and the split flag as 'if needed, emacs may create a new window by splitting the code buffer using the specified method'

This leads to the following logic

I) If there is only one window and splitting is disabled, then
    If switching is on, then we need to set the buffer in that window to the output buffer.
    If switching is off, nothing should change. (this is the one branch where emacs fails to make the output buffer visible)

II) if splitting is enabled and output buffer is not visible
IIa) if the number of windows is less than the maximum
  we split the code window, put the output in the new window, jump to III)
IIb) if the number of windows is not less than the maximum
  we select the least recently used window and set it to display the output buffer

III) if output buffer is visible
    we switch to it depending on if switching is enabled
Filename Latest Rev Last Changed Committer Comment Size
..
autopair 1065 11 years ago Andreas Roehler autopair moved autopair/autopair.el Diff
completion 476 12 years ago Andreas Roehler release-6.0.1 Diff
devel 803 12 years ago Andreas Roehler renamed: tools/ => devel/ make visible these file Diff
doc 723 12 years ago Andreas Roehler several docstrings normalised Commands listed in Diff
extensions 1052 11 years ago Andreas Roehler `py-toggle-smart-operator', menu PyTools Diff
test 476 12 years ago Andreas Roehler release-6.0.1 Diff
website 296 18 years ago montanaro actually... not needed. :-/ Diff
.bzrignore 1140 11 years ago Andreas Roehler Urs Fleisch 2012-11-11 Moved Pymacs based completi 132 bytes Diff Download File
byte-compile-directory.sh 1130 11 years ago Andreas Roehler inconvinient-py-shell-switch-buffers-on-execute, l 1.4 KB Diff Download File
CREDITS 1161 11 years ago Andreas Roehler wrong-indentation-after-return-or-pass-keyword, lp 3.1 KB Diff Download File
EXTENSIONS 864 12 years ago Andreas Roehler column-marker.el merged file EXTENSIONS gives som 1.3 KB Diff Download File
INSTALL 876 12 years ago Andreas Roehler IPYTHON readme added, lp:835151 543 bytes Diff Download File
IPYTHON 876 12 years ago Andreas Roehler IPYTHON readme added, lp:835151 367 bytes Diff Download File
LICENSE 408 13 years ago Andreas Roehler LICENSE text GPLv3 added 34.3 KB Diff Download File
NEWS 1164 11 years ago Andreas Roehler python-mode.el comments start a new line, lp:10928 20 KB Diff Download File
File pyflakespep8.py 987 11 years ago Andreas Roehler Better Python Flymake Integration in Emacs, lp:100 998 bytes Diff Download File
python-mode.el 1165 11 years ago Thomas Caswell - Re-wrote py-shell-manage-windows - added helper 719 KB Diff Download File
README 1162 11 years ago Andreas Roehler temporary files remain when python raises exceptio 3.5 KB Diff Download File
README-AUTOPAIR.org 990 11 years ago Andreas Roehler autopair-mode delivered, lp:1003263 Credits to 7 KB Diff Download File
README.DEVEL 1095 11 years ago Andreas Roehler stalls emacs probably due to syntax highlighting, 680 bytes Diff Download File
ToDo.org 1157 11 years ago Andreas Roehler Void fun smart-operator-\, lp:1086242, fixed 305 bytes Diff Download File