Next: , Previous: , Up: rec-mode: an Emacs mode for editing recfiles   [Contents][Index]


6 Cross referencing

Besides navigation, edition and selection, rec-mode provides another powerful feature for recfiles, known as cross referencing. In short, cross referencing is an Emacs term for listing various kinds of search results for certain keywords an identifiers. For records, this could mean the following:

  1. Finding the referred record of a foreign key. If a field is a key referring to another record, you can jump to that record.
  2. Finding the referents of a record if it is a foreign key.
  3. Finding records that match a certain selection expression or fast string search.

Emacs provides a unified interface for this called Xref, see See Xref in GNU Emacs Manual. rec-mode implements a custom xref backend for the purpose of easier navigating between records.

Regardless of functionality, if there are more than one search result, Xref searches present their results in a special XREF buffer. It is an ordered list of results, similar to compilation mode (see Compilation Mode in GNU Emacs Manual). Xref makes it easy to navigate between search results, as it binds the next-error functionality, letting you navigate the results even if you are outside the rec mode buffer.