This chapter describes some support tools that work with the other ID programs.
The source distribution comes with a file named `gid.el'. This is
a GNU emacs interface to the gid
tool. If you put the file where
emacs can find it (somewhere in your EMACSLOADPATH
) and put
(autoload 'gid "gid" nil t)
in your `.emacs' file, you will
be able to invoke the gid
function using M-x gid.
This function prompts you with the word the cursor is on. If you want to search for a different pattern, simply delete the line and type the pattern of interest.
It runs gid
in a *compilation*
buffer, so the normal
next-error
function can be used to visit all the places the
identifier is found (see section `Compilation' in The GNU Emacs Manual).
-f<file>
] file1 [file2]
-f<file>
file1
file2
The fid
program provides an inverse query. Instead of listing
files containing some identifier, it lists the identifiers found in
a file.
-s<directory>
] [-r<directory>
] [-S<scanarg>
] files...
-s
, -r
, and -S
arguments to idx
are identical to the same arguments on mkid
(see section Mkid Command Line Options).
The idx
command is more of a test frame for scanners than a tool
designed to be independently useful. It takes the same scanner arguments
as mkid
, but rather than building a database, it prints the
identifiers found to stdout, one per line. You can use it to try
out a scanner on a sample file to make sure it is extracting the
identifiers you believe it should extract.