* gnus-topic.el (gnus-topic-select-group): Touch the dribble
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 13 Aug 2000 18:46:59 +0000 (18:46 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 13 Aug 2000 18:46:59 +0000 (18:46 +0000)
buffer.
(gnus-topic-hide-topic): Take a PERMANENT parameter.
(gnus-topic-show-topic): Ditto.

* gnus-dup.el (gnus-dup-suppress-articles): Do auto-expiry.

lisp/ChangeLog
lisp/gnus-dup.el
lisp/gnus-start.el
lisp/gnus-topic.el
lisp/mail-source.el

index c5e3b01..3c38576 100644 (file)
@@ -1,5 +1,21 @@
+2000-08-13 18:53:08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-topic.el (gnus-topic-select-group): Touch the dribble
+       buffer.
+       (gnus-topic-hide-topic): Take a PERMANENT parameter.
+       (gnus-topic-show-topic): Ditto.
+
+       * gnus-dup.el (gnus-dup-suppress-articles): Do auto-expiry.
+
+2000-08-12 21:48:00  John H. Palmieri  <palmieri@math.washington.edu>
+
+       * mail-source.el (mail-source-incoming-file-prefix): New
+       variable. 
+
 2000-08-12 20:29:53  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-check-first-time-used): Clean up a bit.
+
        * mailcap.el (mailcap-maybe-eval): Be even more warning.
 
 2000-08-11  Florian Weimer  <fw@deneb.enyo.de>
