From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: auto-complete Date: Tue, 10 Nov 2015 16:56:42 -0800 Message-ID: References: <84512916-78b9-4c84-bf53-19ded013b2ae@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1447204203 12371 80.91.229.3 (11 Nov 2015 01:10:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Nov 2015 01:10:03 +0000 (UTC) Cc: haris.bogdanovic@gmail.com To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 11 02:10:02 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZwJvF-00088o-Ri for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Nov 2015 02:10:01 +0100 Original-Received: from localhost ([::1]:36883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwJvF-00005D-JS for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Nov 2015 20:10:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwJii-0001AS-6o for help-gnu-emacs@gnu.org; Tue, 10 Nov 2015 19:57:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwJig-0003F5-Ve for help-gnu-emacs@gnu.org; Tue, 10 Nov 2015 19:57:04 -0500 Original-Received: from mail-yk0-x235.google.com ([2607:f8b0:4002:c07::235]:35117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwJig-0003Er-RV for help-gnu-emacs@gnu.org; Tue, 10 Nov 2015 19:57:02 -0500 Original-Received: by ykba77 with SMTP id a77so25597125ykb.2 for ; Tue, 10 Nov 2015 16:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lVz+NKKc2gMSJLDOR2ZOPtLaJCsQfOVMcIwRcuQTM0o=; b=ReJkUHjcBIVWtLveCZe4ow0xr3Nzx+K1aWnRF+9mvRIu+yE17i73RE1yk4QC6iEzWX lPv/ezKpPn+GOwMVcQi+GXqsz0Kra4uKHDjDnyurlRdodkOvg9J5xVEhlWw8EHVLqv9b hN2EZ/GaBJbeG/q85iLDw0pBc19QMiYK9Q9RXzOIx2Wbu+e/SE51xm1+sh1rR+lpIGw/ G6PbicXoa+PfUcv9H/8G9vXBzeAJ1xr0Hcc7vnvVkfTRKLxyiPl3lThsDnPbCShBmhtE 2qUGOXSM8fJ2ToyxgTnQYh/2CUB49uuldLnr7Saon1OoTabD0CmQXwrFiHSFToqjbEyV QhsQ== X-Received: by 10.13.203.2 with SMTP id n2mr6091154ywd.59.1447203422003; Tue, 10 Nov 2015 16:57:02 -0800 (PST) Original-Received: by 10.37.75.70 with HTTP; Tue, 10 Nov 2015 16:56:42 -0800 (PST) In-Reply-To: <84512916-78b9-4c84-bf53-19ded013b2ae@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108026 Archived-At: 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