Access Keys:
Skip to content (Access Key - 0)

Using Tags in Emacs

An Emacs feature called "Tags" provides an indexing mechanism for Lisp, C, or
Fortran source files. Before using "Tags" in Emacs, you need to run the "etags' command to specify the files for which you want to use tags. For example, if you are writing a C program that has two source files,
named 'file1.c' and 'file2.c', you would type:

joeuser@athena:~$ etags file1.c file2.c

  

The 'etags' command creates a file named 'TAGS', which is used by the Emacs
"Tags" functions.

Now you can use the "Tags" functions to locate tags (function or routine
names) in your source code.

Some of the useful "Tags" functions are:

M-. Find first definition of a tag.
M-x tags-search Search for a specified regular expression through the files in the selected tag table.
M-, Find next definition of previous tag, next occurrence of specified regular expression.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

July 23, 2021

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
olc-emacs olc-emacs Delete
emacs emacs Delete
tags tags Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki