Henry Baker <hbaker1 at pipeline.com> wrote:
In a galaxy far, far away, and a time long, long ago, it was possible
to conjure up the source code to any Lisp function by pressing
meta-. (meta-point).
Is this possible in any version of Maxima today?
There are several ways to do this. Many Lisp implementations have some
sort of machinery to record the location of loaded functions, but they
are all different, generally require some obscure option setup, and then
getting at the information depends on the programming environment.
Another way is to use Emacs tags files, if you are capable of running
Maxima under Emacs. (Yes, Henry, _you_ almost certainly are, and
probably know the rest of this paragraph, but others might not.) The
Emacs etags program will create a TAGS file indexing all the functions
in a set of source files, even over multiple languages, and M-. followed
by M-, with the cursor on any sort of name will successively visit all
the definitions with that name. M-x tags-search will very efficiently
search through all the indexed files finding all references to a regular
expression. This is valuable in finding all references (e.g. calls) to
a name.
All this works without involvement of the subject program. It doesn't
even need to be running.
If anyone is intrigued by all this, I could provide more instructions
about using etags. But heres a sketch:
In the top-level Maxima directory:
find . -name "*.lisp" | etags -
or maybe
(find . -name "*.lisp"; find . -name "*.[hc]") | etags -
In emacs M-x visit-tags-file<RET>, then enter the path to the TAGS file
created above.
Thereafter, when in a source buffer or a Lisp listener buffer, M-. on a
name will efficiently pop up a buffer showing the source file at the
correct location. M-x tags-search will successively (with M-,) visit
all references to a name.