• Quick Symbol Lookup

    From Lawrence D'Oliveiro@21:1/5 to All on Wed Mar 6 07:11:23 2024
    I know the etags command will extract symbol definitions and their
    locations from a specified set of source files, but nobody seems to
    have thought of storing this info in something like an SQLite
    database, for quick lookup and navigation to those definitions.

    In my collection of Emacs stuff <https://gitlab.com/ldo/emacs-prefs>,
    there is a Python script called project-tags, with an accompanying man
    page project-tags.1. This provides commands to (re)build the symbols
    database for selected source code projects etc. And there’s an Elisp
    function find-def, defined in project-tags.el, which invokes the
    project-tags program to do lookup of symbols, to take you straight to
    the right place in the right source file.

    As an example of the usefulness of this, consider the source code of
    Blender
    <https://projects.blender.org/blender/blender/wiki/Module:%20Core>.
    This consists of over a million lines of source code, spread across
    about 14,000 files. You will see a global variable called “G”
    referenced in a load of places; but where is it actually defined? With
    a tool like this, it’s not that hard to track down. ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)