1

I couldn't find a specific answer to my question here, so I dare asking it at the off-chance of being directed to the answer ;)

since about two days, I am trying to get the auto-complete-mode to work for python, but I am out of luck :( I have been following the direction from this website and from this website which are both fairly outdated it would appear.

To give a brief description for those unfamiliar: According to the websites, it is apparently necessary to install first rope, rope-mode, pymacs and ropemacs before attempting to install auto-complete. I am reasonably confident, that I have done so successfully (the given tests, if any, in each manual gave the expected result), but once I install auto-complete, it just doesn't, y'know, autocomplete...

Lastly, it is entirely possible that I have done a newbie mistake, so please don't be shy and ask the blatantly obvious question here.

Thanks a lot for your help.


I am using Ubuntu 12.04 and emacs23 and I would like to use it with python2.7

Nebelhom
  • 3,783
  • 4
  • 21
  • 22
  • Which version of auto-complete? – PascalVKooten Oct 23 '12 at 12:20
  • 2
    Could you please show the contents of the `ac-sources` variable in a python buffer? (`C-h v ac-sources RET`) – François Févotte Oct 23 '12 at 12:22
  • @Dualinity: I have downloaded auto-complete-1.3.1 – Nebelhom Oct 24 '12 at 03:05
  • @Francesco: I'm afraid that I am newbie in the realms of emacs. I tried to follow your commands but received a no match error. However, I do not konw how to create a "python buffer" :( Sorry. Have you got a link to a site that describes how to do that? Thanks for your time. – Nebelhom Oct 24 '12 at 03:05
  • 2
    Simply open a python file (`C-x C-f path/to/your/file.py RET`). At the very bottom of the screen, the mode-line should read something like "(Python ....)", meaning that the python mode is activated. If "AC" is printed after "Python" (not necessarily immediately after, but somewhere between the parens), then auto-complete is already activated. If not, turn it on (`M-x auto-complete-mode RET`). Now try to auto-complete something simple (like the name of a variable which is already present in the file). If it doesn't work, type `C-h v ac-sources RET` and show us the value of the variable. – François Févotte Oct 24 '12 at 06:48
  • @Francesco: Unfortunately it would appear that I did something wrong in the installation of auto-complete then as none of the commands you gave yield a match (M-x auto-complete-mode RET yields [no match]). However, I "did" follow the installation manual exactly as printed, so I am really stumped. I really appreciate your help on this one. I would be glad for any other suggestions... Thanks a lot! – Nebelhom Oct 24 '12 at 14:37
  • 1
    Did you follow these steps to install `auto-complete`? http://cx4a.org/software/auto-complete/manual.html#Installation – François Févotte Oct 24 '12 at 15:22
  • Have you correctly added `(require 'auto-complete-config)` and `(ac-config-default)` in your emacs configuration file? If so, do you encounter error messages at Emacs startup? (you can see Emacs messages using `C-h e`) – François Févotte Oct 24 '12 at 15:25
  • @Francesco: regarding installation, yes that is the guide I followed. To be exact, I did the following: open emacs from terminal in the downloaded and extracted auto-complete folder. In emacs I called (M-x load-file RET my/path/auto-complete-1.3.1/install.el RET), which installed and gave me the following output to paste into my ~/.emacs file: (add-to-list 'load-path "~/.emacs.d/") (require 'auto-complete-config) (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict") (ac-config-default) regarding errors: The only error I encounter has to do with a different library (yasnippet). Thx – Nebelhom Oct 24 '12 at 15:55

1 Answers1

2

bzr branch lp:python-mode/components-python-mode

includes auto-completion based on company-mode

That's the development branch of python-mode.el, no release so far.

Andreas Röhler
  • 4,804
  • 14
  • 18
  • Is there manual on how to install this mode on ubuntu? I am entirely unfamiliar with the way emacs is configured, so any pointers would help. Thanks a lot for your help. – Nebelhom Oct 24 '12 at 14:40
  • Hey, I tried out your release and it works like a charm so far! Thanks a bundle! – Nebelhom Oct 26 '12 at 16:24