new shell takes entire window

Bug #947756 reported by Andreas Roehler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Am 06.03.2012 06:02, schrieb Richard Stanton:
[ ... ]
> but if I open a shell using C-c !, the new python
> shell again replaces the entire window. I think it would be better to
> have the window split in both cases.
>
> Best,
>
> Richard
>

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.6
importance: Undecided → Medium
Revision history for this message
Andreas Roehler (a-roehler) wrote :

please re-open if not done for you

Changed in python-mode:
status: New → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote : RE: [Bug 947756] Re: new shell takes entire window

> please re-open if not done for you

The window now splits correctly, but the cursor is left in the new python shell window regardless of the setting of py-shell-switch-buffers-on-execute-p. I'm not sure what the appropriate behavior ought to be, but I have this variable set to nil, and rather expected the cursor to remain in the python script buffer when I opened a new python shell.

Changed in python-mode:
status: Fix Committed → In Progress
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 06.03.2012 21:26, schrieb Richard Stanton:
>> please re-open if not done for you
>
> The window now splits correctly, but the cursor is left in the new
> python shell window regardless of the setting of py-shell-switch-
> buffers-on-execute-p. I'm not sure what the appropriate behavior ought
> to be,

that was mentioned in Bug #932977

  -opening a shell should ignore py-shell-switch-buffers-on-execute-

  but I have this variable set to nil, and rather expected the
> cursor to remain in the python script buffer when I opened a new python
> shell.

probably it's more straight to meet your expectations, will change that.

Revision history for this message
Andreas Roehler (a-roehler) wrote :

this should do it:

    Committer: Andreas Roehler
    Date: 2012-03-07 07:57:40 UTC
    Revision ID: <email address hidden>

https://launchpad.net/bugs/947756
honor `py-shell-switch-buffers-on-execute-p', lp:947756

when `py-shell-switch-buffers-on-execute-p' is nil, M-x `py-shell' should not switch to shell, regardless of `interactive-p

Changed in python-mode:
status: In Progress → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote :

The window splits and it does not switch to the shell, but actually now the shell buffer isn't visible at all! When I press C-c !, the split window now displays two copies of the python script buffer.

Changed in python-mode:
status: Fix Committed → In Progress
Changed in python-mode:
status: In Progress → Fix Committed
Revision history for this message
Richard Stanton (a-stanton) wrote :

The splitting works now, but there's a (new?) problem. If I press C-c ! on my Windows machine, an ipython shell opens in a buffer called *c:/python27/Scripts/IPython.bat. If I remain in the python script buffer and now press C-c C-c, rather than sending the buffer through the ipython shell I just opened, it creates a second ipython buffer, called *IPython*, which replaces the first as the open buffer, and the python script is run there instead. I think this is a change from prior behavior, and doesn't really make sense to me - I'd rather the script just got run through the shell I first opened. I don't really want two ipython buffers.

Changed in python-mode:
status: Fix Committed → In Progress
Revision history for this message
Richard Stanton (a-stanton) wrote :

A quick follow-up to my previous post:

The command run in the buffer *c:/python27/Scripts/IPython.bat* is "c:/python27/Scripts/IPython.bat -i"
The command run in the buffer *IPython* is "ipython -i"

Since py-shell-name is set to "c:/python27/Scripts/ipython.bat", shouldn't this be used as the command in both cases?

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi Richard,

assume there is a bug still related to full-path py-shell-name, which seems not treated always as it should.

BTW please do me the favor not mixing several kind of issues into one.
Let's keep stuff as simple as possible.

Made a new report lp:953774

Cheers

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 13.03.2012 08:11, schrieb Richard Stanton:
> A quick follow-up to my previous post:
>
> The command run in the buffer *c:/python27/Scripts/IPython.bat* is "c:/python27/Scripts/IPython.bat -i"
> The command run in the buffer *IPython* is "ipython -i"
>
> Since py-shell-name is set to "c:/python27/Scripts/ipython.bat",
> shouldn't this be used as the command in both cases?
>

think that's worth a question in

https://answers.launchpad.net/python-mode

Revision history for this message
Andreas Roehler (a-roehler) wrote :

seems that title is done, close again

Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.