* update lanl/arXiv nndoc support [patch]
@ 2007-05-03 11:51 Dan Christensen
2007-05-03 18:38 ` Reiner Steib
0 siblings, 1 reply; 3+ messages in thread
From: Dan Christensen @ 2007-05-03 11:51 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
The patch below updates the nndoc support for the messages sent by
the arXiv (http://www.arxiv.org). Please apply. I have copyright
assignment papers on file.
About half of the patch is indentation changes.
Dan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nndoc.el.patch --]
[-- Type: text/x-patch, Size: 2974 bytes --]
--- nndoc.el.orig 2007-05-02 16:26:40.000000000 -0400
+++ nndoc.el 2007-05-02 22:24:08.000000000 -0400
@@ -122,7 +122,7 @@
(subtype digest guess))
(lanl-gov-announce
(article-begin . "^\\\\\\\\\n")
- (head-begin . "^Paper.*:")
+ (head-begin . "^\\(Paper.*:\\|arXiv:\\)")
(head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)")
(body-begin . "")
(body-end . "\\(-------------------------------------------------\\|%-%-%-%-%-%-%-%-%-%-%-%-%-%-\\|%%--%%--%%--%%--%%--%%--%%--%%--\\|%%%---%%%---%%%---%%%---\\)")
@@ -624,25 +624,28 @@
(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)
- (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))
(goto-char (point-min))
- (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)
(goto-char (point-min))
- (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)))
@@ -653,8 +656,8 @@
(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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: update lanl/arXiv nndoc support [patch]
2007-05-03 11:51 update lanl/arXiv nndoc support [patch] Dan Christensen
@ 2007-05-03 18:38 ` Reiner Steib
2007-05-04 0:07 ` Dan Christensen
0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2007-05-03 18:38 UTC (permalink / raw)
To: ding
On Thu, May 03 2007, Dan Christensen wrote:
> The patch below updates the nndoc support for the messages sent by
> the arXiv (http://www.arxiv.org). Please apply. I have copyright
> assignment papers on file.
Applied. Thanks.
Could you also provide a patch for texi/gnus.texi or isn't it
necessary to mention arXiv there?
,----[ (info "(gnus)Document Groups") ]
| `lanl-gov-announce'
| Announcement messages from LANL Gov Announce.
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: update lanl/arXiv nndoc support [patch]
2007-05-03 18:38 ` Reiner Steib
@ 2007-05-04 0:07 ` Dan Christensen
0 siblings, 0 replies; 3+ messages in thread
From: Dan Christensen @ 2007-05-04 0:07 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
Reiner Steib <reinersteib+gmane@imap.cc> writes:
> Applied. Thanks.
Thanks.
> Could you also provide a patch for texi/gnus.texi or isn't it
> necessary to mention arXiv there?
Good idea. Patch below. If it would make sense to provide a URL, the
right one is http://www.arxiv.org.
Dan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus.texi.patch --]
[-- Type: text/x-patch, Size: 364 bytes --]
--- gnus.texi~ 2007-05-01 21:48:42.000000000 -0400
+++ gnus.texi 2007-05-03 20:05:11.000000000 -0400
@@ -17497,7 +17497,7 @@
A @acronym{MIME} digest of messages.
@item lanl-gov-announce
-Announcement messages from LANL Gov Announce.
+Announcement messages from the arXiv preprint server (also know as LANL).
@cindex forwarded messages
@item rfc822-forward
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-04 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-03 11:51 update lanl/arXiv nndoc support [patch] Dan Christensen
2007-05-03 18:38 ` Reiner Steib
2007-05-04 0:07 ` Dan Christensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).