GNU bug report logs -
#8316
23.3; python-find-function is broken
Previous Next
Reported by: Christophe Kalt <kalt <at> taranis.org>
Date: Tue, 22 Mar 2011 02:02:02 UTC
Severity: normal
Found in version 23.3
Fixed in version 24.2
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8316 in the body.
You can then email your comments to 8316 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8316
; Package
emacs
.
(Tue, 22 Mar 2011 02:02:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christophe Kalt <kalt <at> taranis.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 22 Mar 2011 02:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
python-find-function cannot work as the emacs.location_of function is
missing from etc/emacs[23].py
The following seems to work for Python 2.x
def location_of (name, imports):
"""Get location at which NAME is defined (or nil).
Provides a pair (PATH, LINE), where LINE is the start of the definition
in path name PATH.
Exec IMPORTS first."""
locls = {}
if imports:
try: exec (imports, locls)
except: pass
try:
obj = eval (name, globals (), locls)
# Bug: (in Python 2.5) `getsourcefile' only works with modules,
# hence the `getmodule' here.
srcfile = inspect.getsourcefile (inspect.getmodule (obj))
_, line = inspect.getsourcelines (obj)
print '_emacs_out ("%s" . %d)' % (srcfile.replace('\\', '/'), line)
except:
print "_emacs_out ()"
Couple comments:
- it isn't mine, was simply adapted from
http://www.loveshack.ukfsn.org/emacs/emacs.py
- .replace('\\', '/') seems necessary on Windows but feels like an ugly hack
In GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600)
of 2011-03-10 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 18 Jun 2012 23:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christophe Kalt <kalt <at> taranis.org>
:
bug acknowledged by developer.
(Mon, 18 Jun 2012 23:39:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 8316-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.2
Thanks for the report. The Emacs trunk has a new python.el, and it seems
your problem is fixed there. This should appear in Emacs 24.2.
python-find-function is replaced by python-nav-jump-to-defun.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 17 Jul 2012 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.