+(defun nndoc-lanl-gov-announce-type-p ()
+ (when (let ((case-fold-search nil))
+ (re-search-forward "^\\\\\\\\\nPaper: [a-z-]+/[0-9]+" nil t))
+ t))
+
+(defun nndoc-transform-lanl-gov-announce (article)
+ (goto-char (point-max))
+ (when (re-search-backward "^\\\\\\\\ +(\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
+ (replace-match "\n\nGet it at \\1 (\\2)" t nil))
+ ;; (when (re-search-backward "^\\\\\\\\$" nil t)
+ ;; (replace-match "" t t))
+ )
+
+(defun nndoc-generate-lanl-gov-head (article)
+ (let ((entry (cdr (assq article nndoc-dissection-alist)))
+ (e-mail "no address given")
+ subject from)
+ (save-excursion
+ (set-buffer nndoc-current-buffer)
+ (save-restriction
+ (narrow-to-region (car entry) (nth 1 entry))
+ (goto-char (point-min))
+ (when (looking-at "^Paper.*: \\([a-z-]+/[0-9]+\\)")
+ (setq subject (concat " (" (match-string 1) ")"))
+ (when (re-search-forward "^From: \\([^ ]+\\)" nil t)
+ (setq e-mail (match-string 1)))
+ (when (re-search-forward "^Title: \\([^\f]*\\)\nAuthors?: \\(.*\\)"
+ nil t)
+ (setq subject (concat (match-string 1) subject))
+ (setq from (concat (match-string 2) " <" e-mail ">"))))
+ ))
+ (while (and from (string-match "(\[^)\]*)" from))
+ (setq from (replace-match "" t t from)))
+ (insert "From: " (or from "unknown")
+ "\nSubject: " (or subject "(no subject)") "\n")))
+
+
+