Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@ifa.au.dk>
Subject: Re: gnus-group-fetch-charter
Date: Sat, 24 Aug 2002 05:08:33 +0200	[thread overview]
Message-ID: <m3d6s9q7gu.fsf@defun.localdomain> (raw)
In-Reply-To: <v9fzx5btaa.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Fri, 23 Aug 2002 15:26:21 +0200")

Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> On Wed, Aug 21 2002, Jesper Harder wrote:
>
>> I thought it would be nice to have a convenient way to get the charter
>> for a group (like gnus-group-fetch-faq for FAQ's).  
>
> Nice idea.
>
>> This works for some of the regional hierarchies 
>
> The following patch adds the de.* hierarchy. WIBNI we could call the
> function from the summary buffer too?

Thanks.  Here's a new version, which works for alt and big8 as well (at
least if the charter is included in the control message).


(defvar 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 by
`gnus-group-fetch-charter' to construct the URL of a charter.")

(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 (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))
	(let ((enable-local-variables nil))
	  (find-file (concat "/ftp@ftp.isc.org:/usenet/control/" 
			     hierarchy "/" name ".Z")))))))




  reply	other threads:[~2002-08-24  3:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21  4:51 gnus-group-fetch-charter Jesper Harder
2002-08-23 13:26 ` gnus-group-fetch-charter Reiner Steib
2002-08-24  3:08   ` Jesper Harder [this message]
2002-08-24 15:27     ` gnus-group-fetch-charter Kai Großjohann
2002-08-26 21:11       ` gnus-group-fetch-charter Jesper Harder
2002-08-30 16:43         ` gnus-group-fetch-charter Reiner Steib
2002-08-30 20:45           ` gnus-group-fetch-charter Simon Josefsson
2002-08-25 18:20     ` gnus-group-fetch-charter Reiner Steib
2002-08-26 21:28       ` gnus-group-fetch-charter Jesper Harder
2002-12-29 22:31 ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2002-12-29 22:51   ` gnus-group-fetch-charter Kai Großjohann
2002-12-29 23:02     ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2002-12-29 23:00   ` gnus-group-fetch-charter Jesper Harder
2002-12-29 23:13     ` gnus-group-fetch-charter Lars Magne Ingebrigtsen
2003-01-02 21:26       ` gnus-group-fetch-charter Jesper Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d6s9q7gu.fsf@defun.localdomain \
    --to=harder@ifa.au.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).