From: yamaoka Date: Fri, 23 Feb 2001 06:07:45 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_0-09-quimby~14 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb90b1ee9d4cea5eeb4b81c2a1c28365d4071a7;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65a7424..eb40e35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2001-02-22 23:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-insert-articles): Remove fetched headers. + + * webmail.el (webmail-type-definition): Deja is brought by google. + +2001-02-22 22:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-fetch-headers): New. + (gnus-select-newsgroup): Use it. + (gnus-summary-insert-articles): New. + (gnus-summary-insert-old-articles): New. + (gnus-summary-insert-new-articles): New. + + * gnus-group.el (gnus-group-prepare-flat-list-dead): Use decoded-name. + (gnus-group-list-active): Ditto. + * gnus-sum.el (gnus-set-mode-line): Ditto. + (gnus-summary-read-group-1): Ditto. + 2001-02-21 15:00:00 ShengHuo ZHU * gnus-topic.el (gnus-topic-get-new-news-this-topic): Redraw the diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 8e75ae4..2bebb8a 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1211,9 +1211,7 @@ if it is a string, only list groups matching REGEXP." (gnus-add-text-properties (point) (prog1 (1+ (point)) (insert " " mark " *: " - (gnus-group-name-decode group - (gnus-group-name-charset - nil group)) + (gnus-group-decoded-name group) "\n")) (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) 'gnus-unread t @@ -3331,9 +3329,7 @@ entail asking the server for the groups." (gnus-add-text-properties (point) (prog1 (1+ (point)) (insert " *: " - (gnus-group-name-decode group - (gnus-group-name-charset - nil group)) + (gnus-group-decoded-name group) "\n")) (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) 'gnus-unread t diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 801eb09..8d768c1 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1580,7 +1580,9 @@ increase the score of each group you read." "x" gnus-summary-limit-to-extra "E" gnus-summary-limit-include-expunged "c" gnus-summary-limit-exclude-childless-dormant - "C" gnus-summary-limit-mark-excluded-as-read) + "C" gnus-summary-limit-mark-excluded-as-read + "o" gnus-summary-insert-old-articles + "N" gnus-summary-insert-new-articles) (gnus-define-keys (gnus-summary-goto-map "G" gnus-summary-mode-map) "n" gnus-summary-next-unread-article @@ -2087,6 +2089,8 @@ increase the score of each group you read." ["Regenerate" gnus-summary-prepare t] ["Insert cached articles" gnus-summary-insert-cached-articles t] ["Toggle threading" gnus-summary-toggle-threads t]) + ["See old articles" gnus-summary-insert-old-articles t] + ["See new articles" gnus-summary-insert-new-articles t] ["Filter articles..." gnus-summary-execute-command t] ["Run command on subjects..." gnus-summary-universal-argument t] ["Search articles forward..." gnus-summary-search-article-forward t] @@ -3039,7 +3043,8 @@ If SHOW-ALL is non-nil, already read articles are also listed." ;; (when (and (not (gnus-group-native-p group)) ;; (not (gnus-gethash group gnus-newsrc-hashtb))) ;; (error "Dead non-native groups can't be entered")) - (gnus-message 5 "Retrieving newsgroup: %s..." group) + (gnus-message 5 "Retrieving newsgroup: %s..." + (gnus-group-decoded-name group)) (let* ((new-group (gnus-summary-setup-buffer group)) (quit-config (gnus-group-quit-config group)) (did-select (and new-group (gnus-select-newsgroup @@ -3071,7 +3076,8 @@ If SHOW-ALL is non-nil, already read articles are also listed." (gnus-handle-ephemeral-exit quit-config))) (let ((grpinfo (gnus-get-info group))) (if (null (gnus-info-read grpinfo)) - (gnus-message 3 "Group %s contains no messages" group) + (gnus-message 3 "Group %s contains no messages" + (gnus-group-decoded-name group)) (gnus-message 3 "Can't select group"))) nil) ;; The user did a `C-g' while prompting for number of articles, @@ -4362,6 +4368,37 @@ or a straight list of headers." (when changed (mail-header-set-subject header subject)))))) +(defun gnus-fetch-headers (articles) + "Fetch headers of ARTICLES." + (let ((name (gnus-group-decoded-name gnus-newsgroup-name))) + (gnus-message 5 "Fetching headers for %s..." name) + (prog1 + ;;;!!! FIXME: temporary fix for an infloop on nnimap. + (if (eq 'nnimap (car (gnus-find-method-for-group name))) + (if (eq 'nov + (setq gnus-headers-retrieved-by + (gnus-retrieve-headers + articles gnus-newsgroup-name + ;; We might want to fetch old headers, but + ;; not if there is only 1 article. + (and (or (and + (not (eq gnus-fetch-old-headers 'some)) + (not (numberp gnus-fetch-old-headers))) + (> (length articles) 1)) + gnus-fetch-old-headers)))) + (gnus-get-newsgroup-headers-xover + articles nil nil gnus-newsgroup-name t) + (gnus-get-newsgroup-headers)) + (gnus-retrieve-parsed-headers + articles gnus-newsgroup-name + ;; We might want to fetch old headers, but + ;; not if there is only 1 article. + (and (or (and (not (eq gnus-fetch-old-headers 'some)) + (not (numberp gnus-fetch-old-headers))) + (> (length articles) 1)) + gnus-fetch-old-headers))) + (gnus-message 5 "Fetching headers for %s...done" name)))) + (defun gnus-select-newsgroup (group &optional read-all select-articles) "Select newsgroup GROUP. If READ-ALL is non-nil, all articles in the group are selected. @@ -4436,34 +4473,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (gnus-make-hashtable (length articles))) (gnus-set-global-variables) ;; Retrieve the headers and read them in. - (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) - (setq gnus-newsgroup-headers - ;;;!!! FIXME: temporary fix for an infloop on nnimap. - (if (eq 'nnimap (car (gnus-find-method-for-group group))) - (if (eq 'nov - (setq - gnus-headers-retrieved-by - (gnus-retrieve-headers - articles gnus-newsgroup-name - ;; We might want to fetch old headers, but - ;; not if there is only 1 article. - (and (or (and - (not (eq gnus-fetch-old-headers 'some)) - (not (numberp gnus-fetch-old-headers))) - (> (length articles) 1)) - gnus-fetch-old-headers)))) - (gnus-get-newsgroup-headers-xover - articles nil nil gnus-newsgroup-name t) - (gnus-get-newsgroup-headers)) - (gnus-retrieve-parsed-headers - articles gnus-newsgroup-name - ;; We might want to fetch old headers, but - ;; not if there is only 1 article. - (and (or (and (not (eq gnus-fetch-old-headers 'some)) - (not (numberp gnus-fetch-old-headers))) - (> (length articles) 1)) - gnus-fetch-old-headers)))) - (gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name) + (setq gnus-newsgroup-headers (gnus-fetch-headers articles)) ;; Suppress duplicates? (when gnus-suppress-duplicates @@ -4761,11 +4771,8 @@ If WHERE is `summary', the summary mode line format will be used." (let* ((mformat (symbol-value (intern (format "gnus-%s-mode-line-format-spec" where)))) - (gnus-tmp-group-name (gnus-group-name-decode - gnus-newsgroup-name - (gnus-group-name-charset - nil - gnus-newsgroup-name))) + (gnus-tmp-group-name (gnus-group-decoded-name + gnus-newsgroup-name)) (gnus-tmp-article-number (or gnus-current-article 0)) (gnus-tmp-unread gnus-newsgroup-unreads) (gnus-tmp-unread-and-unticked (length gnus-newsgroup-unreads)) @@ -10422,6 +10429,103 @@ returned." (gnus-set-mode-line 'summary) n)) +(defun gnus-summary-insert-articles (articles) + (when (setq articles + (gnus-set-difference articles + (mapcar (lambda (h) (mail-header-number h)) + gnus-newsgroup-headers))) + (setq gnus-newsgroup-headers + (merge 'list + gnus-newsgroup-headers + (gnus-fetch-headers articles) + 'gnus-article-sort-by-number)) + ;; Suppress duplicates? + (when gnus-suppress-duplicates + (gnus-dup-suppress-articles)) + + ;; We might want to build some more threads first. + (when (and gnus-fetch-old-headers + (eq gnus-headers-retrieved-by 'nov)) + (if (eq gnus-fetch-old-headers 'invisible) + (gnus-build-all-threads) + (gnus-build-old-threads))) + ;; Let the Gnus agent mark articles as read. + (when gnus-agent + (gnus-agent-get-undownloaded-list)) + ;; Remove list identifiers from subject + (when gnus-list-identifiers + (gnus-summary-remove-list-identifiers)) + ;; First and last article in this newsgroup. + (when gnus-newsgroup-headers + (setq gnus-newsgroup-begin + (mail-header-number (car gnus-newsgroup-headers)) + gnus-newsgroup-end + (mail-header-number + (gnus-last-element gnus-newsgroup-headers)))) + (when gnus-use-scoring + (gnus-possibly-score-headers)))) + +(defun gnus-summary-insert-old-articles (&optional all) + "Insert all old articles in this group. +If ALL is non-nil, already read articles become readable. +If ALL is a number, fetch this number of articles." + (interactive "P") + (prog1 + (let ((old (mapcar 'car gnus-newsgroup-data)) + (i (car gnus-newsgroup-active)) + older len) + (while (<= i (cdr gnus-newsgroup-active)) + (or (memq i old) (push i older)) + (incf i)) + (setq len (length older)) + (cond + ((null older) nil) + ((numberp all) + (if (< all len) + (setq older (subseq older 0 all)))) + (all nil) + (t + (if (and (numberp gnus-large-newsgroup) + (> len gnus-large-newsgroup)) + (let ((input + (read-string + (format + "How many articles from %s (default %d): " + (gnus-limit-string + (gnus-group-decoded-name gnus-newsgroup-name) 35) + len)))) + (unless (string-match "^[ \t]*$" input) + (setq all (string-to-number input)) + (if (< all len) + (setq older (subseq older 0 all)))))))) + (if (not older) + (message "No old news.") + (gnus-summary-insert-articles older) + (gnus-summary-limit (gnus-union older old)))) + (gnus-summary-position-point))) + +(defun gnus-summary-insert-new-articles () + "Insert all new articles in this group." + (interactive) + (prog1 + (let ((old (mapcar 'car gnus-newsgroup-data)) + (old-active gnus-newsgroup-active) + (nnmail-fetched-sources (list t)) + i new) + (setq gnus-newsgroup-active + (gnus-activate-group gnus-newsgroup-name 'scan)) + (setq i (1+ (cdr old-active))) + (while (<= i (cdr gnus-newsgroup-active)) + (push i new) + (incf i)) + (if (not new) + (message "No gnus is bad news.") + (gnus-summary-insert-articles new) + (setq gnus-newsgroup-unreads + (append gnus-newsgroup-unreads new)) + (gnus-summary-limit (gnus-union old new)))) + (gnus-summary-position-point))) + (gnus-summary-make-all-marking-commands) (gnus-ems-redefine) diff --git a/lisp/webmail.el b/lisp/webmail.el index 32d89fc..27fc0eb 100644 --- a/lisp/webmail.el +++ b/lisp/webmail.el @@ -144,14 +144,12 @@ (my-deja (paranoid cookie post) (address . "www.my-deja.com") - (open-url "http://www.deja.com/my/pr.xp") - (open-snarf . webmail-my-deja-open) + ;;(open-snarf . webmail-my-deja-open) (login-url content - ("%s" webmail-aux) - "member_name=%s&pw=%s&go=&priv_opt_MyDeja99=" + ("http://mydeja.google.com/cgi-bin/deja/maillogin.py") + "userid=%s&password=%s" user password) - (list-url "http://www.deja.com/rg_gotomail.xp") (list-snarf . webmail-my-deja-list) (article-snarf . webmail-my-deja-article) (trash-url webmail-aux id)))) @@ -1045,7 +1043,7 @@ (defun webmail-my-deja-open () (webmail-refresh-redirect) (goto-char (point-min)) - (if (re-search-forward "action=\"\\([^\"]+login_confirm\\.xp[^\"]*\\)\"" + (if (re-search-forward "action=\"\\([^\"]+maillogin\\.py[^\"]*\\)\"" nil t) (setq webmail-aux (match-string 1)) (webmail-error "open@1")))