1
votes

I just followed this site to install auto-complete on Emacs. I installed it with "M-x load-file RETURN ~/path/to/etc/install.el".

The output of my installation was: http://paste.ubuntu.com/6184523/

After that, I added the recommended code to my ~/.emacs file and restarted Emacs. Typing "M-x auto-complete-mode" says "No match". I also tried to fix it by replacing flet with c-flet etc. but it hasn't changed anything too.

Version: GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2)

2

2 Answers

0
votes

Emacs has a package manager now. So just install the package from the list and you're done. Here's the configuration that adds the two most popular repositories:

(package-initialize)
(add-to-list
 'package-archives
 '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list
 'package-archives
 '("melpa" . "http://melpa.milkbox.net/packages/"))

After this, M-x package-list-packages. The rest is pretty intuitive.

UPD: A simple auto-complete setup for C++

(add-hook 'c++-mode-hook
      (lambda()
            (semantic-mode 1)
            (define-key c++-mode-map (kbd "C-z") 'c++-auto-complete)))

(defun c++-auto-complete ()
  (interactive)
  (let ((ac-sources
         `(ac-source-semantic
           ,@ac-sources)))
  (auto-complete)))
0
votes

I tried some solutions that worked for other people, but it didn't quite work out.

Try setting the environment variable(s) to ~/emacs.d/ in both .profile and .bashrc If that doesn't work out, try exporting the environment variable(s) with su root (won't work with sudo).

At least that worked for me while trying to install auto-complete-mode with golangs auto-complete-mode