tags(3)
β¨ NAME β¨
tags β Generate Emacs TAGS file from Erlang source files π
π¦ DESCRIPTION π¦
okay so bestie, imagine you're deep in some giant project and you're like "where tf is this function defined" β that's literally what a TAGS file is for π Emacs uses it to find function and variable definitions in any source file in large projects.
This module? It generates a TAGS file from Erlang source files. And it recognises functions, records, and macro definitions. iconic, no notes π
πΈ Options πΈ
The functions in this module have an optional argument called Options. It's a list, and it can contain these elements:
{outfile, NameOfTAGSFile}β Create a TAGS file namedNameOfTAGSFile. π{outdir, NameOfDirectory}β Create a file namedTAGSin the directoryNameOfDirectory. β¨
The default behaviour, when you don't say otherwise, is to create a file named TAGS in the current directory. periodt π«Ά
π 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. slay π₯
tags:files(["foo.erl", "bar.erl", "baz.erl"], [{outdir, "../projectdir"}]).
This command will create a file named TAGS and place it in the directory ../projectdir. That file contains information about the functions, records, and macro definitions of the three files. ate π
π 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.
π DATA TYPES π
option() ::
{outfile, NameOfTAGSFile :: file:filename()} |
{outdir, NameOfDirectory :: file:filename()}.
π FUNCTIONS π
dir(Dir, Options) -> ok | error
when Dir :: file:filename(), Options :: [option()].
Create a TAGS file for all files in directory Dir. ποΈ
dirs(DirList, Options) -> ok | error
when DirList :: [file:filename()], Options :: [option()].
Create a TAGS file for all files in any directory in DirList. ποΈποΈ
file(File, Options) -> ok | error
when File :: file:filename(), Options :: [option()].
Create a TAGS file for the file File. π
files(FileList, Options) -> ok | error
when FileList :: [file:filename()], Options :: [option()].
Create a TAGS file for the files in the list FileList. πππ
root(Options) -> ok | error
when Options :: [option()].
Create a TAGS file covering all files in the Erlang distribution. π³
subdir(Dir, Options) -> ok | error
when Dir :: file:filename(), Options :: [option()].
Descend recursively into the directory Dir and create a TAGS file based on all files found. π§ (recursion bestie, it goes deep)
subdirs(DirList, Options) -> ok | error
when DirList :: [file:filename()], Options :: [option()].
Descend recursively into the directories in DirList and create a TAGS file based on all files found. π§π§
okay that's the whole thing, you're literally a TAGS girlie now π
this lil page is brought to you by Ericsson AB β it's the tools package, version 4.2.2, and yeah she's tags(3) π mwah, go tag something πβ¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms