Next: , Previous: Reference Headers, Up: Top

5 Getting Connected

In most cases, all that is necessary to begin using Supercite is to add the following to ~.emacs:

     (add-hook 'mail-citation-hook 'sc-cite-original)

For more details of the process, read on...

Hitting C-c C-y in your MUA's reply buffer yanks and cites the original message into the reply buffer. In reality, the citation of the original message is performed via a call through a configurable hook variable. The name of this variable has been agreed to in advance as part of the citation interface specification. By default this hook variable has a nil value, which the MUA recognizes to mean, “use your default citation function.” When you add Supercite's citation function to the hook, thereby giving the variable a non-nil value, it tells the MUA to run the hook via run-hooks instead of using the default citation.

Early in Supercite's development, the Supercite author, a few MUA authors, and some early Supercite users got together and agreed upon a standard interface between MUAs and citation packages (of which Supercite is currently the only known add-on :-). Supercite can probably be used with most Emacs MUAs, with a greater or lesser degree of effort.

To learn exactly how to connect Supercite to the software systems you are using, read the appropriate following sections. For details on the interface specifications, or if you are writing or maintaining an MUA, see Hints to MUA Authors.

The first thing that everyone should do, regardless of the MUA you are using is to set up Emacs so it will load Supercite at the appropriate time. This happens automatically if Supercite is distributed with your Emacs version. If not, you can set up an autoload for Supercite.

To do the latter, put the following in your .emacs file:

     (autoload 'sc-cite-original "supercite" nil t)

The function sc-cite-original is the top-level Supercite function designed to be run from the citation hook. It expects ‘point’ and ‘mark’ to be set around the region to cite, and it expects the original article's mail headers to be present within this region. Note that Supercite never touches any text outside this region. Note further that the region need not be active for sc-cite-original to do its job. See Hints to MUA Authors.

The other step in the getting connected process is to make sure your MUA calls sc-cite-original at the right time. As mentioned above, some MUAs handle this differently. Read the sections that follow pertaining to the MUAs you are using.

One final note. After Supercite is loaded into your Emacs session, it runs the hook sc-load-hook. You can put any customizations into this hook since it is only run once. This will not work, however, if your Emacs maintainer has put Supercite into your dumped Emacs image. In that case, you can use the sc-pre-hook variable, but this will get executed every time sc-cite-original is called. See Reply Buffer Initialization.