Instructions for integrating XDOC web pages with Emacs.
Preprocessor directives such as
(defun get-xdoc-table (world) (cdr (assoc-eq 'doc (table-alist 'xdoc world))))
Depending on your environment, it may be easy to configure your web browser so that clicking on these links will cause Emacs to directly open up the appropriate source file and jump to the named function.
The basic idea is:
The net effect is that clicking on these links will send you directly to the desired function in the source code. This is really slick if you can get it working.
The XDOC directory includes a file called
This file will be loaded automatically if you load the file of emacs utilities that comes with ACL2:
For emacs to make sense of the links you follow, it will need to have the appropriate tags tables loaded for all of the libraries you are using.
If you aren't familiar with tags, you basically just need to:
TAGS: $(wildcard *.lisp) etags *.lisp
(ignore-errors (visit-tags-table "/path/to/acl2/TAGS")) (ignore-errors (visit-tags-table "/path/to/acl2/books/xdoc/TAGS")) (ignore-errors (visit-tags-table "/path/to/my/stuff/TAGS"))This ensures that the relevant
(setq tags-revert-without-query t)which tells Emacs to go ahead and reload these files when they are rebuilt by Make, instead of prompting you if you want to reload them.
You can set things up so that links open up in new instances of Emacs, or in new buffers of an already-running Emacs.
If you want everything to open up in a new instance of Emacs, you can skip this section. But I prefer to use a single Emacs for everything, and just have links open up in new buffers.
This is quite easy. First, add
Next, to ensure everything is working properly, launch a separate terminal and type:
emacsclient --no-wait my-file
If all is well,
The last thing we need to do is instruct your web browser to send xdoc-link files to Emacs.
How to do this depends on your web browser and/or operating system. In some
cases it may be hard to pass command-line options to emacs directly, so you may
find it useful to use the script
The basic starting point is probably to try to click on an emacs link like