[Top][All Lists]
[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:57:27 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> 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.
>
> Apparently if the exec fails, this function neglects to print
> '_emacs_out'. This can be verified using
>
> I don't know enough Python to fix this. Can someone help?
After some trial and error, I propose the following patch. I have
verified that it makes the reported bug go away. Does anyone disagree
with it?
*** emacs/etc/emacs.py.~1.8.~ 2006-08-21 00:19:17.000000000 -0400
--- emacs/etc/emacs.py 2006-10-21 00:55:36.000000000 -0400
***************
*** 59,71 ****
return
if inspect.ismethod (func):
func = func.im_func
! if not inspect.isfunction (func): return
(args, varargs, varkw, defaults) = inspect.getargspec (func)
# No space between name and arglist for consistency with builtins.
print '_emacs_out', \
func.__name__ + inspect.formatargspec (args, varargs, varkw,
defaults)
! except: pass
def all_names (object):
"""Return (an approximation to) a list of all possible attribute
--- 59,74 ----
return
if inspect.ismethod (func):
func = func.im_func
! if not inspect.isfunction (func):
! print '_emacs_out ()'
! return
(args, varargs, varkw, defaults) = inspect.getargspec (func)
# No space between name and arglist for consistency with builtins.
print '_emacs_out', \
func.__name__ + inspect.formatargspec (args, varargs, varkw,
defaults)
! except:
! print "_emacs_out ()"
def all_names (object):
"""Return (an approximation to) a list of all possible attribute
- Python mode and eldoc "freeze", johnsu01, 2006/10/20
- Re: Python mode and eldoc "freeze", Chong Yidong, 2006/10/21
- Re: Python mode and eldoc "freeze",
Chong Yidong <=
- Re: Python mode and eldoc "freeze", Stefan Monnier, 2006/10/22
- Re: Python mode and eldoc "freeze", John Sullivan, 2006/10/24
- Re: Python mode and eldoc "freeze", Slawomir Nowaczyk, 2006/10/27
- Re: Python mode and eldoc "freeze", John Sullivan, 2006/10/31
- Re: Python mode and eldoc "freeze", Slawomir Nowaczyk, 2006/10/31
- Re: Python mode and eldoc "freeze", Dave Love, 2006/10/26
- Re: Python mode and eldoc "freeze", Stefan Monnier, 2006/10/26
- Re: Python mode and eldoc "freeze", Richard Stallman, 2006/10/27