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

Reply Buffer Initialization

Executing sc-cite-original performs the following initializations of the reply buffer:

  1. Runs sc-pre-hook. You can set this variable to execute any function. It will be called before supercite does anything. You could conceivably use this hook to set certain supercite variables based on the reply buffer's mode or name (i.e., to do something different based on whether you are replying or following up to an article).
  2. Gets information from the mail headers. All previously retrieved information keys are deleted, then the mail headers in the body of the text are scanned. Information key-value pairs are created for each header found. For example, such things as the author's name and email address are extracted, and the attribution and citation strings are also derived at this point. If the variable sc-confirm-always-p is set, supercite will confirm the selected attribution string with you at this time before it uses it in the citation string.
  3. "Nukes" the mail headers. If the variable sc-nuke-mail-headers-p is non-nil, the mail headers in the body of the message, will be deleted. As mentioned before, supercite does nothing to the mail headers above the mail-header-separator line. You can control which mail headers are kept and which are deleted by modifying the variable sc-header-nuke-list. This variable contains a list of mail headers to remove, where each entry in the list is a self contained regular expression unit. These units will be concat'ed together into one big regular expression of the form:
    "^header:\\|^header:\\|...^header:"
    
    The entries in sc-header-nuke-list correspond to the individual header's in the above example, and the entries are case insensitive. If sc-header-nuke-list is nil, no headers will be removed (however, it is better to use sc-nuke-mail-headers-p for this). The default value of sc-header-nuke-list is:
    '("via" "origin" "status" "received" "remailed" "cc" "sender" "replied"
      "organization" "keywords" "distribution" "xref" "references" "expires"
      "approved" "summary" "precedence" "subject" "newsgroup[s]?"
      "\\(followup\\|apparently\\|errors\\|\\(\\(in-\\)?reply\\)?-\\)?to"
      "x-[a-z0-9-]+" "[a-z-]*message-id" "\\(summary-\\)?line[s]"
      "\\(\\(return\\|reply\\)-\\)?path" "\\(posted-\\)?date"
      "\\(mail-\\)?from")
    
  4. Cites the message body. If the variable sc-all-but-cite-p is non-nil, the message will not be cited. This way, you can have supercite initialize itself and do everything but cite the text. This would be useful if you were citing a very long article (which may take a bit of time), or for some unique citing formats (i.e., mixed text and code, with different filling and citing requirements).
  5. "Leaches" onto the current buffer. Because supercite is intended to run with a number of different readers, many of which will have been designed without knowledge of supercite, and because the supercite package adds functionality to these subsystems, it must be somewhat subversive in the way it adds its functions to the keymaps of the current buffers, and its documentation to the documentation strings of the major-mode of the reply buffer. See section Keymaps for more information on how supercite sets the keymap of the reply buffer and how you can change the default key bindings. Once supercite has attached itself to the reply buffer, getting major-mode help, by typing C-h m (describe-mode) will print out not only the original mode documentation string, but also supercite's documentation string. This documentation will describe the available supercite commands and their key bindings.
  6. Runs sc-post-hook. This variable is very similar to sc-pre-hook, except that it runs after sc-cite-original is finished. This hook is provided mostly for completeness and backward compatibility. Perhaps it could be used to reset certain variables set in sc-pre-hook.

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