From: John Mastro <john.b.mastro@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Cc: haris.bogdanovic@gmail.com
Subject: Re: auto-complete
Date: Tue, 10 Nov 2015 16:56:42 -0800 [thread overview]
Message-ID: <CAOj2CQSUAajCYTxT6kxJBKbsYxTcBXZ4eT_ufiA6KaSL8rF2XA@mail.gmail.com> (raw)
In-Reply-To: <84512916-78b9-4c84-bf53-19ded013b2ae@googlegroups.com>
<haris.bogdanovic@gmail.com> wrote:
> Hi
>
> This is my .emacs file:
[snip]
> Why doesn't my auto-completion work ?
> I am programming in Common Lisp and I want a dialog to pop up, with
> possible completions, in my REPL and .lisp files, while I'm typing.
> Thanks
I can't say for sure what is the problem, but here's a minimal
configuration that works for me. Give it a try and see if it works for
you too.
A couple notes that aren't directly related to slime or auto-complete:
- When using package.el to install packages, it's not necessary to
manage `load-path' yourself - that's part of what package.el does for
you.
- This is more personal preference, but I would probably suggest
removing Marmalade from your package archives list and stick with GNU
ELPA and MELPA. If you want less-frequently-changing packages than
MELPA, give MELPA Stable (https://stable.melpa.org) a look.
- The various calls to `require' weren't necessary because the functions
in question are autoloads (i.e. the relevant file will automatically
be loaded the first time you use the function).
After adding the below to your init file, restart Emacs, visit a Lisp
file, and then invoke `M-x slime' to launch the SLIME REPL. You should
then get autocompletion in both the file-visiting buffer and the REPL.
#+begin_src emacs-lisp
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(defvar my-packages
'(auto-complete slime ac-slime)
"List of packages to install automatically.")
(let ((need (delq nil (mapcar (lambda (pkg)
(unless (package-installed-p pkg)
pkg))
my-packages))))
(when need
(package-refresh-contents)
(mapc #'package-install need)))
(ac-config-default)
(global-auto-complete-mode)
(add-hook 'lisp-mode-hook #'slime-mode)
(eval-after-load 'slime
'(add-hook 'slime-mode-hook #'set-up-slime-ac))
(eval-after-load 'slime-repl
'(add-hook 'slime-repl-mode-hook #'set-up-slime-ac))
#+end_src
--
john
next prev parent reply other threads:[~2015-11-11 0:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 21:03 auto-complete haris.bogdanovic
2015-11-11 0:56 ` John Mastro [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-10-15 20:24 auto-complete haris.bogdanovic
2015-10-15 20:36 ` auto-complete Jai Dayal
2015-10-04 20:12 auto-complete Haris Bogdanović
2015-10-06 1:24 ` auto-complete Dmitry Gutov
2015-10-06 1:30 ` auto-complete Emanuel Berg
2011-04-26 18:41 auto-complete Andrea Crotti
2011-04-13 23:35 auto-complete daniele.g
2011-04-26 7:01 ` auto-complete Bernardo
2011-04-26 17:26 ` auto-complete Andrea Crotti
2011-04-26 18:07 ` auto-complete daniele.g
2006-02-05 23:14 auto-complete dunnil
2006-02-06 4:16 ` auto-complete Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOj2CQSUAajCYTxT6kxJBKbsYxTcBXZ4eT_ufiA6KaSL8rF2XA@mail.gmail.com \
--to=john.b.mastro@gmail.com \
--cc=haris.bogdanovic@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.