Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs: Why can't I install auto-complete via package-install?

Tags:

emacs

I am new to emacs and have never used package-install before. I am using emacs 24.4 on Windows, but I would like to do the same thing on my emacs installed ona unix server that I ssh into.

These instructions say that I can install auto-complete with M-x package-install [RET] auto-complete [RET], but when I do this I get [No match]. Why is this? How can I install it?

like image 427
Fequish Avatar asked Sep 28 '15 00:09

Fequish


People also ask

How do I manually install Emacs packages?

Load the File Manually To use the package, all you have to do is to make emacs load the file. Alt + x load-file then give the file path. Now, emacs is aware of the package. To activate, call the command in the package.

Does Emacs have autocomplete?

The key to triggering the auto-completion in emacs is the Tab key. You will get a list of suggestions from the compiler. To select something from the list of suggestions, we recommend you to use C-n and C-p, but the down and up arrow keys can be used as well.

What command is used to install the software package Emacs?

Packages are most conveniently installed using the package menu (see Package Menu), but you can also use the command M-x package-install . This prompts for the name of a package with the ' available ' status, then downloads and installs it.


1 Answers

Have a look at what the instructions say with a little more context:

Install

auto-complete is available on MELPA and MELPA-STABLE

You can install auto-complete with the following command.

M-x package-install [RET] auto-complete [RET]

Before running the package-install you need to enable MELPA or MELPA stable:

Enable installation of packages from MELPA by adding an entry to package-archives after (require 'package) and before the call to package-initialize in your init.el or .emacs file:

(require 'package) ;; You might already have this line
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line

or to add the stable package repository, use this instead of "melpa":

(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") t)

You might also need to run M-x package-refresh-contents before M-x package-install will work. Alternatively, run M-x package-list-packages and use the UI provided there, which refreshes contents automatically.

like image 189
Chris Avatar answered Oct 29 '22 13:10

Chris