Problem with Emacs mode, at start only

Thomas A. Bryan tbryan at python.net
Thu Feb 17 06:42:23 EST 2000


François Pinard wrote:
> 
> Justin Sheehy <dworkin at ccs.neu.edu> écrit:
> 
> > François Pinard <pinard at iro.umontreal.ca> writes:
> 
> > > When, in Emacs, I do not have `*Python*' window initialised, or more
> > > precisely, when there is no process running in that window, then `C-c C-c'
> > > in the window where is the Python source invariably fails the first time,
> 
> > Whenever I start using python-mode, I do a `C-c !' to start the Python
> > interpreter.  Subsequent invocations of `C-c C-c' or `C-c |' will use
> > that interpreter window.
> 
> Thanks, it's neater.  But yet, shouldn't `C-c C-c' just succeed?  The user
> should ideally not be forced into that extra, introductory command.

Yes, it should.  I'm not sure what you mean when you say "more
precisely, when there is no process running in that window."  In 
general, when I run C-c C-c before I start the interpreter with a 
C-c !, there is no '*Python*' buffer.  The C-c C-c command creates 
a '*Python Output*' buffer to display any output, but it doesn't start 
a Python shell and doesn't create a '*Python*' buffer.  When the '*Python*' 
buffer already exists, then C-c C-c uses that buffer instead of the 
'*Python Output*' buffer, displaying a "# working" message and any 
output/errors in the '*Python*' buffer.

Thus, C-c C-c always works for me (GNU Emacs 20.3.1, 
python-mode 3.105, Red Hat Linux with kernel 2.2.5-15), it just 
behaves slightly differently depending upon whether I have a 
'*Python*' buffer open already.  Perhaps you could explain 
in more detail how to evoke this problem.
 
> P.S. - By the way, `C-c C-c' is an unfortunate binding, even if quick
> to type.  In the source window, it starts the Python interpreter, or at
> least, uses it.  In the interpreter window, it raises a signal and kills it.

Hm.  I hadn't thought of that.  I suppose that for me, this is like 
Python whitespace issue.  I've never had a problem with it.

---Tom



More information about the Python-list mailing list