1 ;;; nnfolder.el --- mail folder access for Gnus
2 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
4 ;; Author: Scott Byer <byer@mv.us.adobe.com>
5 ;; Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
6 ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7 ;; Keywords: news, mail
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; For an overview of what the interface functions do, please see the
31 ;; Various enhancements by byer@mv.us.adobe.com (Scott Byer).
38 (eval-when-compile (require 'cl))
40 (defvar nnfolder-directory (expand-file-name "~/Mail/")
41 "The name of the nnfolder directory.")
43 (defvar nnfolder-active-file
44 (concat (file-name-as-directory nnfolder-directory) "active")
45 "The name of the active file.")
47 ;; I renamed this variable to something more in keeping with the general GNU
50 (defvar nnfolder-ignore-active-file nil
51 "If non-nil, causes nnfolder to do some extra work in order to determine the true active ranges of an mbox file.
52 Note that the active file is still saved, but it's values are not
53 used. This costs some extra time when scanning an mbox when opening
56 (defvar nnfolder-newsgroups-file
57 (concat (file-name-as-directory nnfolder-directory) "newsgroups")
58 "Mail newsgroups description file.")
60 (defvar nnfolder-get-new-mail t
61 "If non-nil, nnfolder will check the incoming mail file and split the mail.")
63 (defvar nnfolder-prepare-save-mail-hook nil
64 "Hook run narrowed to an article before saving.")
66 (defvar nnfolder-inhibit-expiry nil
67 "If non-nil, inhibit expiry.")
71 (defconst nnfolder-version "nnfolder 1.0"
74 (defconst nnfolder-article-marker "X-Gnus-Article-Number: "
75 "String used to demarcate what the article number for a message is.")
77 (defvar nnfolder-current-group nil)
78 (defvar nnfolder-current-buffer nil)
79 (defvar nnfolder-status-string "")
80 (defvar nnfolder-group-alist nil)
81 (defvar nnfolder-buffer-alist nil)
82 (defvar nnfolder-active-timestamp nil)
86 (defvar nnfolder-current-server nil)
87 (defvar nnfolder-server-alist nil)
88 (defvar nnfolder-server-variables
89 `((nnfolder-directory ,nnfolder-directory)
90 (nnfolder-active-file ,nnfolder-active-file)
91 (nnfolder-newsgroups-file ,nnfolder-newsgroups-file)
92 (nnfolder-get-new-mail ,nnfolder-get-new-mail)
93 (nnfolder-inhibit-expiry ,nnfolder-inhibit-expiry)
94 (nnfolder-current-group nil)
95 (nnfolder-prepare-save-mail-hook nil)
96 (nnfolder-ignore-active-file ,nnfolder-ignore-active-file)
97 (nnfolder-current-buffer nil)
98 (nnfolder-status-string "")
99 (nnfolder-group-alist nil)
100 (nnfolder-buffer-alist nil)
101 (nnfolder-active-timestamp nil)))
105 ;;; Interface functions
107 (defun nnfolder-retrieve-headers (sequence &optional newsgroup server fetch-old)
109 (set-buffer nntp-server-buffer)
111 (let ((delim-string (concat "^" rmail-unix-mail-delimiter))
112 article art-string start stop)
113 (nnfolder-possibly-change-group newsgroup server)
114 (set-buffer nnfolder-current-buffer)
115 (goto-char (point-min))
116 (if (stringp (car sequence))
119 (setq article (car sequence))
120 (setq art-string (nnfolder-article-string article))
121 (set-buffer nnfolder-current-buffer)
122 (if (or (search-forward art-string nil t)
123 ;; Don't search the whole file twice! Also, articles
124 ;; probably have some locality by number, so searching
125 ;; backwards will be faster. Especially if we're at the
126 ;; beginning of the buffer :-). -SLB
127 (search-backward art-string nil t))
129 (setq start (or (re-search-backward delim-string nil t)
131 (search-forward "\n\n" nil t)
132 (setq stop (1- (point)))
133 (set-buffer nntp-server-buffer)
134 (insert (format "221 %d Article retrieved.\n" article))
135 (insert-buffer-substring nnfolder-current-buffer start stop)
136 (goto-char (point-max))
138 (setq sequence (cdr sequence)))
140 (set-buffer nntp-server-buffer)
141 (nnheader-fold-continuation-lines)
144 (defun nnfolder-open-server (server &optional defs)
145 (nnheader-change-server 'nnfolder server defs)
146 (when (not (file-exists-p nnfolder-directory))
148 (make-directory nnfolder-directory t)
151 ((not (file-exists-p nnfolder-directory))
152 (nnfolder-close-server)
153 (nnheader-report 'nnfolder "Couldn't create directory: %s"
155 ((not (file-directory-p (file-truename nnfolder-directory)))
156 (nnfolder-close-server)
157 (nnheader-report 'nnfolder "Not a directory: %s" nnfolder-directory))
159 (nnheader-report 'nnfolder "Opened server %s using directory %s"
160 server nnfolder-directory)
163 (defun nnfolder-close-server (&optional server)
164 (setq nnfolder-current-server nil
165 nnfolder-group-alist nil)
168 (defun nnfolder-server-opened (&optional server)
169 (and (equal server nnfolder-current-server)
171 (buffer-name nntp-server-buffer)))
173 (defun nnfolder-request-close ()
174 (let ((alist nnfolder-buffer-alist))
176 (nnfolder-close-group (caar alist) nil t)
177 (setq alist (cdr alist))))
178 (setq nnfolder-buffer-alist nil
179 nnfolder-current-server nil
180 nnfolder-group-alist nil))
182 (defun nnfolder-status-message (&optional server)
183 nnfolder-status-string)
185 (defun nnfolder-request-article (article &optional newsgroup server buffer)
186 (nnfolder-possibly-change-group newsgroup server)
188 (set-buffer nnfolder-current-buffer)
189 (goto-char (point-min))
190 (if (search-forward (nnfolder-article-string article) nil t)
192 (re-search-backward (concat "^" rmail-unix-mail-delimiter) nil t)
195 (or (and (re-search-forward
196 (concat "^" rmail-unix-mail-delimiter) nil t)
198 (goto-char (point-max)))
200 (let ((nntp-server-buffer (or buffer nntp-server-buffer)))
201 (set-buffer nntp-server-buffer)
203 (insert-buffer-substring nnfolder-current-buffer start stop)
204 (goto-char (point-min))
205 (while (looking-at "From ")
207 (insert "X-From-Line: ")
209 (if (numberp article)
210 (cons nnfolder-current-group article)
211 (goto-char (point-min))
212 (search-forward (concat "\n" nnfolder-article-marker))
213 (cons nnfolder-current-group
216 (point) (progn (end-of-line) (point)))))))))))
218 (defun nnfolder-request-group (group &optional server dont-check)
220 (nnmail-activate 'nnfolder)
221 (if (not (assoc group nnfolder-group-alist))
222 (nnheader-report 'nnfolder "No such group: %s" group)
223 (nnfolder-possibly-change-group group server)
226 (nnheader-report 'nnfolder "Selected group %s" group)
228 (let* ((active (assoc group nnfolder-group-alist))
230 (range (cadr active))
231 (minactive (car range))
232 (maxactive (cdr range)))
235 (nnheader-report 'nnfolder "No such group: %s" group))
237 (nnheader-report 'nnfolder "Selected group %s" group)
238 (nnheader-insert "211 %d %d %d %s\n"
239 (1+ (- maxactive minactive))
240 minactive maxactive group))))))))
242 (defun nnfolder-request-scan (&optional group server)
243 (nnfolder-possibly-change-group group server)
247 (let ((bufs nnfolder-buffer-alist))
250 (if (not (buffer-name (nth 1 (car bufs))))
251 (setq nnfolder-buffer-alist
252 (delq (car bufs) nnfolder-buffer-alist))
253 (set-buffer (nth 1 (car bufs)))
254 (and (buffer-modified-p) (save-buffer))
255 (kill-buffer (current-buffer)))
256 (setq bufs (cdr bufs))))))
260 ;; Don't close the buffer if we're not shutting down the server. This way,
261 ;; we can keep the buffer in the group buffer cache, and not have to grovel
262 ;; over the buffer again unless we add new mail to it or modify it in some
265 (defun nnfolder-close-group (group &optional server force)
266 ;; Make sure we _had_ the group open.
267 (when (or (assoc group nnfolder-buffer-alist)
268 (equal group nnfolder-current-group))
269 (nnfolder-possibly-change-group group server)
271 (set-buffer nnfolder-current-buffer)
272 ;; If the buffer was modified, write the file out now.
273 (and (buffer-modified-p) (save-buffer))
274 ;; If we're shutting the server down, we need to kill the
275 ;; buffer and remove it from the open buffer list. Or, of
276 ;; course, if we're trying to minimize our space impact.
277 (kill-buffer (current-buffer))
278 (setq nnfolder-buffer-alist (delq (assoc group nnfolder-buffer-alist)
279 nnfolder-buffer-alist))))
280 (setq nnfolder-current-group nil
281 nnfolder-current-buffer nil)
284 (defun nnfolder-request-create-group (group &optional server)
285 (nnmail-activate 'nnfolder)
287 (unless (assoc group nnfolder-group-alist)
288 (push (list group (cons 1 0)) nnfolder-group-alist)
289 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)))
292 (defun nnfolder-request-list (&optional server)
294 (nnmail-find-file nnfolder-active-file)
295 (setq nnfolder-group-alist (nnmail-get-active))))
297 (defun nnfolder-request-newgroups (date &optional server)
298 (nnfolder-request-list server))
300 (defun nnfolder-request-list-newsgroups (&optional server)
302 (nnmail-find-file nnfolder-newsgroups-file)))
304 (defun nnfolder-request-expire-articles
305 (articles newsgroup &optional server force)
306 (nnfolder-possibly-change-group newsgroup server)
309 (nnmail-activate 'nnfolder)
312 (set-buffer nnfolder-current-buffer)
313 (while (and articles is-old)
314 (goto-char (point-min))
315 (if (search-forward (nnfolder-article-string (car articles)) nil t)
317 (nnmail-expired-article-p
320 (point) (progn (end-of-line) (point)))
321 force nnfolder-inhibit-expiry))
323 (nnheader-message 5 "Deleting article %d..."
324 (car articles) newsgroup)
325 (nnfolder-delete-mail))
326 (setq rest (cons (car articles) rest))))
327 (setq articles (cdr articles)))
328 (and (buffer-modified-p) (save-buffer))
329 ;; Find the lowest active article in this group.
330 (let* ((active (cadr (assoc newsgroup nnfolder-group-alist)))
331 (marker (concat "\n" nnfolder-article-marker))
333 (activemin (cdr active)))
334 (goto-char (point-min))
335 (while (and (search-forward marker nil t)
336 (re-search-forward number nil t))
337 (setq activemin (min activemin
338 (string-to-number (buffer-substring
341 (setcar active activemin))
342 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
343 (nconc rest articles))))
345 (defun nnfolder-request-move-article
346 (article group server accept-form &optional last)
347 (nnfolder-possibly-change-group group server)
348 (let ((buf (get-buffer-create " *nnfolder move*"))
351 (nnfolder-request-article article group server)
354 (buffer-disable-undo (current-buffer))
356 (insert-buffer-substring nntp-server-buffer)
357 (goto-char (point-min))
358 (while (re-search-forward
359 (concat "^" nnfolder-article-marker)
360 (save-excursion (search-forward "\n\n" nil t) (point)) t)
361 (delete-region (progn (beginning-of-line) (point))
362 (progn (forward-line 1) (point))))
363 (setq result (eval accept-form))
367 (nnfolder-possibly-change-group group server)
368 (set-buffer nnfolder-current-buffer)
369 (goto-char (point-min))
370 (if (search-forward (nnfolder-article-string article) nil t)
371 (nnfolder-delete-mail))
377 (defun nnfolder-request-accept-article (group &optional last)
378 (and (stringp group) (nnfolder-possibly-change-group group))
379 (let ((buf (current-buffer))
381 (goto-char (point-min))
382 (when (looking-at "X-From-Line: ")
383 (replace-match "From "))
385 (nnfolder-request-list)
388 (goto-char (point-min))
389 (search-forward "\n\n" nil t)
391 (while (re-search-backward (concat "^" nnfolder-article-marker) nil t)
392 (delete-region (point) (progn (forward-line 1) (point))))
393 (setq result (car (nnfolder-save-mail (and (stringp group) group)))))
395 (set-buffer nnfolder-current-buffer)
396 (and last (buffer-modified-p) (save-buffer))))
397 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
400 (defun nnfolder-request-replace-article (article group buffer)
401 (nnfolder-possibly-change-group group)
403 (set-buffer nnfolder-current-buffer)
404 (goto-char (point-min))
405 (if (not (search-forward (nnfolder-article-string article) nil t))
407 (nnfolder-delete-mail t t)
408 (insert-buffer-substring buffer)
409 (and (buffer-modified-p) (save-buffer))
412 (defun nnfolder-request-delete-group (group &optional force server)
413 (nnfolder-close-group group server t)
414 ;; Delete all articles in GROUP.
416 () ; Don't delete the articles.
417 ;; Delete the file that holds the group.
419 (delete-file (concat (file-name-as-directory nnfolder-directory)
422 ;; Remove the group from all structures.
423 (setq nnfolder-group-alist
424 (delq (assoc group nnfolder-group-alist) nnfolder-group-alist)
425 nnfolder-current-group nil
426 nnfolder-current-buffer nil)
427 ;; Save the active file.
428 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
431 (defun nnfolder-request-rename-group (group new-name &optional server)
432 (nnfolder-possibly-change-group group server)
434 (set-buffer nnfolder-current-buffer)
435 (and (file-writable-p buffer-file-name)
438 (rename-file buffer-file-name
439 (concat (file-name-as-directory nnfolder-directory)
443 ;; That went ok, so we change the internal structures.
444 (let ((entry (assoc group nnfolder-group-alist)))
445 (and entry (setcar entry new-name))
446 (setq nnfolder-current-buffer nil
447 nnfolder-current-group nil)
448 ;; Save the new group alist.
449 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
450 ;; We kill the buffer instead of renaming it and stuff.
451 (kill-buffer (current-buffer))
455 ;;; Internal functions.
457 (defun nnfolder-article-string (article)
458 (if (numberp article)
459 (concat "\n" nnfolder-article-marker (int-to-string article) " ")
460 (concat "\nMessage-ID: " article)))
462 (defun nnfolder-delete-mail (&optional force leave-delim)
463 ;; Beginning of the article.
468 (re-search-backward (concat "^" rmail-unix-mail-delimiter) nil t)
469 (if leave-delim (progn (forward-line 1) (point))
470 (match-beginning 0)))
473 (or (and (re-search-forward (concat "^" rmail-unix-mail-delimiter)
475 (if (and (not (bobp)) leave-delim)
476 (progn (forward-line -2) (point))
477 (match-beginning 0)))
479 (delete-region (point-min) (point-max)))))
481 (defun nnfolder-possibly-change-group (group &optional server)
483 (not (nnfolder-server-opened server)))
484 (nnfolder-open-server server))
485 (unless (file-exists-p nnfolder-directory)
486 (make-directory (directory-file-name nnfolder-directory) t))
487 (nnfolder-possibly-activate-groups nil)
488 (or (assoc group nnfolder-group-alist)
489 (not (file-exists-p (concat (file-name-as-directory nnfolder-directory)
492 (setq nnfolder-group-alist
493 (cons (list group (cons 1 0)) nnfolder-group-alist))
494 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)))
496 (if (and (equal group nnfolder-current-group)
497 nnfolder-current-buffer
498 (buffer-name nnfolder-current-buffer))
500 (setq nnfolder-current-group group)
502 ;; If we have to change groups, see if we don't already have the mbox
503 ;; in memory. If we do, verify the modtime and destroy the mbox if
504 ;; needed so we can rescan it.
505 (if (setq inf (assoc group nnfolder-buffer-alist))
506 (setq nnfolder-current-buffer (nth 1 inf)))
508 ;; If the buffer is not live, make sure it isn't in the alist. If it
509 ;; is live, verify that nobody else has touched the file since last
511 (if (or (not (and nnfolder-current-buffer
512 (buffer-name nnfolder-current-buffer)))
513 (not (and (bufferp nnfolder-current-buffer)
514 (verify-visited-file-modtime
515 nnfolder-current-buffer))))
517 (if (and nnfolder-current-buffer
518 (buffer-name nnfolder-current-buffer)
519 (bufferp nnfolder-current-buffer))
520 (kill-buffer nnfolder-current-buffer))
521 (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist))
527 (setq file (concat (file-name-as-directory nnfolder-directory)
529 (if (file-directory-p (file-truename file))
531 (if (not (file-exists-p file))
532 (write-region 1 1 file t 'nomesg))
533 (setq nnfolder-current-buffer
534 (set-buffer (nnfolder-read-folder file)))
535 (setq nnfolder-buffer-alist (cons (list group (current-buffer))
536 nnfolder-buffer-alist)))))))
537 (setq nnfolder-current-group group))
539 (defun nnfolder-save-mail (&optional group)
540 "Called narrowed to an article."
541 (let* ((nnmail-split-methods
542 (if group (list (list group "")) nnmail-split-methods))
544 (nreverse (nnmail-article-group 'nnfolder-active-number)))
545 (delim (concat "^" rmail-unix-mail-delimiter))
547 (goto-char (point-min))
548 ;; This might come from somewhere else.
549 (unless (looking-at delim)
550 (insert "From nobody " (current-time-string) "\n")
551 (goto-char (point-min)))
552 ;; Quote all "From " lines in the article.
554 (while (re-search-forward delim nil t)
557 (setq save-list group-art-list)
558 (nnmail-insert-lines)
559 (nnmail-insert-xref group-art-list)
560 (run-hooks 'nnfolder-prepare-save-mail-hook)
562 ;; Insert the mail into each of the destination groups.
563 (while group-art-list
564 (setq group-art (car group-art-list)
565 group-art-list (cdr group-art-list))
567 ;; Kill the previous newsgroup markers.
568 (goto-char (point-min))
569 (search-forward "\n\n" nil t)
571 (while (search-backward (concat "\n" nnfolder-article-marker) nil t)
572 (delete-region (1+ (point)) (progn (forward-line 2) (point))))
574 (nnfolder-possibly-change-group (car group-art))
575 ;; Insert the new newsgroup marker.
576 (nnfolder-insert-newsgroup-line group-art)
577 (unless nnfolder-current-buffer
578 (nnfolder-request-create-group (car group-art))
579 (nnfolder-possibly-change-group (car group-art)))
580 (let ((beg (point-min))
582 (obuf (current-buffer)))
583 (set-buffer nnfolder-current-buffer)
584 (goto-char (point-max))
585 (insert-buffer-substring obuf beg end)
588 ;; Did we save it anywhere?
591 (defun nnfolder-insert-newsgroup-line (group-art)
593 (goto-char (point-min))
594 (if (search-forward "\n\n" nil t)
597 (insert (format (concat nnfolder-article-marker "%d %s\n")
598 (cdr group-art) (current-time-string)))))))
600 (defun nnfolder-possibly-activate-groups (&optional group)
602 ;; If we're looking for the activation of a specific group, find out
603 ;; its real name and switch to it.
604 (if group (nnfolder-possibly-change-group group))
605 ;; If the group alist isn't active, activate it now.
606 (nnmail-activate 'nnfolder)))
608 (defun nnfolder-active-number (group)
610 ;; Find the next article number in GROUP.
612 (let ((active (cadr (assoc group nnfolder-group-alist))))
614 (setcdr active (1+ (cdr active)))
615 ;; This group is new, so we create a new entry for it.
616 ;; This might be a bit naughty... creating groups on the drop of
617 ;; a hat, but I don't know...
618 (setq nnfolder-group-alist
619 (cons (list group (setq active (cons 1 1)))
620 nnfolder-group-alist)))
622 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
623 (nnfolder-possibly-activate-groups group))))
626 ;; This method has a problem if you've accidentally let the active list get
627 ;; out of sync with the files. This could happen, say, if you've
628 ;; accidentally gotten new mail with something other than Gnus (but why
629 ;; would _that_ ever happen? :-). In that case, we will be in the middle of
630 ;; processing the file, ready to add new X-Gnus article number markers, and
631 ;; we'll run across a message with no ID yet - the active list _may_not_ be
634 ;; To handle this, I'm modifying this routine to maintain the maximum ID seen
635 ;; so far, and when we hit a message with no ID, we will _manually_ scan the
636 ;; rest of the message looking for any more, possibly higher IDs. We'll
637 ;; assume the maximum that we find is the highest active. Note that this
638 ;; shouldn't cost us much extra time at all, but will be a lot less
639 ;; vulnerable to glitches between the mbox and the active file.
641 (defun nnfolder-read-folder (file)
643 (nnfolder-possibly-activate-groups nil)
644 ;; We should be paranoid here and make sure the group is in the alist,
645 ;; and add it if it isn't.
646 ;;(if (not (assoc nnfoler-current-group nnfolder-group-alist)
647 (set-buffer (setq nnfolder-current-buffer
648 (nnheader-find-file-noselect file nil 'raw)))
649 (buffer-disable-undo (current-buffer))
650 (let* ((delim (concat "^" rmail-unix-mail-delimiter))
651 (marker (concat "\n" nnfolder-article-marker))
653 (active (cadr (assoc nnfolder-current-group
654 nnfolder-group-alist)))
655 ;; Set min to Big Number.
656 (min (max (1- (lsh 1 23)) (1- (lsh 1 24)) (1- (lsh 1 25))))
659 (goto-char (point-min))
661 ;; Anytime the active number is 1 or 0, it is suspect. In that case,
662 ;; search the file manually to find the active number. Or, of course,
663 ;; if we're being paranoid. (This would also be the place to build
664 ;; other lists from the header markers, such as expunge lists, etc., if
665 ;; we ever desired to abandon the active file entirely for mboxes.)
666 (when (or nnfolder-ignore-active-file
668 (while (and (search-forward marker nil t)
669 (re-search-forward number nil t))
670 (let ((newnum (string-to-number (match-string 0))))
671 (setq max (max max newnum))
672 (setq min (min min newnum))))
673 (setcar active (max 1 (min min max)))
674 (setcdr active (max max (cdr active)))
675 (goto-char (point-min)))
677 ;; Keep track of the active number on our own, and insert it back into
678 ;; the active list when we're done. Also, prime the pump to cut down on
679 ;; the number of searches we do.
680 (setq end (point-marker))
681 (set-marker end (or (and (re-search-forward delim nil t)
684 (while (not (= end (point-max)))
685 (setq start (marker-position end))
687 ;; There may be more than one "From " line, so we skip past
689 (while (looking-at delim)
691 (set-marker end (or (and (re-search-forward delim nil t)
695 (if (not (search-forward marker end t))
697 (narrow-to-region start end)
698 (nnmail-insert-lines)
699 (nnfolder-insert-newsgroup-line
700 (cons nil (nnfolder-active-number nnfolder-current-group)))
703 ;; Make absolutely sure that the active list reflects reality!
704 (nnmail-save-active nnfolder-group-alist nnfolder-active-file)
708 (defun nnfolder-generate-active-file ()
709 "Look for mbox folders in the nnfolder directory and make them into groups."
711 (nnmail-activate 'nnfolder)
712 (let ((files (directory-files nnfolder-directory))
714 (while (setq file (pop files))
715 (when (nnheader-mail-file-mbox-p file)
716 (nnheader-message 5 "Adding group %s..." file)
717 (push (list file (cons 1 0)) nnfolder-group-alist)
718 (nnfolder-read-folder file)
719 (nnfolder-close-group file))
724 ;;; nnfolder.el ends here