1
votes

I have Emacs24, i want to use some modes like auto-complete.

Here is the thing, I installed 'linum' before and it's just working very well but others not working.

My .emacs file

(add-to-list 'load-path "/root/.scripts")
(require 'linum)
(global-linum-mode 1)

(require 'package)
(add-to-list 'package-archives '("melppa" . "http://melpa.milkbox.net/packages/"))
(package-initalize)

(add-to-list 'load-path "~/.emacs.d/")

(require 'auto-complete)
(require 'auto-complete-config)
(ac-config-default)
(require 'yasnippet)

auto-complete and yasnippet just doesn't working , i tried command 'auto-complete-mode' but its still same.

Any ideas ?

EDIT : I installed it from source not from ELPA and it worked.

1
When you open emacs does it give any error about init file? - Nullpointer
No, there is no error. I tried to install it list-packages and select what i want and hit the install tab way but its still same. - Sasha Valentine
1. You need to actually install packages from MELPA before you can require them. 2. I notice that you're loading something from /root. Generally it's not a good idea to run as the root user. - Chris
only linum package is working which is interesting, othes just now working - Sasha Valentine
@SashaValentine, linum is built into Emacs, so it's probably irrelevant that it's working. - Chris

1 Answers

1
votes

I had a similar issue when I upgraded to Emacs 24. Have you tried running M-x auto-complete? When I did, I got an error message like the following:

gv-get: (popup-cursor ac-menu) is not a valid place expression

It turned out this was an already reported bug that can be fixed by recompiling your byte-code:

https://github.com/auto-complete/auto-complete/issues/222

https://github.com/auto-complete/auto-complete/issues/118

This solution worked for me:

$ find ~/.emacs.d/elpa -name '*.elc' | xargs rm

(to remove all compiled elisp in your elpa subdirectories)

... then, in an elisp interaction buffer, like scratch eval:

(byte-recompile-directory (expand-file-name "~/.emacs.d/elpa") 0)

... then re-start emacs.