index 96609cb..e148f45 100644 (file)
@@ -137,6 +137,8 @@ seen in the same session."
     (gnus-dup-open))
   (gnus-message 6 "Suppressing duplicates...")
   (let ((headers gnus-newsgroup-headers)
+       (auto (and gnus-newsgroup-auto-expire
+                  (memq gnus-duplicate-mark gnus-auto-expirable-marks)))
        number header)
     (while (setq header (pop headers))
       (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb)
@@ -144,8 +146,10 @@ seen in the same session."
        (setq gnus-newsgroup-unreads
              (delq (setq number (mail-header-number header))
                    gnus-newsgroup-unreads))
-       (push (cons number gnus-duplicate-mark)
-             gnus-newsgroup-reads))))
+       (if (not auto)
+           (push (cons number gnus-duplicate-mark) gnus-newsgroup-reads)
+         (push number gnus-newsgroup-expirable)
+         (push (cons number gnus-expirable-mark) gnus-newsgroup-reads)))))
   (gnus-message 6 "Suppressing duplicates...done"))
 
 (defun gnus-dup-unsuppress-article (article)
index d409619..0782333 100644 (file)
@@ -1112,29 +1112,30 @@ for new groups, and subscribe the new groups as zombies."
 
 (defun gnus-check-first-time-used ()
   (catch 'ended
-    (let ((files (list gnus-current-startup-file
-                      (concat gnus-current-startup-file ".el")
-                      (concat gnus-current-startup-file ".eld")
-                      gnus-startup-file
-                      (concat gnus-startup-file ".el")
-                      (concat gnus-startup-file ".eld"))))
-      (while files
-       (when (file-exists-p (pop files))
-         (throw 'ended nil))))
+    ;; First check if any of the following files exist.  If they do,
+    ;; it's not the first time the user has used Gnus.
+    (dolist (file (list gnus-current-startup-file
+                       (concat gnus-current-startup-file ".el")
+                       (concat gnus-current-startup-file ".eld")
+                       gnus-startup-file
+                       (concat gnus-startup-file ".el")
+                       (concat gnus-startup-file ".eld")))
+      (when (file-exists-p file)
+       (throw 'ended nil)))
     (gnus-message 6 "First time user; subscribing you to default groups")
     (unless (gnus-read-active-file-p)
       (let ((gnus-read-active-file t))
        (gnus-read-active-file)))
     (setq gnus-newsrc-last-checked-date (current-time-string))
-    (let ((groups gnus-default-subscribed-newsgroups)
+    ;; Subscribe to the default newsgroups.
+    (let ((groups (or gnus-default-subscribed-newsgroups
+                     gnus-backup-default-subscribed-newsgroups))
          group)
-      (if (eq groups t)
-         nil
-       (setq groups (or groups gnus-backup-default-subscribed-newsgroups))
+      (when (eq groups t)
+       ;; If t, we subscribe (or not) all groups as if they were new.
        (mapatoms
         (lambda (sym)
-          (if (null (setq group (symbol-name sym)))
-              ()
+          (when (setq group (symbol-name sym))
             (let ((do-sub (gnus-matches-options-n group)))
               (cond
                ((eq do-sub 'subscribe)
@@ -1145,18 +1146,17 @@ for new groups, and subscribe the new groups as zombies."
                (t
                 (push group gnus-killed-list))))))
         gnus-active-hashtb)
-       (while groups
-         (when (gnus-active (car groups))
+       (dolist (group groups)
+         ;; Only subscribe the default groups that are activated.
+         (when (gnus-active group)
            (gnus-group-change-level
-            (car groups) gnus-level-default-subscribed gnus-level-killed))
-         (setq groups (cdr groups)))
+            group gnus-level-default-subscribed gnus-level-killed)))
        (save-excursion
          (set-buffer gnus-group-buffer)
          (gnus-group-make-help-group))
        (when gnus-novice-user
          (gnus-message 7 "`A k' to list killed groups"))))))
 
-
 (defun gnus-subscribe-group (group &optional previous method)
   "Subcribe GROUP and put it after PREVIOUS."
   (gnus-group-change-level
index 7981461..eb0f219 100644 (file)
@@ -1064,7 +1064,8 @@ If performed over a topic line, toggle folding the topic."
   (if (gnus-group-topic-p)
       (let ((gnus-group-list-mode
             (if all (cons (if (numberp all) all 7) t) gnus-group-list-mode)))
-       (gnus-topic-fold all))
+       (gnus-topic-fold all)
+       (gnus-dribble-touch))
     (gnus-group-select-group all)))
 
 (defun gnus-mouse-pick-topic (e)
@@ -1261,17 +1262,21 @@ If COPYP, copy the groups instead."
            (setq alist (cdr alist))))))
     (gnus-topic-update-topic)))
 
-(defun gnus-topic-hide-topic ()
-  "Hide the current topic."
-  (interactive)
+(defun gnus-topic-hide-topic (&optional permanent)
+  "Hide the current topic.
+If PERMANENT, make it stay hidden in subsequent sessions as well."
+  (interactive "P")
   (when (gnus-current-topic)
     (gnus-topic-goto-topic (gnus-current-topic))
+    (setcar (cddr (assoc (gnus-current-topic) gnus-topic-topology)) 'hidden)
     (gnus-topic-remove-topic nil nil)))
 
-(defun gnus-topic-show-topic ()
-  "Show the hidden topic."
-  (interactive)
+(defun gnus-topic-show-topic (&optional permanent)
+  "Show the hidden topic.
+If PERMANENT, make it stay shown in subsequent sessions as well."
+  (interactive "P")
   (when (gnus-group-topic-p)
+    (setcar (cddr (assoc (gnus-current-topic) gnus-topic-topology)) nil)
     (gnus-topic-remove-topic t nil)))
 
 (defun gnus-topic-mark-topic (topic &optional unmark)
index be0cea4..55753d9 100644 (file)
@@ -67,6 +67,11 @@ If non-nil, this maildrop will be checked periodically for new mail."
   :group 'mail-source
   :type 'boolean)
 
+(defcustom mail-source-incoming-file-prefix "Incoming"
+  "Prefix for file name for storing incoming mail"
+  :group 'mail-source
+  :type 'string)
+
 (defcustom mail-source-report-new-mail-interval 5
   "Interval in minutes between checks for new mail."
   :group 'mail-source
@@ -296,7 +301,8 @@ Pass INFO on to CALLBACK."
          (let ((incoming
                 (mail-source-make-complex-temp-name
                  (expand-file-name
-                  "Incoming" mail-source-directory))))
+                  mail-source-incoming-file-prefix
+                  mail-source-directory))))
            (unless (file-exists-p (file-name-directory incoming))
              (make-directory (file-name-directory incoming) t))
            (rename-file mail-source-crash-box incoming t)))))))