Mercurial > hg > xemacs-beta
comparison lisp/gnus/nnweb.el @ 140:585fb297b004 r20-2b4
Import from CVS: tag r20-2b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:32:43 +0200 |
parents | 9b50b4588a93 |
children | 59463afc5666 |
comparison
equal
deleted
inserted
replaced
139:2b5203979d01 | 140:585fb297b004 |
---|---|
284 (if (not nnheader-callback-function) | 284 (if (not nnheader-callback-function) |
285 (let ((buf (current-buffer))) | 285 (let ((buf (current-buffer))) |
286 (save-excursion | 286 (save-excursion |
287 (set-buffer nnweb-buffer) | 287 (set-buffer nnweb-buffer) |
288 (erase-buffer) | 288 (erase-buffer) |
289 (prog1 | 289 (url-insert-file-contents url) |
290 (url-insert-file-contents url) | 290 (copy-to-buffer buf (point-min) (point-max)) |
291 (copy-to-buffer buf (point-min) (point-max))))) | 291 t)) |
292 (nnweb-url-retrieve-asynch | 292 (nnweb-url-retrieve-asynch |
293 url 'nnweb-callback (current-buffer) nnheader-callback-function) | 293 url 'nnweb-callback (current-buffer) nnheader-callback-function) |
294 t))) | 294 t))) |
295 | 295 |
296 (defun nnweb-callback (buffer callback) | 296 (defun nnweb-callback (buffer callback) |
560 (replace-match " " t t))) | 560 (replace-match " " t t))) |
561 (widen) | 561 (widen) |
562 (set-marker body nil)))) | 562 (set-marker body nil)))) |
563 | 563 |
564 (defun nnweb-reference-search (search) | 564 (defun nnweb-reference-search (search) |
565 (prog1 | 565 (url-insert-file-contents |
566 (url-insert-file-contents | 566 (concat |
567 (concat | 567 (nnweb-definition 'address) |
568 (nnweb-definition 'address) | 568 "?" |
569 "?" | 569 (nnweb-encode-www-form-urlencoded |
570 (nnweb-encode-www-form-urlencoded | 570 `(("search" . "advanced") |
571 `(("search" . "advanced") | 571 ("querytext" . ,search) |
572 ("querytext" . ,search) | 572 ("subj" . "") |
573 ("subj" . "") | 573 ("name" . "") |
574 ("name" . "") | 574 ("login" . "") |
575 ("login" . "") | 575 ("host" . "") |
576 ("host" . "") | 576 ("organization" . "") |
577 ("organization" . "") | 577 ("groups" . "") |
578 ("groups" . "") | 578 ("keywords" . "") |
579 ("keywords" . "") | 579 ("choice" . "Search") |
580 ("choice" . "Search") | 580 ("startmonth" . "Jul") |
581 ("startmonth" . "Jul") | 581 ("startday" . "25") |
582 ("startday" . "25") | 582 ("startyear" . "1996") |
583 ("startyear" . "1996") | 583 ("endmonth" . "Aug") |
584 ("endmonth" . "Aug") | 584 ("endday" . "24") |
585 ("endday" . "24") | 585 ("endyear" . "1996") |
586 ("endyear" . "1996") | 586 ("mode" . "Quick") |
587 ("mode" . "Quick") | 587 ("verbosity" . "Verbose") |
588 ("verbosity" . "Verbose") | 588 ("ranking" . "Relevance") |
589 ("ranking" . "Relevance") | 589 ("first" . "1") |
590 ("first" . "1") | 590 ("last" . "25") |
591 ("last" . "25") | 591 ("score" . "50"))))) |
592 ("score" . "50"))))) | 592 (setq buffer-file-name nil) |
593 (setq buffer-file-name nil)) | |
594 t) | 593 t) |
595 | 594 |
596 ;;; | 595 ;;; |
597 ;;; Alta Vista | 596 ;;; Alta Vista |
598 ;;; | 597 ;;; |
666 (replace-match "<\\1> " t))) | 665 (replace-match "<\\1> " t))) |
667 (widen) | 666 (widen) |
668 (nnweb-remove-markup))) | 667 (nnweb-remove-markup))) |
669 | 668 |
670 (defun nnweb-altavista-search (search &optional part) | 669 (defun nnweb-altavista-search (search &optional part) |
671 (prog1 | 670 (url-insert-file-contents |
672 (url-insert-file-contents | 671 (concat |
673 (concat | 672 (nnweb-definition 'address) |
674 (nnweb-definition 'address) | 673 "?" |
675 "?" | 674 (nnweb-encode-www-form-urlencoded |
676 (nnweb-encode-www-form-urlencoded | 675 `(("pg" . "aq") |
677 `(("pg" . "aq") | 676 ("what" . "news") |
678 ("what" . "news") | 677 ,@(when part `(("stq" . ,(int-to-string (* part 30))))) |
679 ,@(when part `(("stq" . ,(int-to-string (* part 30))))) | 678 ("fmt" . "d") |
680 ("fmt" . "d") | 679 ("q" . ,search) |
681 ("q" . ,search) | 680 ("r" . "") |
682 ("r" . "") | 681 ("d0" . "") |
683 ("d0" . "") | 682 ("d1" . ""))))) |
684 ("d1" . ""))))) | 683 (setq buffer-file-name nil) |
685 (setq buffer-file-name nil))) | 684 t) |
686 | 685 |
687 (provide 'nnweb) | 686 (provide 'nnweb) |
688 | 687 |
689 ;;; nnweb.el ends here | 688 ;;; nnweb.el ends here |