3

I have Emacs 24.4.1 with the following packages so to get autocompletion:

  • yasnippet
  • auto-complete
  • auto-complete-auctex

(and of course AUCTeX)

After I type \usep and then press TAB, the string is autocompleted to

\usepackage[opt1,...]{Package}

Instead of this behavior I'd like the following:

\usepackage{Package}

What option should I change to achieve the desired behavior?

skey
  • 203

2 Answers2

4

Assuming you are on a UNIX system and you have installed auto-complete-auctex manually (say by copying the .el file in the .emacs.d folder and then loading it from your .emacs file), you can simply edit the .el file and change the unwanted completion. The relevant line to edit is line 49:

(LaTeX-arg-usepackage . (["opt1,..."] "Package"))

change it to

(LaTeX-arg-usepackage . ("Package"))

restart Emacs and you're all set.

Note that if you installed the auto-complete-auctex package via the package system I'm not sure this method will work (I'd suggest you to install this package manually because is such a simple package it will do no harm).

Note also that I have no idea about how all this works for non-UNIX systems.

d-cmst
  • 23,095
1

After I type \usep and then press TAB, the string is autocompleted to ...

Wrong approach. Don't type \usep, but type C-c C-m and then usep and tab. Because auctex has its own machinery for completion of packages.

Keks Dose
  • 30,892
  • I don't want AUCTeX built in completion system, I want the one provided by the auto-complete package. – skey Nov 27 '14 at 15:31