Previous: The Built-in Header Rewrite Functions, Up: Reference Headers

4.2 Electric References

By default, when Supercite cites the original message for the first time, it just goes ahead and inserts the reference header indexed by sc-preferred-header-style. However, you may want to select different reference headers based on the type of reply or forwarding you are doing. You may also want to preview the reference header before deciding whether to insert it into the reply buffer or not. Supercite provides an optional electric reference mode which you can drop into to give you this functionality.

If the variable sc-electric-references-p is non-nil, Supercite will bring up an electric reference mode buffer and place you into a recursive edit. The electric reference buffer is read-only, so you cannot directly modify the reference text until you exit electric references and insert the text into the reply buffer. But you can cycle through all the reference header rewrite functions in your sc-rewrite-header-list.

You can also set a new preferred header style, jump to any header, or jump to the preferred header. The header will be shown in the electric reference buffer and the header index and function name will appear in the echo area.

The following commands are available while in electric reference mode (shown here with their default key bindings):

sc-eref-next (n)
Displays the next reference header in the electric reference buffer. If the variable sc-electric-circular-p is non-nil, invoking sc-eref-next while viewing the last reference header in the list will wrap around to the first header.
sc-eref-prev (p)
Displays the previous reference header in the electric reference buffer. If the variable sc-electric-circular-p is non-nil, invoking sc-eref-prev will wrap around to the last header.
sc-eref-goto (g)
Goes to a specified reference header. The index (into the sc-rewrite-header-list) can be specified as a numeric argument to the command. Otherwise, Supercite will query you for the index in the minibuffer.
sc-eref-jump (j)
Display the preferred reference header, i.e., the one indexed by the current value of sc-preferred-header-style.
sc-eref-setn (s)
Set the preferred reference header (i.e., sc-preferred-header-style) to the currently displayed header.
sc-eref-exit (C-j, <RET>, and <ESC C-c>)
Exit from electric reference mode and insert the current header into the reply buffer.
sc-eref-abort (q, x)
Exit from electric reference mode without inserting the current header.

Supercite will execute the hook sc-electric-mode-hook before entering electric reference mode.