Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working through the "Emacs Lisp Intro" book within Emacs 23.4.1 on Debian Wheezy (CrunchBang Waldorf).

Section 4.1 discusses the find-tags command and the TAGS file. Instructions are included to build/install the TAGS file if necessary.

How do I do this in Debian? The folders mentioned are not present on my system and I cannot locate a TAGS file.

I'm not sure that I have the source of Emacs installed? I installed it using apt-get. My sources.list file does not include any deb-src lines, if that is relevant.

share|improve this question
Try apt-get install ctags. –  Kevin Dec 9 '12 at 0:35

2 Answers 2

daniel@protein:~$ apt-file search {ctags,etags} | grep ctags | grep /usr/bin
emacs23-bin-common: /usr/bin/ctags.emacs23
exuberant-ctags: /usr/bin/ctags-exuberant

I'm on ubuntu, but I'm reasonably sure they're in the same packages.

To create the TAGS file you'll want something like this:

$ find . -type f -iname "*.php" | xargs ctags --declarations
$ find . -type f -iname "*.ctp" | xargs ctags --lang="php" --declarations --append

Both commands have very similar arguments, but check the man page to make sure.

share|improve this answer
Thanks, but I think the problem lay elsewhere, as detailed in my answer. –  SabreWolfy Dec 9 '12 at 6:04
No worries, and nice work on the real solution. Upvoted. –  Daniel Dec 9 '12 at 12:23
up vote 1 down vote accepted

This required installing the emacs23-el package for the Emacs source code and then building the TAGS file in /usr/share/emacs/23.4/lisp with:

$ etags *.el.gz

as these files are in .gz format. However, find-tags cannot read these and attempts to read the .el file. This can be solved, as explained here, by adding the following to ~/.emacs:

(require 'jka-compr)

After this, it is possible to enter find-tags and then mark-whole-buffer, as discussed in the example in the "Emacs Lisp Intro" mentioned in the question.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.