+2006-01-30 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * nnweb.el (nnweb-google-parse-1): Clarify some comments.
+
+2006-01-30 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
+
+ * nnweb.el (nnweb-type-definition, nnweb-google-parse-1)
+ (nnweb-google-create-mapping, nnweb-google-search): Adapt to
+ current Google Groups.
+
2006-01-26 Reiner Steib <Reiner.Steib@gmx.de>
+ * gnus-sum.el (gnus-summary-make-tool-bar): Add checks for XEmacs
+ and tool-bar-mode.
+
+ * gnus-group.el (gnus-group-make-tool-bar): Add checks for XEmacs
+ and tool-bar-mode.
+
+ * message.el (message-tool-bar-update): Simplify.
+ (message-make-tool-bar): Add checks for XEmacs and tool-bar-mode.
+
+ * gnus-sum.el (gnus-summary-tool-bar-update): Check for
+ gnus-summary-buffer.
+ (gnus-summary-tool-bar-gnome): Use "reply-author" icon for
+ gnus-summary-reply.
+
* gmm-utils.el (gmm): Add :version.
2006-01-26 Katsumi Yamaoka <yamaoka@jpl.org>
(defun gnus-group-make-tool-bar (&optional force)
"Make a group mode tool bar from `gnus-group-tool-bar'.
When FORCE, rebuild the tool bar."
- (when (or (not gnus-group-tool-bar-map) force)
+ (when (and (not (featurep 'xemacs))
+ (boundp 'tool-bar-mode)
+ tool-bar-mode
+ ;; The Gnus 5.10.6 code checked (default-value 'tool-bar-mode).
+ ;; Why? --rsteib
+ (or (not gnus-group-tool-bar-map) force))
(let ((map (when (default-value 'tool-bar-mode)
(let ((load-path (mm-image-load-path)))
(gmm-tool-bar-from-list gnus-group-tool-bar
;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only
;; affect _new_ message buffers. We might add a function that walks thru all
-;; message-mode buffers and force the update.
+;; summary-mode buffers and force the update.
(defun gnus-summary-tool-bar-update (&optional symbol value)
"Update summary mode toolbar.
Setter function for custom variables."
- (if symbol
- ;; When used as ":set" function:
- (progn
- (set-default symbol value)
- (setq-default gnus-summary-tool-bar-map nil))
- (gnus-summary-make-tool-bar t)))
+ (setq-default gnus-summary-tool-bar-map nil)
+ (when symbol
+ ;; When used as ":set" function:
+ (set-default symbol value))
+ (when (gnus-buffer-live-p gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
+ (gnus-summary-make-tool-bar))))
;; The default will be changed when the new icons have been checked in:
(defcustom gnus-summary-tool-bar 'gnus-summary-tool-bar-retro
(defcustom gnus-summary-tool-bar-gnome
'((gnus-summary-post-news "compose" nil)
(gnus-summary-reply-with-original "reply-author")
- (gnus-summary-reply "reply" nil :visible nil)
+ (gnus-summary-reply "reply-author" nil :visible nil)
(gnus-summary-followup-with-original "reply-all")
(gnus-summary-followup "reply-all" nil :visible nil)
(gnus-summary-mail-forward "forward")
(gnus-summary-save-article "save") ;; stock_mail-copy
(gnus-summary-search-article-forward "search")
(gnus-summary-print-article "print")
- ;; gnus-group-read-only-p
(gnus-summary-mark-as-expirable
"delete" nil
:visible (gnus-check-backend-function 'request-expire-articles
(defun gnus-summary-make-tool-bar (&optional force)
"Make a summary mode tool bar from `gnus-summary-tool-bar'.
When FORCE, rebuild the tool bar."
- (when (or (not gnus-summary-tool-bar-map) force)
+ (when (and (not (featurep 'xemacs))
+ (boundp 'tool-bar-mode)
+ tool-bar-mode
+ (or (not gnus-summary-tool-bar-map) force))
(let ((map (when (default-value 'tool-bar-mode)
(let ((load-path (mm-image-load-path)))
(gmm-tool-bar-from-list gnus-summary-tool-bar
(defun message-tool-bar-update (&optional symbol value)
"Update message mode toolbar.
Setter function for custom variables."
- (if symbol
- ;; When used as ":set" function:
- (progn
- (set-default symbol value)
- (setq-default message-tool-bar-map nil))
- (message-make-tool-bar t)))
+ (setq-default message-tool-bar-map nil)
+ (when symbol
+ ;; When used as ":set" function:
+ (set-default symbol value)))
;; The default will be changed when the new icons have been checked in:
(defcustom message-tool-bar 'message-tool-bar-retro
(defun message-make-tool-bar (&optional force)
"Make a message mode tool bar from `message-tool-bar-list'.
When FORCE, rebuild the tool bar."
- (when (or (not message-tool-bar-map) force)
+ (when (and (not (featurep 'xemacs))
+ (boundp 'tool-bar-mode)
+ tool-bar-mode
+ (or (not message-tool-bar-map) force))
(setq message-tool-bar-map
(when (default-value 'tool-bar-mode)
(let ((load-path (mm-image-load-path)))
;; Note: You need to have `w3' installed for some functions to work.
-;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff
-;; related to web groups (gnus-group-make-web-group) doesn't work anymore.
+;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane
+;; web groups (`gnus-group-make-web-group') doesn't work anymore.
-;; Fetching an article by MID (cf. gnus-refer-article-method) over Google
-;; Groups should work.
+;; FIXME: Solid web groups are currently broken because ARGS are no longer
+;; passed from `gnus-group-make-web-group' to `nnweb-request-create-group'.
+;; See revision 6.96 of `gnus-group.el' (2003-01-06).
;;; Code:
(defvar nnweb-type-definition
'((google
(id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
+ (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
(article . nnweb-google-wash-article)
(reference . identity)
(map . nnweb-google-create-mapping)
(base . "http://groups.google.com")
(identifier . nnweb-google-identity))
(dejanews ;; alias of google
- (article . ignore)
- (id . "http://groups.google.com/groups?selm=%s&output=gplain")
+ (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
+ (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
+ (article . nnweb-google-wash-article)
(reference . identity)
(map . nnweb-google-create-mapping)
(search . nnweb-google-search)
(mm-url-decode-entities))))
(defun nnweb-google-parse-1 (&optional Message-ID)
+ "Parse search result in current buffer."
(let ((i 0)
(case-fold-search t)
(active (cadr (assoc nnweb-group nnweb-group-alist)))
nnweb-group-alist))
;; Go through all the article hits on this page.
(goto-char (point-min))
- (while (re-search-forward
- "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t)
- (setq mid (match-string 2)
+ (while
+ (re-search-forward
+ "a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)"
+ nil t)
+ (setq Newsgroups (match-string-no-properties 1)
+ ;; Note: Starting with Google Groups 2, `mid' is a Google-internal
+ ;; ID, not a proper Message-ID.
+ mid (match-string-no-properties 2)
url (format
- (nnweb-definition 'id) mid))
+ (nnweb-definition 'result) Newsgroups mid))
(narrow-to-region (search-forward ">" nil t)
(search-forward "</a>" nil t))
(mm-url-remove-markup)
(setq Subject (buffer-string))
(goto-char (point-max))
(widen)
- (forward-line 2)
- (when (looking-at "<br><font[^>]+>")
- (goto-char (match-end 0)))
- (if (not (looking-at "<a[^>]+>"))
- (skip-chars-forward " \t")
- (narrow-to-region (point)
- (search-forward "</a>" nil t))
- (mm-url-remove-markup)
- (mm-url-decode-entities)
- (setq Newsgroups (buffer-string))
- (goto-char (point-max))
- (widen)
- (skip-chars-forward "- \t"))
+ (narrow-to-region (point)
+ (search-forward "</td" nil t))
+
+ (mm-url-remove-markup)
+ (mm-url-decode-entities)
+ (search-backward " - ")
(when (looking-at
- "\\([0-9]+\\)[/ ]\\([A-Za-z]+\\)[/ ]\\([0-9]+\\)[ \t]*by[ \t]*\\([^<]*\\) - <a")
+ " - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?, [^\n]+by \\([^<\n]+\\)\n")
(setq From (match-string 4)
Date (format "%s %s 00:00:00 %s"
- (match-string 2) (match-string 1)
- (match-string 3))))
+ (match-string 1)
+ (match-string 2)
+ (or (match-string 3)
+ (substring (current-time-string) -4)))))
+
+ (widen)
(forward-line 1)
(incf i)
(unless (nnweb-get-hashtb url)
(goto-char (point-min))
(incf i 100)
(if (or (not (re-search-forward
- "<td nowrap><a href=\\([^>]+\\).*<span class=b>Next</span>" nil t))
+ "<td><a href=\"\n\\([^>\"]+\\)\"><img src=\"/img/nav_next" nil t))
(>= i nnweb-max-hits))
(setq more nil)
;; Yup, there are more articles
("hl" . "en")
("lr" . "")
("safe" . "off")
- ("sites" . "groups")))))
+ ("sites" . "groups")
+ ("filter" . "0")))))
t)
(defun nnweb-google-identity (url)