Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] Add prefix argument to g-g-fetch-charter
@ 2002-10-02  0:56 Jesper Harder
  2002-10-03 17:38 ` Kai Großjohann
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Harder @ 2002-10-02  0:56 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

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  <harder@ifa.au.dk>

	* 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-group.el.diff --]
[-- Type: text/x-patch, Size: 1334 bytes --]

--- /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))

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: gnus-sum.el.diff --]
[-- Type: text/x-patch, Size: 1007 bytes --]

--- /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]

[-- Attachment #4: Type: text/plain, Size: 167 bytes --]


2002-10-02  Jesper harder  <harder@ifa.au.dk>

	* gnus.texi (Group Information): Mention prefix argument for
	gnus-group-fetch-charter and gnus-group-fetch-control.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: gnus.texi.diff --]
[-- Type: text/x-patch, Size: 1263 bytes --]

--- /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}.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] Add prefix argument to g-g-fetch-charter
  2002-10-02  0:56 [patch] Add prefix argument to g-g-fetch-charter Jesper Harder
@ 2002-10-03 17:38 ` Kai Großjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Großjohann @ 2002-10-03 17:38 UTC (permalink / raw)


Jesper Harder <harder@ifa.au.dk> writes:

> 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.

I presume you have done the paperwork.  Committed.  Thanks!

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-03 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02  0:56 [patch] Add prefix argument to g-g-fetch-charter Jesper Harder
2002-10-03 17:38 ` Kai Großjohann

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).