This page contains contributed sources for AutoComplete.
Lisp:auto-complete-extension.el contains some sources by AndyStewart.
Lisp:ac-lilypond.el is my (finally working) contribution to LilyPond?-mode sources. Redsonya
ac-math provides three sources, one for LaTeX command completion, one for LaTeX math symbols and the another one for Unicode input of math characters. A comprehensive list of math symbols is implemented (more than 2500).

Direct download ac-math.el
auto-complete-auctex uses auctex’s parsing to give up-to-date, accurate completions of commands, environments, bib entries, and labels.
Completion for python without rope or anything like that: http://chrispoole.com/project/ac-python
Works with python.el, python-mode.el etc.
Completion for python using PySmell.
(defvar ac-source-pysmell
'((candidates
. (lambda ()
(require 'pysmell)
(pysmell-get-all-completions))))
"Source for PySmell")
(add-hook 'python-mode-hook
'(lambda ()
(set (make-local-variable 'ac-sources) (append ac-sources '(ac-source-pysmell)))))
Completion for python using rope.
(ac-ropemacs-initialize)
(add-hook 'python-mode-hook
(lambda ()
(add-to-list 'ac-sources 'ac-source-ropemacs)))
New ESSAuto-complete
And older Lisp:ac-R.el (0.1)
ac-R.el interferes with mode switching between LaTeX and R in noweb mode. This interference can be eliminated by commenting out
(make-local-variable ac-ignore-case)
in the
(add-hook 'ess-mode-hook
section near the end. I think this is harmless, but I don’t know lisp well enough to be sure. It works but if someone has a better solution I’d love to hear it.
make-local-variable should accept a quote instead var. otherwise, it would introduce error as “Symbol nil may not be buffer-local” and fail to start ESS process. Please modified
(make-local-variable ac-ignore-case)
with
(make-local-variable 'ac-ignore-case)
for both occurs.
(require 'ac-R)
and then start R manullay which would active the autocomplete thing. and you may find it would be helpful to keeps lines below in your .emacs too.
(require 'ess-eldoc)
(setq ess-eval-visibly-p nil) Have a dog day, cheers!
Lisp:ac-dabbrev.el (0.0.4)
This should get you started:
(defun ac-semantic-construct-candidates (tags)
"Construct candidates from the list inside of tags."
(apply 'append
(mapcar (lambda (tag)
(if (listp tag)
(let ((type (semantic-tag-type tag))
(class (semantic-tag-class tag))
(name (semantic-tag-name tag)))
(if (or (and (stringp type)
(string= type "class"))
(eq class 'function)
(eq class 'variable))
(list (list name type class))))))
tags)))
(defvar ac-source-semantic-analysis nil)
(setq ac-source-semantic
`((sigil . "b")
(init . (lambda () (setq ac-source-semantic-analysis
(condition-case nil
(ac-semantic-construct-candidates (semantic-fetch-tags))))))
(candidates . (lambda ()
(if ac-source-semantic-analysis
(all-completions ac-target (mapcar 'car ac-source-semantic-analysis)))))))
It’s a “snarf and barf” of the org-complete code, but it does the trick. Hopefully I will be able to provide a better version soon.
(defvar ac-org-candidates nil)
(defvar ac-org-pattern nil)
(defun ac-org-construct-candidates ()
"Pabbrev source for org."
(let* ((end (point))
(beg1 (save-excursion
(skip-chars-backward (org-re "[:alnum:]_@"))
(point)))
(beg (save-excursion
(skip-chars-backward "a-zA-Z0-9_:$")
(point)))
(confirm (lambda (x) (stringp (car x))))
(searchhead (equal (char-before beg) ?*))
(struct
(when (and (member (char-before beg1) '(?. ?<))
(setq a (assoc (buffer-substring beg1 (point))
org-structure-template-alist)))
(org-complete-expand-structure-template (1- beg1) a)
(throw 'exit t)))
(tag (and (equal (char-before beg1) ?:)
(equal (char-after (point-at-bol)) ?*)))
(prop (and (equal (char-before beg1) ?:)
(not (equal (char-after (point-at-bol)) ?*))))
(texp (equal (char-before beg) ?\\))
(link (equal (char-before beg) ?\[))
(opt (equal (buffer-substring (max (point-at-bol) (- beg 2))
beg)
"#+"))
(startup (string-match "^#\\+STARTUP:.*"
(buffer-substring (point-at-bol) (point))))
(completion-ignore-case opt)
(type nil)
(tbl nil)
(table (cond
(opt
(setq type :opt)
(require 'org-exp)
(append
(mapcar
(lambda (x)
(string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x)
(cons (match-string 2 x) (match-string 1 x)))
(org-split-string (org-get-current-options) "\n"))
(mapcar 'list org-additional-option-like-keywords)))
(startup
(setq type :startup)
org-startup-options)
(link (append org-link-abbrev-alist-local
org-link-abbrev-alist))
(texp
(setq type :tex)
org-html-entities)
((string-match "\\`\\*+[ \t]+\\'"
(buffer-substring (point-at-bol) beg))
(setq type :todo)
(mapcar 'list org-todo-keywords-1))
(searchhead
(setq type :searchhead)
(save-excursion
(goto-char (point-min))
(while (re-search-forward org-todo-line-regexp nil t)
(push (list
(org-make-org-heading-search-string
(match-string 3) t))
tbl)))
tbl)
(tag (setq type :tag beg beg1)
(or org-tag-alist (org-get-buffer-tags)))
(prop (setq type :prop beg beg1)
(mapcar 'list (org-buffer-property-keys nil t t)))
(t (progn
(call-interactively org-completion-fallback-command)
(throw 'exit nil))))))
(setq ac-org-pattern (buffer-substring-no-properties beg end))
table))
(defvar ac-source-org nil)
(setq ac-source-org
`((sigil . "o")
(init . (lambda () (setq ac-org-candidates
(condition-case nil
(ac-org-construct-candidates)))))
(candidates . (lambda ()
(all-completions ac-target ac-org-candidates)))))
An auto-complete source for Slime, providing lisp symbol completion and pop-up documentation, can be found here: http://github.com/purcell/ac-slime
An auto-complete source for Octave, providing Octave commands completion can be found here:
http://www.emacswiki.org/emacs/ac-octave.el
An auto-complete source for the caml and tuareg modes, gets symbols from caml-help.el in caml mode:
(defun ac-ocaml-candidates (prefix)
"Candidates for OCaml auto-completion"
(let ((candidates)
(module-name
(when (string-match "\\([A-Za-z_][A-Za-z0-9_']*\\)[.]" prefix)
(match-string 1 prefix))))
(if module-name
(iter '(lambda (sym) (push (concat module-name "." sym) candidates))
(ocaml-module-symbols (assoc module-name (ocaml-module-alist))))
(iter
'(lambda (mod)
(iter '(lambda (sym) (push sym candidates))
(ocaml-module-symbols mod)))
(ocaml-visible-modules))
(iter '(lambda (mod) (push (car mod) candidates)) (ocaml-module-alist)))
candidates))
(ac-define-source ocaml
'((available . (require 'caml-help nil t))
(candidates . (ac-ocaml-candidates ac-prefix))
(prefix . "\\(?:[^A-Za-z0-9_.']\\|\\`\\)\\(\\(?:[A-Za-z_][A-Za-z0-9_']*[.]\\)?[A-Za-z0-9_']*\\)")
(symbol . "s")))
21 Dec 2010: Is there any tutorial about how to write your own sources? I’d like to write a source on top of http://www.emacswiki.org/emacs/el-swank-fuzzy.el the way it has been done for Anything, but I can’t understand what is the expected interface from sources. Thanks. ^^^^^^^^^^ Take a look at the manual(http://www.cx4a.org/software/auto-complete/manual.html).