简体   繁体   中英

auto-complete-mode not working

I just followed this site to install auto-complete on Emacs. I installed it with "Mx 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 "Mx 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)

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, Mx 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)))

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM