From: yamaoka Date: Sat, 31 Aug 2002 06:36:49 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_8-01-quimby~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=69709e06ab3dec9f537bc4824b86d5e9adf205d6;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4c02a9..b3c61f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2002-08-30 Simon Josefsson + + * gnus-group.el (gnus-group-fetch-control): Fix typo in last + commit. From Reiner Steib <4uce.02.r.steib@gmx.net>. + +2002-08-26 Jesper harder + + * gnus.el (gnus-group-charter-alist): New option. + (gnus-group-fetch-control-use-browse-url): New option. + + * gnus-group.el (gnus-group-fetch-charter): New function. + (gnus-group-fetch-control): New function. + Add them to the keymap and menu. Require mm-url. + 2002-08-30 Katsumi Yamaoka * gnus-mlspl.el (gnus-group-split-fancy): Doc fix. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 25bbbba..b168728 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -38,6 +38,7 @@ (require 'gnus-undo) (require 'time-date) (require 'gnus-ems) +(require 'mm-url) (defcustom gnus-group-archive-directory "*ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" @@ -712,6 +713,8 @@ simple manner.") "f" gnus-score-flush-cache) (gnus-define-keys (gnus-group-help-map "H" gnus-group-mode-map) + "c" gnus-group-fetch-charter + "C" gnus-group-fetch-control "d" gnus-group-describe-group "f" gnus-group-fetch-faq "v" gnus-version) @@ -756,6 +759,12 @@ simple manner.") ,@(if (featurep 'xemacs) nil '(:help "Display description of the current group"))] ["Fetch FAQ" gnus-group-fetch-faq (gnus-group-group-name)] + ["Fetch charter" gnus-group-fetch-charter :active (gnus-group-group-name) + ,@(if (featurep 'xemacs) nil + '(:help "Display the charter of the current group"))] + ["Fetch control message" gnus-group-fetch-control :active (gnus-group-group-name) + ,@(if (featurep 'xemacs) nil + '(:help "Display the archived control message for the current group"))] ;; Actually one should check, if any of the marked groups gives t for ;; (gnus-check-backend-function 'request-expire-articles ...) ["Expire articles" gnus-group-expire-articles @@ -3558,6 +3567,44 @@ to use." (find-file file) (setq found t)))))) +(defun gnus-group-fetch-charter (group) + "Fetch the charter for the current group." + (interactive + (list (or (gnus-group-group-name) + gnus-newsgroup-name))) + (unless group + (error "No group name given")) + (let ((name (mm-url-form-encode-xwfu (gnus-group-real-name group))) + url hierarchy) + (when (string-match "\\(^[^\\.]+\\)\\..*" name) + (setq hierarchy (match-string 1 name)) + (if (setq url (cdr (assoc hierarchy gnus-group-charter-alist))) + (browse-url (eval url)) + (gnus-group-fetch-control group))))) + +(defun gnus-group-fetch-control (group) + "Fetch the archived control messages for the current group." + (interactive + (list (or (gnus-group-group-name) + gnus-newsgroup-name))) + (unless group + (error "No group name given")) + (let ((name (gnus-group-real-name group)) + hierarchy) + (when (string-match "\\(^[^\\.]+\\)\\..*" name) + (setq hierarchy (match-string 1 name)) + (if gnus-group-fetch-control-use-browse-url + (browse-url (concat "ftp://ftp.isc.org/usenet/control/" + hierarchy "/" name ".Z")) + (let ((enable-local-variables nil)) + (gnus-group-read-ephemeral-group + group + `(nndoc ,group (nndoc-address + ,(find-file-noselect + (concat "/ftp@ftp.isc.org:/usenet/control/" + hierarchy "/" name ".Z"))) + (nndoc-article-type mbox)) t nil nil)))))) + (defun gnus-group-describe-group (force &optional group) "Display a description of the current newsgroup." (interactive (list current-prefix-arg (gnus-group-group-name))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 921ffd0..a488577 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1283,6 +1283,41 @@ If the default site is too slow, try one of these: :type '(choice directory (repeat directory))) +(defcustom gnus-group-charter-alist + '(("no" . (concat "http://no.news-admin.org/charter/" name ".txt")) + ("de" . (concat "http://purl.net/charta/" name ".html")) + ("dk" . (concat "http://www.usenet.dk/grupper.pl?get=" name)) + ("england" . (concat "http://england.news-admin.org/charters/" name)) + ("fr" . (concat "http://www.usenet-fr.net/fur/chartes/" name ".html")) + ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-" + (gnus-replace-in-string name "europa\\." "") ".html")) + ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name)) + ("aus" . (concat "http://aus.news-admin.org/groupinfo.php/" name)) + ("pl" . (concat "http://www.usenet.pl/opisy/" name)) + ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name)) + ("at" . (concat "http://www.usenet.at/chartas/" name "/charta")) + ("uk" . (concat "http://www.usenet.org.uk/" name ".html")) + ("wales" . (concat "http://www.wales-usenet.org/english/groups/" name ".html")) + ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html")) + ("se" . (concat "http://www.usenet-se.net/Reglementen/" + (gnus-replace-in-string name "\\." "_") ".html")) + ("milw" . (concat "http://usenet.mil.wi.us/" + (gnus-replace-in-string name "milw\\." "") "-charter")) + ("ca" . (concat "http://www.sbay.org/ca/charter-" name ".html")) + ("netins" . (concat "http://www.netins.net/usenet/charter/" + (gnus-replace-in-string name "\\." "-") "-charter.html"))) + "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter. + When FORM is evaluated `name' is bound to the name of the group." + :group 'gnus-group-various + :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form")))) + +(defcustom gnus-group-fetch-control-use-browse-url nil + "*Non-nil means that control messages are displayed using `browse-url'. +Otherwise they are fetched with ange-ftp and displayed in an ephemeral +group." + :group 'gnus-group-various + :type 'boolean) + (defcustom gnus-use-cross-reference t "*Non-nil means that cross referenced articles will be marked as read. If nil, ignore cross references. If t, mark articles as read in diff --git a/texi/ChangeLog b/texi/ChangeLog index af71e4b..2b698f5 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2002-08-26 Jesper harder + + * gnus.texi (Group Information): Add gnus-group-fetch-charter and + gnus-group-fetch-control. + 2002-08-28 Katsumi Yamaoka * gnus.texi (Posting Server): Document message-smtpmail-send-it. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 1b6011f..27c18f0 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -4142,6 +4142,34 @@ Gnus $B$O(B FAQ $B$r(B@code{gnus-group-faq-directory} $B$+$iO$r(B web $B%V%i%&%6$G3+$3$&$H$7$^(B +$B$9(B (@code{gnus-group-fetch-charter})$B!#(B +gnus $B$O(B @code{gnus-group-charter-alist} $B$r;H$C$F7{>O$N=j:_$rC5$7$^$9!#=j(B +$B:_$,$o$+$i$J$+$C$?$i!"(Bgnus $B$O$=$N%0%k!<%W$N%3%s%H%m!<%k%a%C%;!<%8$rO$r4^$s$G$$$k$3$H$,$"$j$^$9$+$i!#(B + +@item H C +@kindex H C (Group) +@findex gnus-group-fetch-control +@vindex gnus-group-fetch-control-use-browse-url +@cindex control message +$B$=$N%0%k!<%W$N%3%s%H%m!<%k%a%C%;!<%8$r(B @code{ftp.isc.org} $B$N5-O?8K$+$il9g$O(B @code{ange-ftp} $B$r;H$C$F