1This is Info file ../info/sc, produced by Makeinfo-1.55 from the input 2file sc.texi. 3 4 This document describes the Supercite Version 3.1 package for citing 5and attributing the replies for various GNU Emacs mail and news reading 6subsystems. 7 8 Copyright (C) 1993 Barry A. Warsaw 9 10 Permission is granted to make and distribute verbatim copies of this 11manual provided the copyright notice and this permission notice are 12preserved on all copies. 13 14 15File: sc, Node: Attribution Preferences, Next: Anonymous Attributions, Prev: Selecting an Attribution, Up: Selecting an Attribution 16 17Attribution Preferences 18======================= 19 20 When you cite an original message, you can tell Supercite which part 21of the author's name you would prefer it to use as the attribution. The 22variable `sc-preferred-attribution-list' controls this; it contains 23keys which are matched against the attribution alist in the given order. 24The first value of a key that produces a non-`nil', non-empty string 25match is used as the attribution string, and if no keys match, a 26secondary mechanism is used to generate the attribution. *Note 27Anonymous Attributions::. 28 29 The following preferences are always available in the attribution 30alist (barring error): 31 32`"emailname"' 33 the author's email terminus. 34 35`"initials"' 36 the author's initials. 37 38`"firstname"' 39 the author's first name. 40 41`"lastname"' 42 the author's last name. 43 44`"middlename-1"' 45 the author's first middle name. 46 47`"sc-lastchoice"' 48 the last attribution string you have selected. This is useful when 49 you recite paragraphs in the reply. 50 51`"sc-consult"' 52 consults the customizable list `sc-attrib-selection-list' which can 53 be used to select special attributions based on the value of any 54 info key. See below for details. 55 56`"x-attribution"' 57 the original author's suggestion for attribution string choice. 58 See below for details. 59 60 Middle name indexes can be any positive integer greater than zero, 61though it is unlikely that many authors will have more than one middle 62name, if that many. 63 64 At this point, let me digress into a discussion of etiquette. It is 65my belief that while the style of the citations is a reflection of the 66personal tastes of the replier (i.e., you), the attribution selection is 67ultimately the personal choice of the original author. In a sense it is 68his or her "net nickname", and therefore the author should have some 69say in the selection of attribution string. Imagine how you would feel 70if someone gave you a nickname that you didn't like? 71 72 For this reason, Supercite recognizes a special mail header, 73`X-Attribution:', which if present, tells Supercite the attribution 74string preferred by the original author. It is the value of this header 75that is associated with the `"x-attribution"' key in the attribution 76alist. Currently, you can override the preference of this key by 77changing `sc-preferred-attribution-list', but that isn't polite, and in 78the future Supercite may hard-code this. For now, it is suggested that 79if you change the order of the keys in this list, that 80`"x-attribution"' always be first, or possible second behind only 81`"sc-lastchoice"'. This latter is the default. 82 83 The value `"sc-consult"' in `sc-preferred-attribution-list' has a 84special meaning during attribution selection. When Supercite 85encounters this preference, it begins processing a customizable list of 86attributions, contained in the variable `sc-attrib-selection-list'. 87Each element in this list contains lists of the following form: 88 89 (INFOKEY ((REGEXP . ATTRIBUTION) 90 (REGEXP . ATTRIBUTION) 91 (...))) 92 93where INFOKEY is a key for `sc-mail-field' and REGEXP is a regular 94expression to match against the INFOKEY's value. If REGEXP matches the 95INFOKEY's value, the ATTRIBUTION is used as the attribution string. 96Actually, ATTRIBUTION can be a string or a list; if it is a list, it is 97`eval'uated and the return value (which must be a string), is used as 98the attribution. 99 100 This can be very useful for when you are replying to net 101acquaintances who do not use the `X-Attribution:' mail header. You may 102know what nickname they would prefer to use, and you can set up this 103list to match against a specific mail field, e.g., `From:', allowing you 104to cite your friend's message with the appropriate attribution. 105 106 107File: sc, Node: Anonymous Attributions, Next: Author Names, Prev: Attribution Preferences, Up: Selecting an Attribution 108 109Anonymous Attributions 110====================== 111 112 When the author's name cannot be found in the `From:' mail header, a 113fallback author name and attribution string must be supplied. The 114fallback author name is contained in the variable 115`sc-default-author-name' and the fallback attribution string is 116contained in the variable `sc-default-attribution'. Default values for 117these variables are `"Anonymous"' and `"Anon"', respectively. Note that 118in most circumstances, getting the default author name or attribution 119is a sign that something is set up incorrectly. 120 121 Also, if the preferred attribution, which you specified in your 122`sc-preferred-attribution-alist' variable cannot be found, a secondary 123method can be employed to find a valid attribution string. The variable 124`sc-use-only-preference-p' controls what happens in this case. If the 125variable's value is non-`nil', then `sc-default-author-name' and 126`sc-default-attribution' are used, otherwise, the following steps are 127taken to find a valid attribution string, and the first step to return 128a non-`nil', non-empty string becomes the attribution: 129 130 1. Use the last selected attribution, if there is one. 131 132 2. Use the value of the `"x-attribution"' key. 133 134 3. Use the author's first name. 135 136 4. Use the author's last name. 137 138 5. Use the author's initials. 139 140 6. Find the first non-`nil', non-empty attribution string in the 141 attribution alist. 142 143 7. `sc-default-attribution' is used. 144 145 Once the attribution string has been automatically selected, a 146number of things can happen. If the variable `sc-confirm-always-p' is 147non-`nil', you are queried for confirmation of the chosen attribution 148string. The possible values for completion are those strings in the 149attribution alist, however you are not limited to these choices. You 150can type any arbitrary string at the confirmation prompt. The string 151you enter becomes the value associated with the `"sc-lastchoice"' key 152in the attribution alist. 153 154 Once an attribution string has been selected, Supercite will force 155the string to lower case if the variable `sc-downcase-p' is non-`nil'. 156 157 Two hook variables provide even greater control of the attribution 158selection process. The hook `sc-attribs-preselect-hook' is run before 159any attribution is selected. Likewise, the hook 160`sc-attribs-postselect-hook' is run after the attribution is selected 161(and the corresponding citation string is built), but before these 162values are committed for use by Supercite. During the post-selection 163hook, the local variables `attribution' and `citation' are bound to the 164appropriate strings. By changing these variables in your hook 165functions, you change the attribution and citation strings used by 166Supercite. One possible use of this would be to override any 167automatically derived attribution string when it is only one character 168long; e.g. you prefer to use `"initials"' but the author only has one 169name. 170 171 172File: sc, Node: Author Names, Next: Configuring the Citation Engine, Prev: Anonymous Attributions, Up: Selecting an Attribution 173 174Author Names 175============ 176 177 Supercite employs a number of heuristics to decipher the author's 178name based on value of the `From:' mail field of the original message. 179Supercite can recognize almost all of the common `From:' field formats 180in use. If you encounter a `From:' field that Supercite cannot parse, 181please report this bug. *Note The Supercite Mailing List::. 182 183 There are a number of Supercite variables that control how author 184names are extracted from the `From:' header. Some headers may contain a 185descriptive title as in: 186 187 From: computer!speedy!doe (John Xavier-Doe -- Decent Hacker) 188 189 Supercite knows which part of the `From:' header is email address 190and which part is author name, but in this case the string `"Decent 191Hacker"' is not part of the author's name. You can tell Supercite to 192ignore the title, while still recognizing hyphenated names through the 193use of a regular expression in the variable `sc-titlecue-regexp'. This 194variable has the default value of `"\\\\s +-+\\\\s +"'. Any text after 195this regexp is encountered is ignored as noise. 196 197 Some `From:' headers may contain extra titles in the name fields not 198separated by a title cue, but which are nonetheless not part of the 199author's name proper. Examples include the titles "Dr.", "Mr.", "Ms.", 200"Jr.", "Sr.", and "III" (e.g., Thurston Howe, the Third). Also, some 201companies prepend or append the name of the division, organization, or 202project on the author's name. All of these titles are noise which 203should be ignored. The variable `sc-name-filter-alist' is used for 204this purpose. As implied by its name, this variable is an association 205list, where each element is a cons cell of the form: 206 207 (REGEXP . POSITION) 208 209where REGEXP is a regular expression that is matched (using 210`string-match') against each element of the `From:' field's author 211name. POSITION is a position indicator, starting at zero. Thus to 212strip out all titles of "Dr.", "Mr.", etc. from the name, 213`sc-name-filter-alist' would have an entry such as: 214 215 ("^\\(Mr\\|Mrs\\|Ms\\|Dr\\)[.]?$" . 0) 216 217which only removes them if they appear as the first word in the name. 218The position indicator is an integer, or one of the two special symbols 219`last' or `any'. `last' always matches against the last word in the 220name field, while `any' matches against every word in the name field. 221 222 223File: sc, Node: Configuring the Citation Engine, Next: Using Regi, Prev: Author Names, Up: Top 224 225Configuring the Citation Engine 226******************************* 227 228 At the heart of Supercite is a regular expression interpreting engine 229called "Regi". Regi operates by interpreting a data structure called a 230Regi-frame (or just "frame"), which is a list of Regi-entries (or just 231"entry"). Each entry contains a predicate, typically a regular 232expression, which is matched against a line of text in the current 233buffer. If the predicate matches true, an associated expression is 234`eval'uated. In this way, an entire region of text can be transformed 235in an *awk*-like manner. Regi is used throughout Supercite, from mail 236header information extraction, to header nuking, to citing text. 237 238* Menu: 239 240* Using Regi:: 241* Frames You Can Customize:: 242 243 While the details of Regi are discussed below (*note Using Regi::.), 244only those who wish to customize certain aspects of Supercite need 245concern themselves with it. It is important to understand though, that 246any conceivable citation style that can be described by a regular 247expression can be recognized by Supercite. This leads to some 248interesting applications. For example, if you regularly recieve email 249from a co-worker that uses an uncommon citation style (say one that 250employs a `|' or `}' character at the front of the line), it is 251possible for Supercite to recognize this and *coerce* the citation to 252your preferred style, for consistency. In theory, it is possible for 253Supercite to recognize such things as uuencoded messages or C code and 254cite or fill those differently than normal text. None of this is 255currently part of Supercite, but contributions are welcome! 256 257 258File: sc, Node: Using Regi, Next: Frames You Can Customize, Prev: Configuring the Citation Engine, Up: Configuring the Citation Engine 259 260Using Regi 261========== 262 263 Regi works by interpreting frames with the function 264`regi-interpret'. A frame is a list of arbitrary size where each 265element is a entry of the following form: 266 267 (PRED FUNC [NEGATE-P [CASE-FOLD-SEARCH]]) 268 269 Regi starts with the first entry in a frame, evaluating the PRED of 270that entry against the beginning of the line that `point' is on. If 271the PRED evaluates to true (or false if the optional NEGATE-P is 272non-`nil'), then the FUNC for that entry is `eval'uated. How 273processing continues is determined by the return value for FUNC, and is 274described below. If PRED was false the next entry in the frame is 275checked until all entries have been matched against the current line. 276If no entry matches, `point' is moved forward one line and the frame is 277reset to the first entry. 278 279 PRED can be a string, a variable, a list or one of the following 280symbols: `t', `begin', `end', or `every'. If PRED is a string, or a 281variable or list that `eval'uates to a string, it is interpreted as a 282regular expression. This regexp is matched against the current line, 283from the beginning, using `looking-at'. This match folds case if the 284optional CASE-FOLD-SEARCH is non-`nil'. If PRED is not a string, or 285does not `eval'uate to a string, it is interpreted as a binary value 286(`nil' or non-`nil'). 287 288 The four special symbol values for PRED are recognized: 289 290`t' 291 Always produces a true outcome. 292 293`begin' 294 Always executed before the frame is interpreted. This can be used 295 to initialize some global variables for example. 296 297`end' 298 Always executed after frame interpreting is completed. This can be 299 used to perform any necessary post-processing. 300 301`every' 302 Executes whenever the frame is reset, usually after the entire 303 frame has been matched against the current line. 304 305 Note that NEGATE-P and CASE-FOLD-SEARCH are ignored if PRED is one 306of these special symbols. Only the first occurance of each symbol in a 307frame is used; any duplicates are ignored. Also note that for 308performance reasons, the entries associated with these symbols are 309removed from the frame during the main interpreting loop. 310 311 Your FUNC can return certain values which control continued Regi 312processing. By default, if your FUNC returns `nil' (as it should be 313careful to do explicitly), Regi will reset the frame to the first 314entry, and advance `point' to the beginning of the next line. If a 315list is returned from your function, it can contain any combination of 316the following elements: 317 318the symbol `continue' 319 This tells Regi to continue processing entries after a match, 320 instead of reseting the frame and moving `point'. In this way, 321 lines of text can have multiple matches, but you have to be 322 careful to avoid entering infinite loops. 323 324the symbol `abort' 325 This tells Regi to terminate frame processing. However, any `end' 326 entry is still processed. 327 328the list `(frame . NEWFRAME)' 329 This tells Regi to substitute NEWFRAME as the frame it is 330 interpreting. In other words, your FUNC can modify the Regi frame 331 on the fly. NEWFRAME can be a variable containing a frame, or it 332 can be the frame in-lined. 333 334the list `(step . STEP)' 335 Tells Regi to move STEP number of lines forward as it continues 336 processing. By default, Regi moves forward one line. STEP can be 337 zero or negative of course, but watch out for infinite loops. 338 339 During execution of your FUNC, the following variables will be 340temporarily bound to some useful information: 341 342`curline' 343 The current line in the buffer that Regi is `looking-at', as a 344 string. 345 346`curframe' 347 The current frame being interpreted. 348 349`curentry' 350 The current frame entry being interpreted. 351 352 353File: sc, Node: Frames You Can Customize, Next: Post-yank Formatting Commands, Prev: Using Regi, Up: Configuring the Citation Engine 354 355Frames You Can Customize 356======================== 357 358 As mentioned earlier, Supercite uses various frames to perform 359certain jobs such as mail header information extraction and mail header 360nuking. However, these frames are not available for you to customize, 361except through abstract interfaces such as `sc-nuke-mail-header', et al. 362 363 However, the citation frames Supercite uses provide a lot of 364customizing power and are thus available to you to change to suit your 365needs. The workhorse of citation is the frame contained in the variable 366`sc-default-cite-frame'. This frame recognizes many situations, such 367as blank lines, which it interprets as paragraph separators. It also 368recognizes previously cited nested and non-nested citations in the 369original message. By default it will coerce non-nested citations into 370your preferred citation style, and it will add a level of citation to 371nested citations. It will also simply cite uncited lines in your 372preferred style. 373 374 In a similar vein, there are default frames for "unciting" and 375"reciting", contained in the variables `sc-default-uncite-frame' and 376`sc-default-recite-frame' respectively. 377 378 As mentioned earlier (*note Recognizing Citations::.), citations are 379recognized through the values of the regular expressions 380`sc-citation-root-regexp', et al. To recognize odd styles, you could 381modify these variables, or you could modify the default citing frame. 382Alternatively, you could set up association lists of frames for 383recognizing specific alternative forms. 384 385 For each of the actions - citing, unciting, and reciting - an alist 386is consulted to find the frame to use (`sc-cite-frame-alist', 387`sc-uncite-frame-alist', and `sc-recite-frame-alist' respectively). 388These frames can contain alists of the form: 389 390 ((INFOKEY (REGEXP . FRAME) (REGEXP . FRAME) ...) 391 (INFOKEY (REGEXP . FRAME) (REGEXP . FRAME) ...) 392 (...)) 393 394 Where INFOKEY is a key suitable for `sc-mail-field', REGEXP is a 395regular expression which is `string-match''d against the value of the 396`sc-mail-field' key, and FRAME is the frame to use if a match occurred. 397FRAME can be a variable containing a frame or a frame in-lined. 398 399 When Supercite is about to cite, uncite, or recite a region, it 400consults the appropriate alist and attempts to find a frame to use. If 401one is not found from the alist, then the appropriate default frame is 402used. 403 404 405File: sc, Node: Post-yank Formatting Commands, Next: Citing Commands, Prev: Frames You Can Customize, Up: Top 406 407Post-yank Formatting Commands 408***************************** 409 410 Once the original message has been yanked into the reply buffer, and 411`sc-cite-original' has had a chance to do its thing, a number of useful 412Supercite commands will be available to you. Since there is wide 413variety in the keymaps that MUAs set up in their reply buffers, it is 414next to impossible for Supercite to properly sprinkle its commands into 415the existing keymap. For this reason Supercite places its commands on a 416separate keymap, putting this keymap onto a prefix key in the reply 417buffer. You can customize the prefix key Supercite uses by changing the 418variable `sc-mode-map-prefix'. By default, the `sc-mode-map-prefix' is 419`C-c C-p'; granted, not a great choice, but unfortunately the best 420general solution so far. In the rest of this chapter, we'll assume 421you've installed Supercite's keymap on the default prefix. 422 423* Menu: 424 425* Citing Commands:: 426* Insertion Commands:: 427* Variable Toggling Shortcuts:: 428* Mail Field Commands:: 429* Miscellaneous Commands:: 430 431 432File: sc, Node: Citing Commands, Next: Insertion Commands, Prev: Post-yank Formatting Commands, Up: Post-yank Formatting Commands 433 434Commands to Manually Cite, Recite, and Uncite 435============================================= 436 437 Probably the three most common post-yank formatting operations that 438you will perform will be the manual citing, reciting, and unciting of 439regions of text in the reply buffer. Often you may want to recite a 440paragraph to use a nickname, or manually cite a message when setting 441`sc-cite-region-limit' to `nil'. The following commands perform these 442functions on the region of text between `point' and `mark'. Each of 443them sets the "undo boundary" before modifying the region so that the 444command can be undone in the standard Emacs way. 445 446 A quick note about Emacs 19. Unlike in Emacs 18, the region 447delimited by `point' and `mark' can have two states. It can be 448"active" or "inactive". Although the FSF Emacs 19 and Lucid Emacs 19 449use different terminology and functions, both employ the same 450convention such that when the region is inactive, commands that modify 451the region should generate an error. The user needs to explicitly 452activate the region before successfully executing the command. All 453Supercite commands conform to this convention. 454 455 Here is the list of Supercite citing commands: 456 457`sc-cite-region' (`C-c C-p c') 458 This command cites each line in the region of text by interpreting 459 the selected frame from `sc-cite-frame-alist', or the default 460 citing frame `sc-default-cite-frame'. It runs the hook 461 `sc-pre-cite-hook' before interpreting the frame. With an optional 462 universal argument (`C-u'), it temporarily sets 463 `sc-confirm-always-p' to `t' so you can confirm the attribution 464 string for a single manual citing. *Note Configuring the Citation 465 Engine::. 466 467`sc-uncite-region' (`C-c C-p u') 468 This command removes any citation strings from the beginning of 469 each cited line in the region by interpreting the selected frame 470 from `sc-uncite-frame-alist', or the default unciting frame 471 `sc-default-uncite-frame'. It runs the hook `sc-pre-uncite-hook' 472 before interpreting the frame. *Note Configuring the Citation 473 Engine::. 474 475`sc-recite-region' (`C-c C-p r') 476 This command recites each line the region by interpreting the 477 selected frame from `sc-recite-frame-alist', or the default 478 reciting frame `sc-default-recite-frame'. It runs the hook 479 `sc-pre-recite-hook' before interpreting the frame. *Note 480 Configuring the Citation Engine::. 481 482 Supercite will always ask you to confirm the attribution when 483 reciting a region, regardless of the value of 484 `sc-confirm-always-p'. 485 486 487File: sc, Node: Insertion Commands, Next: Variable Toggling Shortcuts, Prev: Citing Commands, Up: Post-yank Formatting Commands 488 489Insertion Commands 490================== 491 492 These two functions insert various strings into the reply buffer. 493 494`sc-insert-reference' (`C-c C-p w') 495 Inserts a reference header into the reply buffer at `point'. With 496 no arguments, the header indexed by `sc-preferred-header-style' is 497 inserted. An optional numeric argument is the index into 498 `sc-rewrite-header-list' indicating which reference header to 499 write. 500 501 With just the universal argument (`C-u'), electric reference mode 502 is entered, regardless of the value of `sc-electric-references-p'. 503 504`sc-insert-citation' (`C-c C-p i') 505 Inserts the current citation string at the beginning of the line 506 that `point' is on. If the line is already cited, Supercite will 507 issue an error and will not cite the line. 508 509 510File: sc, Node: Variable Toggling Shortcuts, Next: Mail Field Commands, Prev: Insertion Commands, Up: Post-yank Formatting Commands 511 512Variable Toggling Shortcuts 513=========================== 514 515 Supercite defines a number of commands that make it easier for you to 516toggle and set various Supercite variables as you are editing the reply 517buffer. For example, you may want to turn off filling or whitespace 518cleanup, but only temporarily. These toggling shortcut commands make 519this easy to do. 520 521 Like Supercite commands in general, the toggling commands are placed 522on a keymap prefix within the greater Supercite keymap. For the default 523value of `sc-mode-map-prefix', this will be `C-c C-p C-t'. 524 525 The following commands toggle the value of certain Supercite 526variables which take only a binary value: 527 528`C-c C-p C-t b' 529 Toggles the variable `sc-mail-nuke-blank-lines-p'. 530 531`C-c C-p C-t c' 532 Toggles the variable `sc-confirm-always-p'. 533 534`C-c C-p C-t d' 535 Toggles the variable `sc-downcase-p'. 536 537`C-c C-p C-t e' 538 Toggles the variable `sc-electric-references-p'. 539 540`C-c C-p C-t f' 541 Toggles the variable `sc-auto-fill-region-p'. 542 543`C-c C-p C-t o' 544 Toggles the variable `sc-electric-circular-p'. 545 546`C-c C-p C-t s' 547 Toggles the variable `sc-nested-citation-p'. 548 549`C-c C-p C-t u' 550 Toggles the variable `sc-use-only-preferences-p'. 551 552`C-c C-p C-t w' 553 Toggles the variable `sc-fixup-whitespace-p'. 554 555 The following commands let you set the value of multi-value 556variables, in the same way that Emacs' `set-variable' does: 557 558`C-c C-p C-t a' 559 Sets the value of the variable `sc-preferred-attribution-list'. 560 561`C-c C-p C-t l' 562 Sets the value of the variable `sc-cite-region-limit'. 563 564`C-c C-p C-t n' 565 Sets the value of the variable `sc-mail-nuke-mail-headers'. 566 567`C-c C-p C-t N' 568 Sets the value of the variable `sc-mail-header-nuke-list'. 569 570`C-c C-p C-t p' 571 Sets the value of the variable `sc-preferred-header-style'. 572 573 One special command is provided to toggle both 574`sc-auto-fill-region-p' and `sc-fixup-whitespace-p' together. This is 575because you typically want to run Supercite with either variable as 576`nil' or non-`nil'. The command to toggle these variables together is 577bound on `C-c C-p C-p'. 578 579 Finally, the command `C-c C-p C-t h' (also `C-c C-p C-t ?') brings 580up a Help message on the toggling keymap. 581 582 583File: sc, Node: Mail Field Commands, Next: Miscellaneous Commands, Prev: Variable Toggling Shortcuts, Up: Post-yank Formatting Commands 584 585Mail Field Commands 586=================== 587 588 These commands allow you to view, modify, add, and delete various 589bits of information from the info alist. *Note Information Keys and 590the Info Alist::. 591 592`sc-mail-field-query' (`C-c C-p f') 593 Allows you to interactively view, modify, add, and delete info 594 alist key-value pairs. With no argument, you are prompted (with 595 completion) for a info key. The value associated with that key is 596 displayed in the minibuffer. With an argument, this command will 597 first ask if you want to view, modify, add, or delete an info key. 598 Viewing is identical to running the command with no arguments. 599 600 If you want to modify the value of a key, Supercite will first 601 prompt you (with completion) for the key of the value you want to 602 change. It will then put you in the minibuffer with the key's 603 current value so you can edit the value as you wish. When you hit 604 RET, the key's value is changed. For those of you running Emacs 605 19, minibuffer history is kept for the values. 606 607 If you choose to delete a key-value pair, Supercite will prompt 608 you (with completion) for the key to delete. 609 610 If you choose to add a new key-value pair, Supercite firsts 611 prompts you for the key to add. Note that completion is turned on 612 for this prompt, but you can type any key name here, even one that 613 does not yet exist. After entering the key, Supercite prompts you 614 for the key's value. It is not an error to enter a key that 615 already exists, but the new value will override any old value. It 616 will not replace it though; if you subsequently delete the 617 key-value pair, the old value will reappear. 618 619`sc-mail-process-headers' (`C-c C-p g') 620 This command lets you re-initialize Supercite's info alist from 621 any set of mail headers in the region between `point' and `mark'. 622 This function is especially useful for replying to digest messages 623 where Supercite will initially set up its information for the 624 digest originator, but you want to cite each component article 625 with the real message author. Note that unless an error during 626 processing occurs, any old information is lost. 627 628 629File: sc, Node: Miscellaneous Commands, Next: Information Keys and the Info Alist, Prev: Mail Field Commands, Up: Post-yank Formatting Commands 630 631Miscellaneous Commands 632====================== 633 634`sc-open-line' (`C-c C-p o') 635 Similar to Emacs' standard `open-line' commands, but inserts the 636 citation string in front of the new line. As with `open-line', an 637 optional numeric argument inserts that many new lines. 638 639`sc-describe' (`C-c C-p h' and `C-c C-p ?') 640 This function has been obsoleted by the TeXinfo manual you are now 641 reading. It is still provided for compatibility, but it will 642 eventually go away. 643 644`sc-version' (`C-c C-p v') 645 Echos the version of Supercite you are using. With the optional 646 universal argument (`C-u'), this command inserts the version 647 information into the current buffer. 648 649`sc-submit-bug-report' (`C-c C-p C-b') 650 If you encounter a bug, or wish to suggest an enhancement, use this 651 command to set up an outgoing mail buffer, with the proper address 652 to the Supercite maintainer automatically inserted in the `To:' 653 field. This command also inserts information that the Supercite 654 maintainer can use to recreate your exact setup, making it easier 655 to verify your bug. 656 657 658File: sc, Node: Hints to MUA Authors, Next: Version 3 Changes, Prev: Electric References, Up: Top 659 660Hints to MUA Authors 661******************** 662 663 In June of 1989, some discussion was held between the various MUA 664authors, the Supercite author, and other Supercite users. These 665discussions centered around the need for a standard interface between 666MUAs and Supercite (or any future Supercite-like packages). This 667interface was formally proposed by Martin Neitzel on Fri, 23 Jun 89, in 668a mail message to the Supercite mailing list: 669 670 Martin> Each news/mail-reader should provide a form of 671 Martin> mail-yank-original that 672 673 Martin> 1: inserts the original message incl. header into the 674 Martin> reply buffer; no indentation/prefixing is done, the header 675 Martin> tends to be a "full blown" version rather than to be 676 Martin> stripped down. 677 678 Martin> 2: `point' is at the start of the header, `mark' at the 679 Martin> end of the message body. 680 681 Martin> 3: (run-hooks 'mail-yank-hooks) 682 683 Martin> [Supercite] should be run as such a hook and merely 684 Martin> rewrite the message. This way it isn't anymore 685 Martin> [Supercite]'s job to gather the original from obscure 686 Martin> sources. [...] 687 688 This specification was adopted, but with the recent release of FSF 689GNU Emacs 19, it has undergone a slight modification. Instead of the 690variable `mail-yank-hooks', the new preferred hook variable that the 691MUA should provide is `mail-citation-hook'. `mail-yank-hooks' can be 692provided for backward compatibility, but `mail-citation-hook' should 693always take precedence. Richard Stallman (of the FSF) suggests that 694the MUAs should `defvar' `mail-citation-hook' to `nil' and perform some 695default citing when that is the case. Take a look at Emacs 19's 696`sendmail.el' file, specifically the `mail-yank-original' defun for 697details. 698 699 If you are writing a new MUA package, or maintaining an existing MUA 700package, you should make it conform to this interface so that your users 701will be able to link Supercite easily and seamlessly. To do this, when 702setting up a reply or forward buffer, your MUA should follow these 703steps: 704 705 1. Insert the original message, including the mail headers into the 706 reply buffer. At this point you should not modify the raw text in 707 any way, and you should place all the original headers into the 708 body of the reply. This means that many of the mail headers will 709 be duplicated, one copy above the `mail-header-separator' line and 710 one copy below, however there will probably be more headers below 711 this line. 712 713 2. Set `point' to the beginning of the line containing the first mail 714 header in the body of the reply. Set `mark' at the end of the 715 message text. It is very important that the region be set around 716 the text Supercite is to modify and that the mail headers are 717 within this region. Supercite will not venture outside the region 718 for any reason, and anything within the region is fair game, so 719 don't put anything that *must* remain unchanged inside the region. 720 Further note that for Emacs 19, the region need not be set 721 active. Supercite will work properly when the region is inactive, 722 as should any other like-minded package. 723 724 3. Run the hook `mail-citation-hook'. You will probably want to 725 provide some kind of default citation functions in cases where the 726 user does not have Supercite installed. By default, your MUA 727 should `defvar' `mail-citation-hook' to `nil', and in your yanking 728 function, check its value. If it finds `mail-citation-hook' to be 729 `nil', it should perform some default citing behavior. User who 730 want to connect to Supercite then need only add `sc-cite-original' 731 to this list of hooks using `add-hook'. 732 733 If you do all this, your users will not need to overload your 734routines to use Supercite, and your MUA will join the ranks of those 735that conform to this interface "out of the box." 736 737 738File: sc, Node: Version 3 Changes, Next: Thanks and History, Prev: Hints to MUA Authors, Up: Top 739 740Version 3 Changes 741***************** 742 743 With version 3, Supercite has undergone an almost complete rewrite, 744and has hopefully benefitted in a number of ways, including vast 745improvements in the speed of performance, a big reduction in size of the 746code and in the use of Emacs resources, and a much cleaner and flexible 747internal architecture. The central construct of the info alist, and its 748role in Supercite has been expanded, and the other central concept, the 749general package Regi, was developed to provide a theoretically unlimited 750flexibility. 751 752 But most of this work is internal and not of very great importance 753to the casual user. There have been some changes at the user-visible 754level, but for the most part, the Supercite configuration variables from 755version 2 should still be relevant to version 3. Below, I briefly 756outline those user-visible things that have changed since version 2. For 757details, look to other sections of this manual. 758 759 1. Supercite proper now comes in a single file, `supercite.el', which 760 contains everything except the unsupported noodlings, overloading 761 (which should be more or less obsolete with the release of Emacs 762 19), and the general lisp packages `reporter.el' and `regi.el'. 763 Finally, the TeXinfo manual comes in its own file as well. In 764 particular, the file `sc.el' from the version 2 distribution is 765 obsolete, as is the file `sc-elec.el'. 766 767 2. `sc-spacify-name-chars' is gone in version 3. 768 769 3. `sc-nickname-alist' is gone in version 3. The 770 `sc-attrib-selection-list' is a more general construct supporting 771 the same basic feature. 772 773 4. The version 2 variable `sc-preferred-attribution' has been changed 774 to `sc-preferred-attribution-list', and has been expanded upon to 775 allow you to specify an ordered list of preferred attributions. 776 777 5. `sc-mail-fields-list' has been removed, and header nuking in 778 general has been greatly improved, giving you wider flexibility in 779 specifying which headers to keep and remove while presenting a 780 simplified interface to commonly chosen defaults. 781 782 6. Post-yank paragraph filling has been completely removed from 783 Supercite, other packages just do it better than Supercite ever 784 would. Supercite will still fill newly cited paragraphs. 785 786 7. The variable `sc-all-but-cite-p' has been replaced by 787 `sc-cite-region-limit'. 788 789 8. Keymap hacking in the reply buffer has been greatly simplified, 790 with, I believe, little reduction in functionality. 791 792 9. Hacking of the reply buffer's docstring has been completely 793 eliminated. 794 795 796File: sc, Node: Thanks and History, Next: The Supercite Mailing List, Prev: Version 3 Changes, Up: Top 797 798Thanks and History 799****************** 800 801 The Supercite package was derived from its predecessor Superyank 1.11 802which was inspired by various bits of code and ideas from Martin Neitzel 803and Ashwin Ram. They were the folks who came up with the idea of 804non-nested citations and implemented some rough code to provide this 805style. Superyank and Supercite version 2 evolved to the point where much 806of the attribution selection mechanism was automatic, and features have 807been continuously added through the comments and suggestions of the 808Supercite mailing list participants. Supercite version 3 represents a 809nearly complete rewrite with many of the algorithms and coding styles 810being vastly improved. Hopefully Supercite version 3 is faster, 811smaller, and much more flexible than its predecessors. 812 813 In the version 2 manual I thanked some specific people for their 814help in developing Supercite 2. You folks know who you are and your 815continued support is greatly appreciated. I wish to thank everyone on 816the Supercite mailing list, especially the brave alpha testers, who 817helped considerably in testing out the concepts and implementation of 818Supercite version 3. Special thanks go out to the MUA and Emacs 819authors Kyle Jones, Stephen Gildea, Richard Stallman, and Jamie 820Zawinski for coming to a quick agreement on the new 821`mail-citation-hook' interface, and for adding the magic lisp to their 822code to support this. 823 824 All who have helped and contributed have been greatly appreciated. 825 826 827File: sc, Node: The Supercite Mailing List, Next: Concept Index, Prev: Thanks and History, Up: Top 828 829The Supercite Mailing List 830************************** 831 832 The author runs a simple mail expanding mailing list for discussion 833of issues related to Supercite. This includes enhancement requests, bug 834reports, general help questions, etc. To subscribe or unsubscribe to 835the mailing list, send a request to the administrative address: 836 837 Internet: supercite-request@anthem.nlm.nih.gov 838 UUCP: uunet!anthem.nlm.nih.gov!supercite-request 839 840 Please be sure to include the most reliable and shortest (preferably 841Internet) address back to you. To post articles to the list, send your 842message to this address (you do not need to be a member to post, but be 843sure to indicate this in your article or replies may not be CC'd to 844you): 845 846 Internet: supercite@anthem.nlm.nih.gov 847 UUCP: uunet!anthem.nlm.nih.gov!supercite 848 849 If you are sending bug reports, they should go to the following 850address, but *please*! use the command `sc-submit-bug-report' since it 851will be much easier for me to duplicate your problem if you do so. It 852will set up a mail buffer automatically with this address on the `To:' 853line: 854 855 Internet: supercite-help@anthem.nlm.nih.gov 856 UUCP: uunet!anthem.nlm.nih.gov!supercite-help 857 858 859File: sc, Node: Concept Index, Next: Command Index, Prev: The Supercite Mailing List, Up: Top 860 861Concept Index 862************* 863 864* Menu: 865 866* .emacs file: Overloading for Non-conforming MUAs. 867* .emacs file: Getting Connected. 868* .emacs file: VM with any Emacsen. 869* .emacs file: Emacs 19 MUAs. 870* .emacs file: Emacs 18 MUAs. 871* .emacs file: MH-E with any Emacsen. 872* add-hook substitute: Emacs 18 MUAs. 873* attribute, attributing: Usage Overview. 874* attribution info field (sc-): Information Keys and the Info Alist. 875* attribution list: Selecting an Attribution. 876* attribution string: Citation Elements. 877* author info field (sc-): Information Keys and the Info Alist. 878* author names: Author Names. 879* autoload: Getting Connected. 880* citation: Citations. 881* citation delimiter: Citation Elements. 882* citation info field (sc-): Information Keys and the Info Alist. 883* citation interface specification: Getting Connected. 884* citation leader: Citation Elements. 885* citation separator: Citation Elements. 886* citation string: Citation Elements. 887* cite, citing: Usage Overview. 888* electric references: Electric References. 889* emailname info field (sc-): Information Keys and the Info Alist. 890* entries (Regi): Configuring the Citation Engine. 891* filladapt: What Supercite Does. 892* filladapt: Filling Cited Text. 893* filling paragraphs: Filling Cited Text. 894* firstname info field (sc-): Information Keys and the Info Alist. 895* frames (Regi): Configuring the Citation Engine. 896* from-address info field (sc-): Information Keys and the Info Alist. 897* gin-mode: What Supercite Does. 898* gin-mode: Filling Cited Text. 899* header rewrite functions: Reference Headers. 900* header rewrite functions, built-in: The Built-in Header Rewrite Functions. 901* Hyperbole: Overloading for Non-conforming MUAs. 902* Info Alist: Information Keys and the Info Alist. 903* info alist: What Supercite Does. 904* information extracted from mail fields: Information Keys and the Info Alist. 905* information keys: Information Keys and the Info Alist. 906* initials info field (sc-): Information Keys and the Info Alist. 907* keymap prefix: Reply Buffer Initialization. 908* lastname info field (sc-): Information Keys and the Info Alist. 909* mail-citation-hook: MH-E with any Emacsen. 910* mailing list address: The Supercite Mailing List. 911* mark: Getting Connected. 912* middlename-1 info field (sc-): Information Keys and the Info Alist. 913* modeline: Reply Buffer Initialization. 914* modeline: What Supercite Does. 915* MUA: Introduction. 916* nested citations: Citations. 917* non-nested citations: Citations. 918* NUA: Introduction. 919* nuking mail headers: What Supercite Does. 920* overloading: Emacs 18 MUAs. 921* overloading: Overloading for Non-conforming MUAs. 922* point: Getting Connected. 923* reciting: Frames You Can Customize. 924* reference header: What Supercite Does. 925* reference headers: Reference Headers. 926* Regi: Configuring the Citation Engine. 927* regi.el file: Version 3 Changes. 928* reply-address info field (sc-): Information Keys and the Info Alist. 929* reporter.el file: Version 3 Changes. 930* sc-attribution info field: Information Keys and the Info Alist. 931* sc-author info field: Information Keys and the Info Alist. 932* sc-citation info field: Information Keys and the Info Alist. 933* sc-elec.el from version 2: Version 3 Changes. 934* sc-emailname info field: Information Keys and the Info Alist. 935* sc-firstname info field: Information Keys and the Info Alist. 936* sc-from-address info field: Information Keys and the Info Alist. 937* sc-initials info field: Information Keys and the Info Alist. 938* sc-lastname info field: Information Keys and the Info Alist. 939* sc-middlename-1 info field: Information Keys and the Info Alist. 940* sc-oloads.el: Overloading for Non-conforming MUAs. 941* sc-reply-address info field: Information Keys and the Info Alist. 942* sc-sender-address info field: Information Keys and the Info Alist. 943* sc-unsupp.el file: Version 3 Changes. 944* sc-unsupp.el file: Emacs 18 MUAs. 945* sc.el from version 2: Version 3 Changes. 946* sender-address info field (sc-): Information Keys and the Info Alist. 947* sendmail.el: Hints to MUA Authors. 948* sendmail.el file: Emacs 18 MUAs. 949* setq as a substitute for add-hook: Emacs 18 MUAs. 950* supercite mailing list address: The Supercite Mailing List. 951* supercite.el file: Version 3 Changes. 952* toggling variables: Variable Toggling Shortcuts. 953* unciting: Frames You Can Customize. 954* undo boundary: Reply Buffer Initialization. 955* yank: Usage Overview. 956 957 958File: sc, Node: Command Index, Next: Key Index, Prev: Concept Index, Up: Top 959 960Command Index 961************* 962 963 Since all supercite commands are prepended with the string "`sc-'", 964each appears under its `sc-'COMMAND name and its COMMAND name. 965 966* Menu: 967 968* add-hook: Emacs 18 MUAs. 969* add-hook: MH-E with any Emacsen. 970* cite-original (sc-): Getting Connected. 971* cite-original (sc-): Reply Buffer Initialization. 972* cite-region (sc-): Citing Commands. 973* defvar: Hints to MUA Authors. 974* describe (sc-): Miscellaneous Commands. 975* eref-abort (sc-): Electric References. 976* eref-exit (sc-): Electric References. 977* eref-goto (sc-): Electric References. 978* eref-jump (sc-): Electric References. 979* eref-next (sc-): Electric References. 980* eref-prev (sc-): Electric References. 981* eref-setn (sc-): Electric References. 982* eval: Using Regi. 983* fill-paragraph: What Supercite Does. 984* header-attributed-writes (sc-): The Built-in Header Rewrite Functions. 985* header-author-writes (sc-): The Built-in Header Rewrite Functions. 986* header-inarticle-writes (sc-): The Built-in Header Rewrite Functions. 987* header-on-said (sc-): The Built-in Header Rewrite Functions. 988* header-regarding-adds (sc-): The Built-in Header Rewrite Functions. 989* header-verbose (sc-): The Built-in Header Rewrite Functions. 990* insert-citation (sc-): Insertion Commands. 991* insert-reference (sc-): Insertion Commands. 992* looking-at: Using Regi. 993* mail-field (sc-): Attribution Preferences. 994* mail-field (sc-): Information Keys and the Info Alist. 995* mail-field-query (sc-): Mail Field Commands. 996* mail-process-headers (sc-): Mail Field Commands. 997* mail-yank-original: Hints to MUA Authors. 998* no-blank-line-or-header (sc-): The Built-in Header Rewrite Functions. 999* no-header (sc-): The Built-in Header Rewrite Functions. 1000* open-line: Miscellaneous Commands. 1001* open-line (sc-): Miscellaneous Commands. 1002* perform-overloads (sc-): GNEWS with any Emacsen. 1003* recite-region (sc-): Citing Commands. 1004* regi-interpret: Using Regi. 1005* sc-cite-original: Reply Buffer Initialization. 1006* sc-cite-original: What Supercite Does. 1007* sc-cite-original: Getting Connected. 1008* sc-cite-region: Citing Commands. 1009* sc-describe: Miscellaneous Commands. 1010* sc-eref-abort: Electric References. 1011* sc-eref-exit: Electric References. 1012* sc-eref-goto: Electric References. 1013* sc-eref-jump: Electric References. 1014* sc-eref-next: Electric References. 1015* sc-eref-prev: Electric References. 1016* sc-eref-setn: Electric References. 1017* sc-header-attributed-writes: The Built-in Header Rewrite Functions. 1018* sc-header-author-writes: The Built-in Header Rewrite Functions. 1019* sc-header-inarticle-writes: The Built-in Header Rewrite Functions. 1020* sc-header-on-said: The Built-in Header Rewrite Functions. 1021* sc-header-regarding-adds: The Built-in Header Rewrite Functions. 1022* sc-header-verbose: The Built-in Header Rewrite Functions. 1023* sc-insert-citation: Insertion Commands. 1024* sc-insert-reference: Insertion Commands. 1025* sc-mail-field: Information Keys and the Info Alist. 1026* sc-mail-field: Attribution Preferences. 1027* sc-mail-field-query: Mail Field Commands. 1028* sc-mail-process-headers: Mail Field Commands. 1029* sc-no-blank-line-or-header: The Built-in Header Rewrite Functions. 1030* sc-no-header: The Built-in Header Rewrite Functions. 1031* sc-open-line: Miscellaneous Commands. 1032* sc-perform-overloads: Overloading for Non-conforming MUAs. 1033* sc-perform-overloads: GNEWS with any Emacsen. 1034* sc-recite-region: Citing Commands. 1035* sc-setup-filladapt: Filling Cited Text. 1036* sc-submit-bug-report: Miscellaneous Commands. 1037* sc-submit-bug-report: Getting Connected. 1038* sc-uncite-region: Citing Commands. 1039* sc-version: Miscellaneous Commands. 1040* set-variable: Variable Toggling Shortcuts. 1041* setq: Emacs 18 MUAs. 1042* setup-filladapt (sc-): Filling Cited Text. 1043* string-match: Frames You Can Customize. 1044* submit-bug-report (sc-): Getting Connected. 1045* submit-bug-report (sc-): Miscellaneous Commands. 1046* uncite-region (sc-): Citing Commands. 1047* version (sc-): Miscellaneous Commands. 1048 1049