tags(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

✨ 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 named NameOfTAGSFile. πŸ’–
  • {outdir, NameOfDirectory} β€” Create a file named TAGS in the directory NameOfDirectory. ✨

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