Go to the first, previous, next, last section, table of contents.

Hints to Reader Authors

In June of 1989, some discussion was held between the various reader authors, the supercite author, and other supercite users. These discussions centered around the need for a standard interface between these readers and supercite (or any future readers, or supercite-like packages). This interface was formally proposed by Martin Neitzel on Fri, 23 Jun 89, in a mail message to the supercite mailing list:

	Martin> Each news/mail-reader should provide a form of
	Martin> mail-yank-original that

	Martin> 1: inserts the original message incl. header into the
	Martin>    reply buffer; no indentation/prefixing is done, the header
	Martin>    tends to be a "full blown" version rather than to be
	Martin>    stripped down.

	Martin> 2: `point' is at the start of the header, `mark' at the
	Martin>    end of the message body.

	Martin> 3: (run-hooks 'mail-yank-hooks)

	Martin> [Supercite] should be run as such a hook and merely
	Martin> rewrite the message.  This way it isn't anymore
	Martin> [supercite]'s job to gather the original from obscure
	Martin> sources. [...]

This proposal was adopted, and thus supercite 2.2 conforms to this interface, as does VM (versions 4.37 and beyond, including versions 5.xx), as well as MH-E 3.7 which is distributed with emacs 18.57.

If you are writing a new reader package, or updating an existing reader package, you should make it conform to this interface so that your users will be able to link supercite easily and seamlessly. To do this, when setting up a reply or forward buffer, your reader should follow these steps (outlined above and discussed in greater detail below):

  1. Insert the original message, including the mail headers into the reply buffer. At this point you should not modify the raw text in any way, and you should place all the original headers into the body of the reply. This means that many of the mail headers will be duplicated, one copy above the mail-header-separator line and one copy below, however there will probably be more headers below this line.
  2. Set "point" to the beginning of the line containing the first mail header in the body of the reply. Set "mark" to the end of the message text. It is very important that the region be set around the text supercite is to modify and that the mail headers are within this region. Supercite will not look at or modify anything outside the region, and anything within the region is fair game, so don't put anything that must remain unchanged inside the region.
  3. Run the hook mail-yank-hooks. You will probably want to provide some kind of default citation functions in cases where the user does not have supercite installed. By default, your reader should set mail-yank-hooks to execute this default citation function. Users who want to use supercite can then set mail-yank-hooks to sc-cite-original.

If you do all this you will not need to provide overloading routines and your reader will join the ranks of those subsystems who conform to this interface "out of the box."


Go to the first, previous, next, last section, table of contents.