From noreply at sourceforge.net Sun Apr 10 14:33:16 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Sun Apr 10 14:33:20 2005 Subject: [Python-mode] [ python-mode-Bugs-1180180 ] Proposed improvement for pycomplete Message-ID: Bugs item #1180180, was opened at 2005-04-10 14:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Hugo Haas (hugoh) Assigned to: Nobody/Anonymous (nobody) Summary: Proposed improvement for pycomplete Initial Comment: Hi. I really like the idea of pycomplete a lot. However, it only completes simple cases: "sys.cl" becomes "sys.clock" once completed. What would be interesting would be to get a list of completions for "sys.". I believe that what needs to be changed is the following: - have pycomplete.py return a list of all possibilities - in py-complete() in pycomplete.el, use the output of pycomplete.py to call try-completion; if it works, use it, if not and there are several possibilities, display all the possibilities given by all-completions and allow to chose between them. The former is trivial (patch attached). I tried to do the latter, but my lack of knowledge in elisp put a rapid stop to it, so in case somebody knows elisp and is interested by this (I think it would be a cool feature), I thought I'd record the idea here. Regards, Hugo ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916 From htan at mlp.com Sun Apr 24 23:52:29 2005 From: htan at mlp.com (Tan, Heap Ho) Date: Wed Apr 27 01:48:25 2005 Subject: [Python-mode] how to enable auto-complete in the mode Message-ID: <776A87E30F63784EB48C92DF1106C2E953E934@EXCHUS002.AD.MLP.COM> Hi all, Does anyone knows how to enable auto-complete in python mode? Thanks Heap-Ho -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-mode/attachments/20050424/a94d179f/attachment.html From skip at pobox.com Wed Apr 27 02:18:41 2005 From: skip at pobox.com (Skip Montanaro) Date: Wed Apr 27 02:18:46 2005 Subject: [Python-mode] how to enable auto-complete in the mode In-Reply-To: <776A87E30F63784EB48C92DF1106C2E953E934@EXCHUS002.AD.MLP.COM> References: <776A87E30F63784EB48C92DF1106C2E953E934@EXCHUS002.AD.MLP.COM> Message-ID: <17006.55905.598294.947822@montanaro.dyndns.org> Heap> Does anyone knows how to enable auto-complete in python mode? auto-complete of what? If you have access to the CVS version of python-mode and also have Francois Pinard's Pymacs installed, you can check out pycomplete.el and pycomplete.py and see if that is what you're after. -- Skip Montanaro skip@pobox.com From skip at pobox.com Wed Apr 27 05:07:25 2005 From: skip at pobox.com (Skip Montanaro) Date: Wed Apr 27 05:07:30 2005 Subject: [Python-mode] how to enable auto-complete in the mode In-Reply-To: <776A87E30F63784EB48C92DF1106C2E953E93B@EXCHUS002.AD.MLP.COM> References: <776A87E30F63784EB48C92DF1106C2E953E93B@EXCHUS002.AD.MLP.COM> Message-ID: <17007.493.583676.373257@montanaro.dyndns.org> (please include the list when looking for help - you get more brains working on your problem) Skip> auto-complete of what? Heap> Auto-complete in xemacs mode I meant. I'm sorry. This still doesn't ring any bells for me. Can you be more specific? -- Skip Montanaro skip@pobox.com From skip at pobox.com Wed Apr 27 19:45:19 2005 From: skip at pobox.com (Skip Montanaro) Date: Wed Apr 27 19:45:25 2005 Subject: [Python-mode] how to enable auto-complete in the mode In-Reply-To: <776A87E30F63784EB48C92DF1106C2E953E93D@EXCHUS002.AD.MLP.COM> References: <776A87E30F63784EB48C92DF1106C2E953E93D@EXCHUS002.AD.MLP.COM> Message-ID: <17007.53167.452616.540939@montanaro.dyndns.org> Okay, we're closing in on me understanding your request. Heap> It meant that when I edit python in xemacs. There is CPython mode, Heap> how can I edit the xemacs bindings so that it allows auto-complete Heap> the class methods? I meant in IDE like komodo, they will Heap> auto-complete the bindings for you. Is there a mode in xemacs? What sort of completion are you looking for? Assume I have this class: class SillyClass: def __init__(self): self.long_attribute_name = 5 def SillyMethodWithALongName(self): print self.long_attribute_name Somewhere else in another module I instantiate it: silly = SillyClass() Now, I want to call its long method, so I type: silly.Silly then hit the TAB key (or something similar). Do you expect it to automatically complete to silly.SillyMethodWithALongName ? Given that Python is such a dynamic language, I can't see how that could be done reliably. The only way I can see to implement this easily would be to coopt Emacs's TAGS facility to replace partial function/method names with the result of (find-tag-tag). That puts an extra burden on you to generate TAGS files, typically from a Makefile. -- Skip Montanaro skip@pobox.com From htan at mlp.com Wed Apr 27 19:50:27 2005 From: htan at mlp.com (Tan, Heap Ho) Date: Thu Apr 28 05:08:15 2005 Subject: [Python-mode] how to enable auto-complete in the mode Message-ID: <776A87E30F63784EB48C92DF1106C2E953E944@EXCHUS002.AD.MLP.COM> Ok so there is no easy way to do it ? There should be right or it will be hard for emacs to be a true integrated IDE environment .. -----Original Message----- From: Skip Montanaro [mailto:skip@pobox.com] Sent: Wednesday, April 27, 2005 1:45 PM To: Tan, Heap Ho Cc: python-mode@Python.org Subject: RE: [Python-mode] how to enable auto-complete in the mode Okay, we're closing in on me understanding your request. Heap> It meant that when I edit python in xemacs. There is CPython mode, Heap> how can I edit the xemacs bindings so that it allows auto-complete Heap> the class methods? I meant in IDE like komodo, they will Heap> auto-complete the bindings for you. Is there a mode in xemacs? What sort of completion are you looking for? Assume I have this class: class SillyClass: def __init__(self): self.long_attribute_name = 5 def SillyMethodWithALongName(self): print self.long_attribute_name Somewhere else in another module I instantiate it: silly = SillyClass() Now, I want to call its long method, so I type: silly.Silly then hit the TAB key (or something similar). Do you expect it to automatically complete to silly.SillyMethodWithALongName ? Given that Python is such a dynamic language, I can't see how that could be done reliably. The only way I can see to implement this easily would be to coopt Emacs's TAGS facility to replace partial function/method names with the result of (find-tag-tag). That puts an extra burden on you to generate TAGS files, typically from a Makefile. -- Skip Montanaro skip@pobox.com