From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46908 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: [patch] Add prefix argument to g-g-fetch-charter Date: Wed, 02 Oct 2002 02:56:02 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1033520440 14719 127.0.0.1 (2 Oct 2002 01:00:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 2 Oct 2002 01:00:40 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17wXsU-0003pH-00 for ; Wed, 02 Oct 2002 03:00:38 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17wXrX-0004BG-00; Tue, 01 Oct 2002 19:59:39 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 01 Oct 2002 20:00:19 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id UAA28933 for ; Tue, 1 Oct 2002 20:00:07 -0500 (CDT) Original-Received: (qmail 25741 invoked by alias); 2 Oct 2002 00:59:22 -0000 Original-Received: (qmail 25736 invoked from network); 2 Oct 2002 00:59:22 -0000 Original-Received: from pfepc.post.tele.dk (193.162.153.4) by gnus.org with SMTP; 2 Oct 2002 00:59:22 -0000 Original-Received: from defun.localdomain (0xc3f95321.esnxr2.ras.tele.dk [195.249.83.33]) by pfepc.post.tele.dk (Postfix) with ESMTP id 2C02E264300 for ; Wed, 2 Oct 2002 02:59:16 +0200 (CEST) Original-To: ding@gnus.org Original-Lines: 29 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-redhat-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46908 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46908 --=-=-= Hi! Here's a patch that makes gnus-group-fetch-{charter,control} query for a group if given a prefix argument. Handy if you're not subscribed to the group in question. I also added the commands to the summary menu and keymap. 2002-10-02 Jesper harder * gnus-group.el (gnus-group-fetch-charter): Prompt for group if given a prefix argument. (gnus-group-fetch-control): do. * gnus-sum.el (t): Add gnus-group-fetch-charter and gnus-group-fetch-control to summary key map and menu. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-group.el.diff --- /home/harder/gnus/lisp/gnus-group.el Thu Sep 26 15:02:29 2002 +++ gnus-group.el Wed Oct 2 02:14:31 2002 @@ -3523,10 +3523,13 @@ (setq found t)))))) (defun gnus-group-fetch-charter (group) - "Fetch the charter for the current group." + "Fetch the charter for the current group. +If given a prefix argument, prompt for a group." (interactive - (list (or (gnus-group-group-name) - gnus-newsgroup-name))) + (list (or (when current-prefix-arg + (completing-read "Group: " gnus-active-hashtb)) + (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))) @@ -3538,10 +3541,13 @@ (gnus-group-fetch-control group))))) (defun gnus-group-fetch-control (group) - "Fetch the archived control messages for the current group." + "Fetch the archived control messages for the current group. +If given a prefix argument, prompt for a group." (interactive - (list (or (gnus-group-group-name) - gnus-newsgroup-name))) + (list (or (when current-prefix-arg + (completing-read "Group: " gnus-active-hashtb)) + (gnus-group-group-name) + gnus-newsgroup-name))) (unless group (error "No group name given")) (let ((name (gnus-group-real-name group)) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-sum.el.diff --- /home/harder/gnus/lisp/gnus-sum.el Fri Sep 27 17:01:18 2002 +++ gnus-sum.el Wed Oct 2 02:37:45 2002 @@ -1833,7 +1833,9 @@ "f" gnus-summary-fetch-faq "d" gnus-summary-describe-group "h" gnus-summary-describe-briefly - "i" gnus-info-find-node) + "i" gnus-info-find-node + "c" gnus-group-fetch-charter + "C" gnus-group-fetch-control) (gnus-define-keys (gnus-summary-backend-map "B" gnus-summary-mode-map) "e" gnus-summary-expire-articles @@ -2332,6 +2334,12 @@ ("Help" ["Fetch group FAQ" gnus-summary-fetch-faq t] ["Describe group" gnus-summary-describe-group t] + ["Fetch charter" gnus-group-fetch-charter + ,@(if (featurep 'xemacs) nil + '(:help "Display the charter of the current group"))] + ["Fetch control message" gnus-group-fetch-control + ,@(if (featurep 'xemacs) nil + '(:help "Display the archived control message for the current group"))] ["Read manual" gnus-info-find-node t]) ("Modes" ["Pick and read" gnus-pick-mode t] --=-=-= 2002-10-02 Jesper harder * gnus.texi (Group Information): Mention prefix argument for gnus-group-fetch-charter and gnus-group-fetch-control. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus.texi.diff --- /home/harder/gnus/texi/gnus.texi Fri Sep 27 03:22:58 2002 +++ gnus.texi Wed Oct 2 02:46:27 2002 @@ -4093,10 +4093,12 @@ @vindex gnus-group-charter-alist @cindex charter Try to open the charter for the current group in a web browser -(@code{gnus-group-fetch-charter}). Gnus will use -@code{gnus-group-charter-alist} to find the location of the charter. -If no location is known, Gnus will fetch the control messages for the -group, which in some cases includes the charter. +(@code{gnus-group-fetch-charter}). Query for a group if given a +prefix argument. + +Gnus will use @code{gnus-group-charter-alist} to find the location of +the charter. If no location is known, Gnus will fetch the control +messages for the group, which in some cases includes the charter. @item H C @kindex H C (Group) @@ -4104,7 +4106,8 @@ @vindex gnus-group-fetch-control-use-browse-url @cindex control message Fetch the control messages for the group from the archive at -@code{ftp.isc.org} (@code{gnus-group-fetch-control}). +@code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a +group if given a prefix argument. If @code{gnus-group-fetch-control-use-browse-url} is non-nil, Gnus will open the control messages in a browser using @code{browse-url}. --=-=-=--