[Python-mode] [ python-mode-Bugs-1180180 ] Proposed improvement for pycomplete
SourceForge.net
noreply at sourceforge.net
Tue Jun 28 05:26:03 CEST 2005
Bugs item #1180180, was opened at 2005-04-10 09:33
Message generated for change (Comment added) made by errebepe
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
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
----------------------------------------------------------------------
Comment By: Rodrigo Bernardo Pimentel (errebepe)
Date: 2005-06-28 00:26
Message:
Logged In: YES
user_id=374783
Ahn... Sorry, false alarm. I was still using my code
completion code and hadn't realized it. No wonder it was so
similar ;)
Haven't had much luck using Semantic yet, though I still
think it's the best approach.
----------------------------------------------------------------------
Comment By: Rodrigo Bernardo Pimentel (errebepe)
Date: 2005-06-27 18:44
Message:
Logged In: YES
user_id=374783
I just managed to use Semantic with ECB
(http://ecb.sourceforge.net/). Installed both, fired up ECB
(M-x ecb-activate). From then on, on a source file, I type
M-Tab and it completes (using the same "interface" my patch
provides, which I found cool, BTW). I've spotted what is
apparently a bug (when importing a module from a file I
created on the current directory), but otherwise it seems to
work!
----------------------------------------------------------------------
Comment By: Rodrigo Bernardo Pimentel (errebepe)
Date: 2005-06-27 17:13
Message:
Logged In: YES
user_id=374783
I used minibuffer because it seems to be the way Emacs
usually handles these things. It's also a close analogy with
the way Eclipse does it.
Anyway, I've been thinking about code-completion for a
while, and it seems the best way to do it would be to parse
the code and act according to context. Apparently, the
Semantic package
(http://cedet.sourceforge.net/semantic.shtml) does this.
Now, if I can get it to work...
----------------------------------------------------------------------
Comment By: Hugo Haas (hugoh)
Date: 2005-06-26 19:37
Message:
Logged In: YES
user_id=331657
It seems to do exactly what I was after! Except maybe for
the completion prompt, as maybe it could just give a list of
possibilities in a separate buffer without requiring the use
of the mini-buffer, but that's a detail.
Thanks a lot.
----------------------------------------------------------------------
Comment By: Rodrigo Bernardo Pimentel (errebepe)
Date: 2005-05-26 21:52
Message:
Logged In: YES
user_id=374783
I've implemented these suggestions and put the resulting
files at http://isnomore.net/prog/pycomplete/ . Please take
a look and let me know what you (all) think.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1180180&group_id=86916
More information about the Python-mode
mailing list