emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python mode and eldoc "freeze"


From: Chong Yidong
Subject: Re: Python mode and eldoc "freeze"
Date: Sat, 21 Oct 2006 00:43:10 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

johnsu01 <address@hidden> writes:

> I'm using the python-mode included with this version of emacs.
>
> I have (add-hook 'python-mode-hook 'turn-on-eldoc-mode).
>
> When I move to any keyword in a python source file, expecting information to 
> be
> shown in the minibuffer, emacs appears to freeze. I can't move point or type
> anything.
>
> When I hit C-g, then the effects of all the typing I did during the "freeze"
> appear. So if I hit C-u C-n while frozen, after C-g, point moves down 4 lines.

Basically, python-send-receive (called by python-eldoc-function) is
waiting forever for input to arrive.  It expects to receive a string
"_emacs_out" from the emacs.eargs Python function (defined in
etc/emacs.py) in the inferior python process.  The trouble is in
emacs.eargs:

def eargs (name, imports):
    "Get arglist of NAME for Eldoc &c."
    print 'goo'
    try:
        if imports: exec imports
        parts = name.split ('.')
        if len (parts) > 1:
            exec 'import ' + parts[0] # might fail
        ....

Apparently if the exec fails, this function neglects to print
'_emacs_out'.  This can be verified using

  M-x run-python RET  
  emacs.eargs("self.foo", "import binascii\n")
  RET

I don't know enough Python to fix this.  Can someone help?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]