From d82cf70b7fe93c7928a59a3c6ae8d2680237f60d Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 8 Jan 2008 14:16:13 +0000 Subject: Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-985 --- lisp/gnus/ChangeLog | 10 ++++++++++ lisp/gnus/gnus-bookmark.el | 4 ++-- lisp/gnus/gnus-group.el | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 3 deletions(-) (limited to 'lisp/gnus') diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7cf327570e3..fee37162942 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,13 @@ +2008-01-08 Katsumi Yamaoka + + * gnus-bookmark.el (gnus-bookmark-mouse-available-p): Don't test for + display-color-p. Reported by Reiner Steib . + +2008-01-06 Reiner Steib + + * gnus-group.el (gnus-group-gmane-group-download-format): New variable. + (gnus-group-read-ephemeral-gmane-group): New command. + 2008-01-06 Dan Nicolaescu * gnus.el (gnus-use-long-file-name): Remove reference to xenix. diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 6341c8e48d8..41f9dd0baca 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -174,8 +174,8 @@ So the cdr of each bookmark is an alist too.") (defmacro gnus-bookmark-mouse-available-p () "Return non-nil if a mouse is available." (if (featurep 'xemacs) - '(and (eq (device-class) 'color) (device-on-window-system-p)) - '(and (display-color-p) (display-mouse-p)))) + '(device-on-window-system-p) + '(display-mouse-p))) (defun gnus-bookmark-remove-properties (string) "Remove all text properties from STRING." diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 73d632591b5..2be0b6e5c80 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1,7 +1,7 @@ ;;; gnus-group.el --- group mode commands for Gnus ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -2320,6 +2320,44 @@ Return the name of the group if selection was successful." (message "Quit reading the ephemeral group") nil))))) +(defvar gnus-group-gmane-group-download-format + "http://download.gmane.org/%s/%s/%s") +(autoload 'url-insert-file-contents "url-handlers") + +;; FIXME: Make gnus-group-gmane-group-download-format customizable. Add +;; documentation, menu, key bindings... + +(defun gnus-group-read-ephemeral-gmane-group (group start end) + "Read articles from Gmane group GROUP as an ephemeral group. +START and END specify the articles range. The articles are +downloaded via HTTP using the URL specified by +`gnus-group-gmane-group-download-format'." + ;; See for more information. + (interactive + (list + (gnus-group-completing-read "Gmane group: ") + (read-number "Start article number: ") + (read-number "End article number: "))) + (when (< (- end start) 0) + (error "Invalid range.")) + (when (> (- end start) + (min (or gnus-large-ephemeral-newsgroup 100) 100)) + (unless (y-or-n-p + (format "Large range (%s to %s), continue anyway? " + start end)) + (error "Range too large. Aborted."))) + (let ((tmpfile (make-temp-file "gmane.gnus-temp-group-"))) + (with-temp-file tmpfile + (url-insert-file-contents + (format gnus-group-gmane-group-download-format + group start end)) + (write-region (point-min) (point-max) tmpfile) + (gnus-group-read-ephemeral-group + "rs-gnus-read-gmane" + `(nndoc ,tmpfile + (nndoc-article-type guess)))) + (delete-file tmpfile))) + (defun gnus-group-jump-to-group (group &optional prompt) "Jump to newsgroup GROUP. -- cgit v1.2.3