comparison lisp/w3/url-news.el @ 102:a145efe76779 r20-1b3

Import from CVS: tag r20-1b3
author cvs
date Mon, 13 Aug 2007 09:15:49 +0200
parents 441bb1e64a06
children 8eaf7971accc
comparison
equal deleted inserted replaced
101:a0ec055d74dd 102:a145efe76779
1 ;;; url-news.el --- News Uniform Resource Locator retrieval code 1 ;;; url-news.el --- News Uniform Resource Locator retrieval code
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/01/10 00:13:05 3 ;; Created: 1997/02/18 23:35:11
4 ;; Version: 1.6 4 ;; Version: 1.7
5 ;; Keywords: comm, data, processes 5 ;; Keywords: comm, data, processes
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
58 (or (cdr (assoc "references" 58 (or (cdr (assoc "references"
59 url-current-mime-headers)) 59 url-current-mime-headers))
60 "") 60 "")
61 "[ \t,\n<>]+"))))) 61 "[ \t,\n<>]+")))))
62 (date (cdr (assoc "date" url-current-mime-headers)))) 62 (date (cdr (assoc "date" url-current-mime-headers))))
63 (setq url-current-file ""
64 url-current-type "")
65 (if (or (not (string-match "text/" typ)) 63 (if (or (not (string-match "text/" typ))
66 (string-match "text/html" typ)) 64 (string-match "text/html" typ))
67 nil ; Let natural content-type take over 65 nil ; Let natural content-type take over
68 (insert "<html>\n" 66 (insert "<html>\n"
69 " <head>\n" 67 " <head>\n"
251 (url-news-fetch-message-id host port article)) 249 (url-news-fetch-message-id host port article))
252 ((string= article "") ; List all newsgroups 250 ((string= article "") ; List all newsgroups
253 (gnus) 251 (gnus)
254 (kill-buffer url-working-buffer)) 252 (kill-buffer url-working-buffer))
255 (t ; Whole newsgroup 253 (t ; Whole newsgroup
256 (url-news-fetch-newsgroup article host))) 254 (url-news-fetch-newsgroup article host)))))
257 (setq url-current-type "news"
258 url-current-server host
259 url-current-user (url-user urlobj)
260 url-current-port port
261 url-current-file article)))
262 255
263 (defun url-nntp (url) 256 (defun url-nntp (url)
264 ;; Find a news reference 257 ;; Find a news reference
265 (url-check-gnus-version) 258 (url-check-gnus-version)
266 (let* ((urlobj (url-generic-parse-url url)) 259 (let* ((urlobj (url-generic-parse-url url))
280 273
281 ((string= article "") ; List all newsgroups 274 ((string= article "") ; List all newsgroups
282 (gnus) 275 (gnus)
283 (kill-buffer url-working-buffer)) 276 (kill-buffer url-working-buffer))
284 (t ; Whole newsgroup 277 (t ; Whole newsgroup
285 (url-news-fetch-newsgroup article))) 278 (url-news-fetch-newsgroup article)))))
286 (setq url-current-type "news"
287 url-current-server host
288 url-current-user (url-user urlobj)
289 url-current-port port
290 url-current-file article)))
291 279
292 (provide 'url-news) 280 (provide 'url-news)