tags (tools v3.5)
A TAGS
file is used by Emacs to find function and variable definitions in any source file in large projects. This module can generate a TAGS
file from Erlang source files. It recognises functions, records, and macro definitions.
OPTIONS
The functions above have an optional argument, Options
. It is a list which can contain the following elements:
{outfile, NameOfTAGSFile}
Create aTAGS
file namedNameOfTAGSFile
.{outdir, NameOfDirectory}
Create a file namedTAGS
in the directoryNameOfDirectory
.
The default behaviour is to create a file named TAGS
in the current directory.
Examples
tags:root([{outfile, "root.TAGS"}]).
This command will create a file named
root.TAGS
in the current directory. The file will contain references to all Erlang source files in the Erlang distribution.tags:files(["foo.erl", "bar.erl", "baz.erl"], [{outdir, "../projectdir"}]).
Here we create file named
TAGS
placed it in the directory../projectdir
. The file contains information about the functions, records, and macro definitions of the three files.
SEE ALSO
- Richard M. Stallman. GNU Emacs Manual, chapter "Editing Programs", section "Tag Tables". Free Software Foundation, 1995.
- Anders Lindgren. The Erlang editing mode for Emacs. Ericsson, 1998.
Link to this section Summary
Functions
Create a TAGS file for all files in directory Dir
.
Create a TAGS file for all files in any directory in DirList
.
Create a TAGS
file for the file File
.
Create a TAGS file for the files in the list FileList
.
Create a TAGS
file covering all files in the Erlang distribution.
Descend recursively down the directory Dir
and create a TAGS
file based on all files found.
Descend recursively down all the directories in DirList
and create a TAGS
file based on all files found.
Link to this section Functions
dir/1
Specs
dir(Dir) -> ok | error when Dir :: file:filename().
Create a TAGS file for all files in directory Dir
.
dir/2
Specs
dir(Dir, Options) -> ok | error when Dir :: file:filename(), Options :: [option()].
dirs/1
Specs
dirs(DirList) -> ok | error when DirList :: [file:filename()].
Create a TAGS file for all files in any directory in DirList
.
dirs/2
Specs
dirs(DirList, Options) -> ok | error when DirList :: [file:filename()], Options :: [option()].
file/1
Specs
file(File) -> ok | error when File :: file:filename().
Create a TAGS
file for the file File
.
file/2
Specs
file(File, Options) -> ok | error when File :: file:filename(), Options :: [option()].
files/1
Specs
files(FileList) -> ok | error when FileList :: [file:filename()].
Create a TAGS file for the files in the list FileList
.
files/2
Specs
files(FileList, Options) -> ok | error when FileList :: [file:filename()], Options :: [option()].
root/0
Specs
root() -> ok | error.
Create a TAGS
file covering all files in the Erlang distribution.
root/1
Specs
root(Options) -> ok | error when Options :: [option()].
subdir/1
Specs
subdir(Dir) -> ok | error when Dir :: file:filename().
Descend recursively down the directory Dir
and create a TAGS
file based on all files found.
subdir/2
Specs
subdir(Dir, Options) -> ok | error when Dir :: file:filename(), Options :: [option()].
subdirs/1
Specs
subdirs(DirList) -> ok | error when DirList :: [file:filename()].
Descend recursively down all the directories in DirList
and create a TAGS
file based on all files found.
subdirs/2
Specs
subdirs(DirList, Options) -> ok | error when DirList :: [file:filename()], Options :: [option()].