[Python-mode] completion in python-mode

Fabián Ezequiel Gallina fabian at anue.biz
Fri Nov 18 06:36:11 CET 2011


On 11/05/2011 04:56 AM, Andreas Röhler wrote:
> Hi Fabian,
>
> while hunting
>
> https://bugs.launchpad.net/python-mode/+bug/886227
>
> consider a merge of some parts of your python.el
>
> Completion feels faster than the stand-alone solution used  several 
> commits before.
>
> Curious to know the reasons, should you can tell.
>
> Just to drop you a notice so far.
>
> Best regards,
>
> Andreas
>
> -- 
> https://launchpad.net/python-mode
> https://launchpad.net/s-x-emacs-werkstatt/
>
>
>
Hi Andreas,

I myself use ropemacs for autocompletion, integrating it is really 
simple and the extra setup is worth it.

For now, I'm not planning to implement that directly into python.el, as 
I want to keep it simple. I acknowledge that the default completion 
machinery is not that good but it's good enough than if you have nothing 
else.

With that said, I think it's cool trying to enable pymacs and fallback 
if not available anyways, so nice work there.

BTW I appreciate for keeping me updated with this kind of stuff, and I 
apologize for the delay on the reply.



PS: with regards completion, my python.el uses the interactive shell by 
querying completions with the code defined in 
python-shell-completion-string-code. It's not the cleaner way to do it, 
but it does it's job. The problem with this is that it breaks if you are 
working on the comint shell and you have a sentence split in several 
lines. My plan is to give the comint shell the ability to handle raw 
tabs like it would in term (M-x term), this way I can let readline to do 
it's job and then parse the result. I was halfway through a hack for it 
but never got time to complete it, I'll let you know if I finish it 
sometime, might be a good alternative, who knows :)


More information about the Python-mode mailing list