+2002-01-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.el (gnus-logo-color-alist): Added more colors from Luis.
+
+2002-01-05 Keiichi Suzuki <keiichi@nanap.org>
+
+ * nntp.el (nntp-possibly-change-group): Erase contents of nntp
+ buffer to get rid of junk line.
+
2002-01-05 Simon Josefsson <jas@extundo.com>
* message.el (message-mode-map): Bind message-goto-from to C-c C-f
2002-01-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-sum.el (gnus-thread-latest-date): New function.
+ (gnus-thread-sort-by-most-recent-number): Renamed.
+ (gnus-thread-sort-functions): Doc fix.
+ (gnus-select-group-hook): Don't use setq on a hook.
+ (gnus-thread-latest-date): Use date, not number
+
+ * gnus-agent.el (gnus-agent-expire-days): Doc fix.
+ (gnus-agent-expire): Allow regexp of expire-days.
+
+ * gnus-art.el (gnus-article-reply-with-original): Deactivate
+ region.
+ (gnus-article-followup-with-original): Ditto.
+
+ * gnus-sum.el (gnus-thread-highest-number): Doc fix.
+
* gnus-art.el (gnus-mime-display-alternative): Use
gnus-local-map-property.
(gnus-mime-display-alternative): Ditto.
:type 'integer)
(defcustom gnus-agent-expire-days 7
- "Read articles older than this will be expired."
+ "Read articles older than this will be expired.
+This can also be a list of regexp/day pairs. The regexps will
+be matched against group names."
:group 'gnus-agent
:type 'integer)
"Expire all old articles."
(interactive)
(let ((methods gnus-agent-covered-methods)
- (day (- (time-to-days (current-time)) gnus-agent-expire-days))
+ (day (if (numberp gnus-agent-expire-days)
+ (- (time-to-days (current-time)) gnus-agent-expire-days)
+ nil))
+ (current-day (time-to-days (current-time)))
gnus-command-method sym group articles
history overview file histories elem art nov-file low info
- unreads marked article orig lowest highest)
+ unreads marked article orig lowest highest found days)
(save-excursion
(setq overview (gnus-get-buffer-create " *expire overview*"))
(while (setq gnus-command-method (pop methods))
(skip-chars-forward "^\t")
(if (let ((fetch-date (read (current-buffer))))
(if (numberp fetch-date)
- (> fetch-date day)
+ ;; We now have the arrival day, so we see
+ ;; whether it's old enough to be expired.
+ (if (numberp day)
+ (> fetch-date day)
+ (skip-chars-forward "\t")
+ (setq found nil
+ days gnus-agent-expire-days)
+ (while (and (not found)
+ days)
+ (when (looking-at (caar days))
+ (setq found (cadar days)))
+ (pop days))
+ (> fetch-date (- current-day found)))
;; History file is corrupted.
(gnus-message
5
(let ((article (cdr gnus-article-current)))
(if (not mark-active)
(gnus-summary-reply (list (list article)) wide)
+ ;; Deactivate active regions.
+ (when (and (boundp 'transient-mark-mode)
+ transient-mark-mode)
+ (setq mark-active nil))
(gnus-summary-reply
(list (list article (buffer-substring (point) (mark)))) wide))))
(let ((article (cdr gnus-article-current)))
(if (not mark-active)
(gnus-summary-followup (list (list article)))
+ ;; Deactivate active regions.
+ (when (and (boundp 'transient-mark-mode)
+ transient-mark-mode)
+ (setq mark-active nil))
(gnus-summary-followup
(list (list article (buffer-substring (point) (mark))))))))
Ready-made functions include `gnus-thread-sort-by-number',
`gnus-thread-sort-by-author', `gnus-thread-sort-by-subject',
`gnus-thread-sort-by-date', `gnus-thread-sort-by-score',
-`gnus-thread-sort-by-most-recent-thread' and
+`gnus-thread-sort-by-most-recent-number',
+`gnus-thread-sort-by-most-recent-date', and
`gnus-thread-sort-by-total-score' (see `gnus-thread-score-function').
When threading is turned off, the variable
`gnus-summary-next-same-subject' command does, you can use the
following hook:
- (setq gnus-select-group-hook
- (list
- (lambda ()
- (mapcar (lambda (header)
- (mail-header-set-subject
- header
- (gnus-simplify-subject
- (mail-header-subject header) 're-only)))
- gnus-newsgroup-headers))))"
+ (add-hook gnus-select-group-hook
+ (lambda ()
+ (mapcar (lambda (header)
+ (mail-header-set-subject
+ header
+ (gnus-simplify-subject
+ (mail-header-subject header) 're-only)))
+ gnus-newsgroup-headers)))
:group 'gnus-group-select
:type 'hook)
(t
(gnus-thread-total-score-1 (list thread)))))
-(defun gnus-thread-sort-by-most-recent-thread (h1 h2)
+(defun gnus-thread-sort-by-most-recent-number (h1 h2)
"Sort threads such that the thread with the most recently arrived article is comes first."
(> (gnus-thread-highest-number h1) (gnus-thread-highest-number h2)))
(defun gnus-thread-highest-number (thread)
- "Return the highest article number from THREAD."
+ "Return the highest article number in THREAD."
(apply 'max (mapcar (lambda (header)
(mail-header-number header))
(message-flatten-list thread))))
+(defun gnus-thread-sort-by-most-recent-date (h1 h2)
+ "Sort threads such that the thread with the most recently arrived article is comes first."
+ (> (gnus-thread-highest-number h1) (gnus-thread-highest-number h2)))
+
+(defun gnus-thread-latest-date (thread)
+ "Return the highest article number in THREAD."
+ (let ((previous-time 0))
+ (apply 'max (mapcar
+ (lambda (header)
+ (setq previous-time
+ (time-to-seconds
+ (mail-header-parse-date
+ (condition-case ()
+ (mail-header-date header)
+ (error previous-time))))))
+ (sort
+ (message-flatten-list thread)
+ (lambda (h1 h2)
+ (< (mail-header-number h1)
+ (mail-header-number h2))))))))
+
(defun gnus-thread-total-score-1 (root)
;; This function find the total score of the thread below ROOT.
(setq root (car root))
(berry "#cc6485" "#ff7db5")
(dino "#724214" "#1e3f03")
(oort "#cccccc" "#888888")
+ (storm "#666699" "#99ccff")
+ (pdino "#9999cc" "#99ccff")
+ (purp "#9999cc" "#666699")
(neutral "#b4b4b4" "#878787")
(september "#bf9900" "#ffcc00"))
"Color alist used for the Gnus logo.")
(last-point (point-min))
(nntp-inhibit-erase t)
(buf (nntp-find-connection-buffer nntp-server-buffer))
- (command (if nntp-server-list-active-group "LIST ACTIVE" "GROUP")))
+ (command (if nntp-server-list-active-group
+ "LIST ACTIVE" "GROUP")))
(while groups
;; Send the command to the server.
(nntp-send-command nil command (pop groups))
(erase-buffer)
(nntp-send-command "^[245].*\n" "GROUP" group)
(setcar (cddr entry) group)
- (erase-buffer))))))
+ (erase-buffer)
+ (save-excursion
+ (set-buffer nntp-server-buffer)
+ (erase-buffer)))))))
(defun nntp-decode-text (&optional cr-only)
"Decode the text in the current buffer."