* gnus.el (gnus-logo-color-alist): Added more colors from Luis.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 5 Jan 2002 22:24:00 +0000 (22:24 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 5 Jan 2002 22:24:00 +0000 (22:24 +0000)
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  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.

lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/gnus.el
lisp/nntp.el

index 04e1bd2..c7aef87 100644 (file)
@@ -1,3 +1,12 @@
+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.
index de9fd9a..39f2e71 100644 (file)
@@ -64,7 +64,9 @@
   :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)
 
@@ -1584,10 +1586,13 @@ The following commands are available:
   "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))
@@ -1610,7 +1615,19 @@ The following commands are available:
                (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
index 5066ba9..ab8cd76 100644 (file)
@@ -4669,6 +4669,10 @@ the entire article will be yanked."
   (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))))
 
@@ -4680,6 +4684,10 @@ the entire article will be yanked."
   (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))))))))
 
index 1e6c331..78a252b 100644 (file)
@@ -661,7 +661,8 @@ was sent, sorting by number means sorting by arrival time.)
 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
@@ -753,15 +754,14 @@ If you'd like to simplify subjects like the
 `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)
 
@@ -4166,16 +4166,37 @@ Unscored articles will be counted as having a score of zero."
    (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))
index c5f362d..8cd0710 100644 (file)
@@ -801,6 +801,9 @@ be set in `.emacs' instead."
     (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.")
index e343ad8..3098604 100644 (file)
@@ -574,7 +574,8 @@ noticing asynchronous data.")
              (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))
@@ -1173,7 +1174,10 @@ password contained in '~/.nntp-authinfo'."
          (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."