tags(3erl)

πŸ“¦
version 25.3.2.8 Β· 3 versions
, in debian bookworm, ubuntu noble

🌸 NAME 🌸

okay bestie, meet tags β€” from the Erlang module definition page (tags(3erl)), and its whole job is generating an Emacs TAGS file from Erlang source files. it’s giving β€œdefinition index but make it cute,” and honestly? iconic. πŸ’…


✨ DESCRIPTION ✨

so a TAGS file is what Emacs uses to find function and variable definitions in any source file in large projects. this module can generate a TAGS file from Erlang source files, and it recognises functions, records, and macro definitions. periodt. πŸ’–


πŸ› οΈ EXPORTS πŸ› οΈ

here’s the whole roster, no skips, fr fr:

πŸ’… file(File) -> ok | error / file(File, Options) -> ok | error

file(File) -> ok | error
file(File, Options) -> ok | error

types:

File = file:filename()
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

creates a TAGS file for the file File. slay. ✨

πŸŽ€ files(FileList) -> ok | error / files(FileList, Options) -> ok | error

files(FileList) -> ok | error
files(FileList, Options) -> ok | error

types:

FileList = [file:filename()]
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

creates a TAGS file for the files in the list FileList. very β€œbatch process my beloveds.” πŸ’–

πŸ¦‹ dir(Dir) -> ok | error / dir(Dir, Options) -> ok | error

dir(Dir) -> ok | error
dir(Dir, Options) -> ok | error

types:

Dir = file:filename()
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

creates a TAGS file for all files in directory Dir. yes bestie, the whole directory. no crumbs. πŸ’…

🌈 dirs(DirList) -> ok | error / dirs(DirList, Options) -> ok | error

dirs(DirList) -> ok | error
dirs(DirList, Options) -> ok | error

types:

DirList = [file:filename()]
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

creates a TAGS file for all files in any directory in DirList. multi-directory main character energy. πŸ‘‘

🧚 subdir(Dir) -> ok | error / subdir(Dir, Options) -> ok | error

subdir(Dir) -> ok | error
subdir(Dir, Options) -> ok | error

types:

Dir = file:filename()
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

descends recursively down the directory Dir and creates a TAGS file based on all files found. it’s going deep, bestie. πŸŒ€

πŸ“ subdirs(DirList) -> ok | error / subdirs(DirList, Options) -> ok | error

subdirs(DirList) -> ok | error
subdirs(DirList, Options) -> ok | error

types:

DirList = [file:filename()]
Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

descends recursively down all the directories in DirList and creates a TAGS file based on all files found. recursive queen behavior. πŸ’–

⭐ root() -> ok | error / root(Options) -> ok | error

root() -> ok | error
root(Options) -> ok | error

types:

Options = [option()]
option() =
    {outfile, NameOfTAGSFile :: file:filename()} |
    {outdir, NameOfDirectory :: file:filename()}

creates a TAGS file covering all files in the Erlang distribution. like, the whole entire Erlang distribution. no cap. 🌍


πŸ’– OPTIONS πŸ’–

the functions above have an optional argument, Options. it’s a list, and it can contain these little cuties:

  • {outfile, NameOfTAGSFile} β€” create a TAGS file named NameOfTAGSFile. πŸŽ€
  • {outdir, NameOfDirectory} β€” create a file named TAGS in the directory NameOfDirectory. ✨

the default behaviour is to create a file named TAGS in the current directory. lowkey convenient, highkey iconic. πŸ’…


πŸŽ‰ 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. go off, root. 🌈

  • tags:files(["foo.erl", "bar.erl", "baz.erl"], [{outdir, "../projectdir"}]).

here we create a file named TAGS and place it in the directory ../projectdir. the file contains information about the functions, records, and macro definitions of the three files. three-file friend group, slay. 🫢


πŸ‘€ 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.

xoxo, sign-off from Ericsson AB πŸ’– version tools 3.5.3 πŸ’– manual tags(3erl). that’s the whole page, bestie β€” now go make Emacs proud. πŸŽ€βœ¨