From 50921945dd774cf83586a7cf9bce96be0f9549f3 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 13 Aug 2000 18:46:59 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/gnus-dup.el | 8 ++++++-- lisp/gnus-start.el | 40 ++++++++++++++++++++-------------------- lisp/gnus-topic.el | 19 ++++++++++++------- lisp/mail-source.el | 8 +++++++- 5 files changed, 61 insertions(+), 30 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5e3b01a9..3c385763e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,21 @@ +2000-08-13 18:53:08 Lars Magne Ingebrigtsen + + * 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 + + * mail-source.el (mail-source-incoming-file-prefix): New + variable. + 2000-08-12 20:29:53 Lars Magne Ingebrigtsen + * 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 diff --git a/lisp/gnus-dup.el b/lisp/gnus-dup.el index 96609cb53..e148f4574 100644 --- a/lisp/gnus-dup.el +++ b/lisp/gnus-dup.el @@ -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) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index d4096197c..078233373 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -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 diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 7981461c8..eb0f219cf 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -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) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index be0cea435..55753d938 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -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))))))) -- 2.25.1