Script buffer appears instead of python shell buffer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| python-mode.el |
Medium
|
Andreas Roehler |
Bug Description
Using today's (3/16) current version of python-mode under Windows (Emacs 24.0.94), things are getting very close to working properly! Just a minor buffer visibility problem. E.g.,
1) Open run.py.
2) Press C-c !, the window splits and an ipython buffer opens as desired
3) In the script buffer, press C-c C-c.
The good: The script runs properly, and inside the same ipython buffer opened in step 2.
The bad: The ipython buffer disappears from view, and the split window now displays two copies of the original python script.
Andreas Roehler (a-roehler) wrote : Re: [Bug 957561] [NEW] Script buffer appears instead of python shell buffer | #1 |
Changed in python-mode: | |
importance: | Undecided → Medium |
assignee: | nobody → Andreas Roehler (a-roehler) |
milestone: | none → 6.0.6 |
Richard Stanton (a-stanton) wrote : RE: [Bug 957561] [NEW] Script buffer appears instead of python shell buffer | #2 |
> thanks a lot for all your valuable reports, thus making it progress.
> Just to optimize reporting a little bit: when referring to trunk, "today" isn't
> that meaningful for me, as I may push serveral times. If possible, please
> indicate the revisions number.
Aha! I'll do this in future. The revision I'm talking about here is 896.
Richard Stanton (a-stanton) wrote : | #3 |
The same problem exists in r911. I have some additional information:
The splitting problem seems to depend on what python shell is selected.
If I edit the following script file and press C-c C-c, all works as expected. The window splits in two, one half shows the script file, and the other half shows the python buffer:
---------------
#!/usr/bin/python
print "Hi, Richard"
------------
If I add one character to this file, changing "python" in line 1 to "ipython", then press C-c C-c, the window now splits OK, but instead of one half showing the (i)python buffer, both halves of the window now display the original python script.
Thomas Caswell (tcaswell-gmail) wrote : Re: [Bug 957561] Re: Script buffer appears instead of python shell buffer | #4 |
set py-split-
'toggle-
which fixes the problem for me.
On Tue, Mar 27, 2012 at 16:00, Richard Stanton
<email address hidden> wrote:
> The same problem exists in r911. I have some additional information:
>
> The splitting problem seems to depend on what python shell is selected.
>
> If I edit the following script file and press C-c C-c, all works as
> expected. The window splits in two, one half shows the script file, and
> the other half shows the python buffer:
>
> ---------------
>
> #!/usr/bin/python
> print "Hi, Richard"
>
> ------------
>
> If I add one character to this file, changing "python" in line 1 to
> "ipython", then press C-c C-c, the window now splits OK, but instead of
> one half showing the (i)python buffer, both halves of the window now
> display the original python script.
>
> --
> You received this bug notification because you are a member of python-
> mode.el developers, which is the registrant for python-mode.el.
> https:/
>
> Title:
> Script buffer appears instead of python shell buffer
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> Using today's (3/16) current version of python-mode under Windows
> (Emacs 24.0.94), things are getting very close to working properly!
> Just a minor buffer visibility problem. E.g.,
>
> 1) Open run.py.
>
> 2) Press C-c !, the window splits and an ipython buffer opens as
> desired
>
> 3) In the script buffer, press C-c C-c.
>
> The good: The script runs properly, and inside the same ipython buffer
> opened in step 2.
>
> The bad: The ipython buffer disappears from view, and the split window
> now displays two copies of the original python script.
>
> To manage notifications about this bug go to:
> https:/
Richard Stanton (a-stanton) wrote : RE: [Bug 957561] Re: Script buffer appears instead of python shell buffer | #5 |
Yes, that seems to help. I like having it split for me the first time, but as a work-around it's not that hard to split once manually, then I can run the code as often as I want without changing the window layout.
Thanks.
> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf
> Of Thomas Caswell
> Sent: Friday, March 30, 2012 8:13 PM
> To: Richard Stanton
> Subject: Re: [Bug 957561] Re: Script buffer appears instead of python shell
> buffer
>
> set py-split-
> execute. This disables the splitting which fixes the problem for me.
>
>
> On Tue, Mar 27, 2012 at 16:00, Richard Stanton
> <email address hidden> wrote:
> > The same problem exists in r911. I have some additional information:
> >
> > The splitting problem seems to depend on what python shell is selected.
> >
> > If I edit the following script file and press C-c C-c, all works as
> > expected. The window splits in two, one half shows the script file,
> > and the other half shows the python buffer:
> >
> > ---------------
> >
> > #!/usr/bin/python
> > print "Hi, Richard"
> >
> > ------------
> >
> > If I add one character to this file, changing "python" in line 1 to
> > "ipython", then press C-c C-c, the window now splits OK, but instead
> > of one half showing the (i)python buffer, both halves of the window
> > now display the original python script.
> >
> > --
> > You received this bug notification because you are a member of python-
> > mode.el developers, which is the registrant for python-mode.el.
> > https:/
> >
> > Title:
> > Script buffer appears instead of python shell buffer
> >
> > Status in An Emacs mode for editing Python code:
> > New
> >
> > Bug description:
> > Using today's (3/16) current version of python-mode under Windows
> > (Emacs 24.0.94), things are getting very close to working properly!
> > Just a minor buffer visibility problem. E.g.,
> >
> > 1) Open run.py.
> >
> > 2) Press C-c !, the window splits and an ipython buffer opens as
> > desired
> >
> > 3) In the script buffer, press C-c C-c.
> >
> > The good: The script runs properly, and inside the same ipython
> > buffer
> > opened in step 2.
> >
> > The bad: The ipython buffer disappears from view, and the split
> > window
> > now displays two copies of the original python script.
> >
> > To manage notifications about this bug go to:
> > https:/
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Script buffer appears instead of python shell buffer
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> Using today's (3/16) current version of python-mode under Windows
> (Emacs 24.0.94), things are getting very close to working properly!
> Just a minor buffer visibility problem. E.g.,
>
> 1) Open run.py.
>
> 2) Press C-c !, the window splits and an ipython buffer opens as
...
Andreas Roehler (a-roehler) wrote : Re: [Bug 957561] Re: Script buffer appears instead of python shell buffer | #6 |
Am 27.03.2012 23:00, schrieb Richard Stanton:
> The same problem exists in r911. I have some additional information:
>
> The splitting problem seems to depend on what python shell is selected.
>
fixed it that way. Please re-open if not done.
Changed in python-mode: | |
status: | New → Fix Committed |
Richard Stanton (a-stanton) wrote : | #7 |
r 916: It now seems to be trying to switch to the (non-existent) buffer "IPython" (the buffer is actually called "*IPython*"), and throws the following error:
Debugger entered--Lisp error: (error "No buffer named IPython")
set-buffer(
(cond ((unless (eq switch (quote noswitch)) (and py-split-
py-shell-
(progn (when (string-match "ipython" (process-name proc)) (sit-for py-ipython-
(if (file-readable-p file) (progn (when (string-match "ipython" (process-name proc)) (sit-for py-ipython-
(let* ((oldbuf (current-buffer)) (shell (or shell (py-choose-shell))) (regbuf (current-buffer)) (py-execute-
Changed in python-mode: | |
status: | Fix Committed → In Progress |
Andreas Roehler (a-roehler) wrote : | #8 |
Am 03.04.2012 23:03, schrieb Richard Stanton:
> r 916: It now seems to be trying to switch to the (non-existent) buffer
> "IPython" (the buffer is actually called "*IPython*"), and throws the
> following error:
ah, sorry, wrote a test meanwhile, so we should not see this kind of errors...
please try again, thx
Changed in python-mode: | |
status: | In Progress → Fix Committed |
Richard Stanton (a-stanton) wrote : | #9 |
r918: This problem seems to have gone away on my Mac, but it's still there under Windows. For example, if I open a script file containing the text:
print "Hi, Richard"
and press C-c C-c, I get an error dump again (see below). It's trying to switch to a buffer called *IPython*, while the actual buffer name is *c:/python27/
The dump is as follows:
Debugger entered--Lisp error: (error "No buffer named *IPython*")
set-buffer(
(cond ((unless (eq switch (quote noswitch)) (and py-split-
py-shell-
(progn (when (string-match "ipython" (process-name proc)) (sit-for py-ipython-
(if (file-readable-p file) (progn (when (string-match "ipython" (process-name proc)) (sit-for py-ipython-
(let* ((oldbuf (current-buffer)) (shell (or shell (py-choose-shell))) (regbuf (current-buffer)) (py-execute-
Changed in python-mode: | |
status: | Fix Committed → In Progress |
Changed in python-mode: | |
status: | In Progress → New |
Andreas Roehler (a-roehler) wrote : | #10 |
seems gone with last commit, please flag "new" again if not
Changed in python-mode: | |
status: | New → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
Am 17.03.2012 01:18, schrieb Richard Stanton:
> Public bug reported:
>
> Using today's (3/16)
Hi Richard,
thanks a lot for all your valuable reports, thus making it progress.
Just to optimize reporting a little bit: when referring to trunk, "today" isn't
that meaningful for me, as I may push serveral times. If possible, please indicate the revisions number.
At
https:/ /code.launchpad .net/python- mode
column "Last commit" displays it, also
bzr log -l 1
current version of python-mode under Windows (Emacs
> 24.0.94), things are getting very close to working properly! Just a
> minor buffer visibility problem. E.g.,
>
> 1) Open run.py.
>
> 2) Press C-c !, the window splits and an ipython buffer opens as desired
>
> 3) In the script buffer, press C-c C-c.
>
> The good: The script runs properly, and inside the same ipython buffer
> opened in step 2.
>
> The bad: The ipython buffer disappears from view, and the split window
> now displays two copies of the original python script.
>
> ** Affects: python-mode
> Importance: Undecided
> Status: New
>