From jain.samit at gmail.com Fri Oct 7 05:39:58 2005 From: jain.samit at gmail.com (Samit Jain) Date: Thu, 6 Oct 2005 22:39:58 -0500 Subject: [Python-mode] settings for python mode Message-ID: <80b335690510062039h6860d9fbs99b42a843de0c6f1@mail.gmail.com> Hi, Could you please tell me the set of xemacs settings to put in .emacs file for the module to actually work? thanks, Samit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-mode/attachments/20051006/ff22466a/attachment.htm From notmyprivateemail at gmail.com Sat Oct 29 16:29:41 2005 From: notmyprivateemail at gmail.com (Alex Polite) Date: Sat, 29 Oct 2005 16:29:41 +0200 Subject: [Python-mode] patch for pycomplete.py Message-ID: Hi there. I just found out about pycomplete. I've been missing this in emacs for a long time. Very nice. I've modified pycomplete.py put some stuff in the message area when there's no completion or to many possible completions. It's pretty unobtrusive. Here's the patch. I hope you integrate it. regards alex -- Alex Polite http://flosspick.org - finding the right open source -------------- next part -------------- A non-text attachment was scrubbed... Name: pycomplete_patch.diff Type: text/x-patch Size: 1241 bytes Desc: not available Url : http://mail.python.org/pipermail/python-mode/attachments/20051029/2a3a175e/pycomplete_patch.bin From m4 at polite.se Sat Oct 29 15:42:39 2005 From: m4 at polite.se (Alex Polite) Date: Sat, 29 Oct 2005 15:42:39 +0200 Subject: [Python-mode] patch for pycomplete.py Message-ID: <20051029134239.GA3784@ladjo.ath.cx> Hi there. I just found out about pycomplete. I've been missing this in emacs for a long time. Very nice. I've modified pycomplete.py put some stuff in the message area when there's no completion or to many possible completions. It's pretty unobtrusive. Here's the patch. I hope you integrate it. regards alex -- Alex Polite http://flosspick.org -------------- next part -------------- *** /tmp/python-mode-1.0alpha/pycomplete.py 2004-10-21 23:27:30.000000000 +0200 --- /usr/lib/python2.3/site-packages/pycomplete.py 2005-10-29 15:12:46.000000000 +0200 *************** *** 23,28 **** --- 23,31 ---- import sys import os.path + import string + + from Pymacs import lisp try: x = set *************** *** 75,81 **** def pycomplete(s, imports=None): completions = get_all_completions(s, imports) dots = s.split(".") ! return os.path.commonprefix([k[len(dots[-1]):] for k in completions]) if __name__ == "__main__": print " ->", pycomplete("") --- 78,94 ---- def pycomplete(s, imports=None): completions = get_all_completions(s, imports) dots = s.split(".") ! result = os.path.commonprefix([k[len(dots[-1]):] for k in completions]) ! if result == "": ! if completions: ! width = lisp.window_width() - 2 ! msg = "completions: %s" % (string.join(completions," "),) ! if len(msg) > width: ! msg = msg[:width - 4] + " ..." ! else: ! msg = "no completions!" ! lisp.message(msg) ! return result if __name__ == "__main__": print " ->", pycomplete("")