yasnippet is not available in the archlinux repos so we will install it from the AUR
first go to AUR home and search for yasnippet … u will get the following page
download the tarball from that page .. in my case the link to the tarball was
put the tarball in a convenient location and extract it to get an emacs-yasnippet directory. within that folder you will find 2 files: PKGBUILD and yasnippet.install
now from within the emacs-yasnippet directory run the following command
the -s flag will ensure that all dependencies are installed first.
when i ran the command i got the following error
$ makepkg -s
==> ERROR: Fakeroot must be installed if using the ‘fakeroot’ option
in the BUILDENV array in /etc/makepkg.conf.
which means that the fakeroot program is missing …
some more digging told me that i might be missing the base-devel group of packages
so i first have to install it
sudo pacman -Ss base-devel
this will install all the packages needed for building software.
now let me try running makepkg again …
…ok it was successful this time and now the folder contains the following files and folders
emacs-yasnippet-0.6.1c-2-any.pkg.tar.xz pkg PKGBUILD src yasnippet-0.6.1c.tar.bz2 yasnippet.install
all is fine now.. we will simply install now using pacman
sudo pacman -U emacs-yasnippet-0.6.1c-2-any.pkg.tar.xz
that is it you are done …
of course you must add the following in your .emacs to use yasnippet
(add-to-list 'load-path "/usr/share/emacs/site-lisp/yas") (require 'yasnippet) (yas/initialize) (yas/load-directory "/usr/share/emacs/site-lisp/yas/snippets")