(nndoc-transform-lanl-gov-announce, nndoc-generate-lanl-gov-head):
Update lanl/arXiv support.
+2007-05-03 Dan Christensen <jdc@uwo.ca>
+
+ * nndoc.el (nndoc-type-alist, nndoc-lanl-gov-announce-type-p)
+ (nndoc-transform-lanl-gov-announce, nndoc-generate-lanl-gov-head):
+ Update lanl/arXiv support.
+
2007-05-02 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.el: Bump version number.
2007-05-02 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.el: Bump version number.
(subtype digest guess))
(lanl-gov-announce
(article-begin . "^\\\\\\\\\n")
(subtype digest guess))
(lanl-gov-announce
(article-begin . "^\\\\\\\\\n")
- (head-begin . "^Paper.*:")
+ (head-begin . "^\\(Paper.*:\\|arXiv:\\)")
(head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)")
(body-begin . "")
(body-end . "\\(-------------------------------------------------\\|%-%-%-%-%-%-%-%-%-%-%-%-%-%-\\|%%--%%--%%--%%--%%--%%--%%--%%--\\|%%%---%%%---%%%---%%%---\\)")
(head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)")
(body-begin . "")
(body-end . "\\(-------------------------------------------------\\|%-%-%-%-%-%-%-%-%-%-%-%-%-%-\\|%%--%%--%%--%%--%%--%%--%%--%%--\\|%%%---%%%---%%%---%%%---\\)")
(defun nndoc-lanl-gov-announce-type-p ()
(when (let ((case-fold-search nil))
(defun nndoc-lanl-gov-announce-type-p ()
(when (let ((case-fold-search nil))
- (re-search-forward "^\\\\\\\\\nPaper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z-\\.]+/[0-9]+" nil t))
+ (re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z-\\.]+/[0-9]+\\|arXiv:\\)" nil t))
t))
(defun nndoc-transform-lanl-gov-announce (article)
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))
- (goto-char (point-min))
- (while (re-search-forward "^\\\\\\\\$" nil t)
- (replace-match "" t nil))
- (goto-char (point-min))
- (when (re-search-forward "^replaced with revised version +\\(.*[^ ]\\) +" nil t)
- (replace-match "Date: \\1 (revised) " t nil))
- (goto-char (point-min))
- (unless (re-search-forward "^From" nil t)
+ (let ((case-fold-search nil))
+ (goto-char (point-max))
+ (when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
+ (replace-match "\n\nGet it at \\1 (\\2)" t nil))
- (when (re-search-forward "^Authors?: \\(.*\\)" nil t)
+ (while (re-search-forward "^\\\\\\\\$" nil t)
+ (replace-match "" t nil))
+ (goto-char (point-min))
+ (when (re-search-forward "^replaced with revised version +\\(.*[^ ]\\) +" nil t)
+ (replace-match "Date: \\1 (revised) " t nil))
+ (goto-char (point-min))
+ (unless (re-search-forward "^From" nil t)
- (insert "From: " (match-string 1) "\n"))))
+ (when (re-search-forward "^Authors?: \\(.*\\)" nil t)
+ (goto-char (point-min))
+ (insert "From: " (match-string 1) "\n")))
+ (when (re-search-forward "^arXiv:" nil t)
+ (replace-match "Paper: arXiv:" t nil))))
(defun nndoc-generate-lanl-gov-head (article)
(let ((entry (cdr (assq article nndoc-dissection-alist)))
(defun nndoc-generate-lanl-gov-head (article)
(let ((entry (cdr (assq article nndoc-dissection-alist)))
(save-restriction
(narrow-to-region (car entry) (nth 1 entry))
(goto-char (point-min))
(save-restriction
(narrow-to-region (car entry) (nth 1 entry))
(goto-char (point-min))
- (when (looking-at "^Paper.*: \\([a-zA-Z-\\.]+/[0-9]+\\)")
- (setq subject (concat " (" (match-string 1) ")"))
+ (when (looking-at "^\\(Paper.*: \\|arXiv:\\)\\([0-9a-zA-Z-\\./]+\\)")
+ (setq subject (concat " (" (match-string 2) ")"))
(when (re-search-forward "^From: \\(.*\\)" nil t)
(setq from (concat "<"
(cadr (funcall gnus-extract-address-components
(when (re-search-forward "^From: \\(.*\\)" nil t)
(setq from (concat "<"
(cadr (funcall gnus-extract-address-components