1 ;;; nnml.el --- mail spool access for Gnus
2 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
5 ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
6 ;; Keywords: news, mail
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26 ;; Based on nnspool.el by Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>.
27 ;; For an overview of what the interface functions do, please see the
34 (eval-when-compile (require 'cl))
36 (defvar nnml-directory "~/Mail/"
37 "Mail spool directory.")
39 (defvar nnml-active-file (concat nnml-directory "active")
42 (defvar nnml-newsgroups-file (concat nnml-directory "newsgroups")
43 "Mail newsgroups description file.")
45 (defvar nnml-get-new-mail t
46 "If non-nil, nnml will check the incoming mail file and split the mail.")
48 (defvar nnml-nov-is-evil nil
49 "If non-nil, Gnus will never generate and use nov databases for mail groups.
50 Using nov databases will speed up header fetching considerably.
51 This variable shouldn't be flipped much. If you have, for some reason,
52 set this to t, and want to set it to nil again, you should always run
53 the `nnml-generate-nov-databases' command. The function will go
54 through all nnml directories and generate nov databases for them
55 all. This may very well take some time.")
57 (defvar nnml-prepare-save-mail-hook nil
58 "Hook run narrowed to an article before saving.")
62 (defconst nnml-version "nnml 1.0"
65 (defvar nnml-nov-file-name ".overview")
67 (defvar nnml-current-directory nil)
68 (defvar nnml-current-group nil)
69 (defvar nnml-status-string "")
70 (defvar nnml-nov-buffer-alist nil)
71 (defvar nnml-group-alist nil)
72 (defvar nnml-active-timestamp nil)
73 (defvar nnml-article-file-alist nil)
75 (defvar nnml-generate-active-function 'nnml-generate-active-info)
81 (defvar nnml-current-server nil)
82 (defvar nnml-server-alist nil)
83 (defvar nnml-server-variables
85 (list 'nnml-directory nnml-directory)
86 (list 'nnml-active-file nnml-active-file)
87 (list 'nnml-newsgroups-file nnml-newsgroups-file)
88 (list 'nnml-get-new-mail nnml-get-new-mail)
89 (list 'nnml-nov-is-evil nnml-nov-is-evil)
90 (list 'nnml-nov-file-name nnml-nov-file-name)
91 '(nnml-current-directory nil)
92 '(nnml-current-group nil)
93 '(nnml-status-string "")
94 '(nnml-nov-buffer-alist nil)
95 '(nnml-group-alist nil)
96 '(nnml-active-timestamp nil)))
100 ;;; Interface functions.
102 (defun nnml-retrieve-headers (sequence &optional newsgroup server fetch-old)
104 (set-buffer nntp-server-buffer)
107 (number (length sequence))
110 (if (stringp (car sequence))
112 (nnml-possibly-change-directory newsgroup)
113 (unless nnml-article-file-alist
114 (setq nnml-article-file-alist
115 (nnheader-article-to-file-alist nnml-current-directory)))
116 (if (nnml-retrieve-headers-with-nov sequence fetch-old)
119 (setq article (car sequence))
121 (concat nnml-current-directory
122 (or (cdr (assq article nnml-article-file-alist))
124 (if (and (file-exists-p file)
125 (not (file-directory-p file)))
127 (insert (format "221 %d Article retrieved.\n" article))
129 (nnheader-insert-head file)
131 (if (search-forward "\n\n" nil t)
133 (goto-char (point-max))
136 (delete-region (point) (point-max))))
137 (setq sequence (cdr sequence))
138 (setq count (1+ count))
139 (and (numberp nnmail-large-newsgroup)
140 (> number nnmail-large-newsgroup)
142 (nnheader-message 6 "nnml: Receiving headers... %d%%"
143 (/ (* count 100) number))))
145 (and (numberp nnmail-large-newsgroup)
146 (> number nnmail-large-newsgroup)
147 (nnheader-message 6 "nnml: Receiving headers...done"))
149 (nnheader-fold-continuation-lines)
152 (defun nnml-open-server (server &optional defs)
153 (nnheader-init-server-buffer)
154 (if (equal server nnml-current-server)
156 (if nnml-current-server
157 (setq nnml-server-alist
158 (cons (list nnml-current-server
159 (nnheader-save-variables nnml-server-variables))
161 (let ((state (assoc server nnml-server-alist)))
164 (nnheader-restore-variables (nth 1 state))
165 (setq nnml-server-alist (delq state nnml-server-alist)))
166 (nnheader-set-init-variables nnml-server-variables defs)))
167 (setq nnml-current-server server)))
169 (defun nnml-close-server (&optional server)
170 (setq nnml-current-server nil)
173 (defun nnml-server-opened (&optional server)
174 (and (equal server nnml-current-server)
176 (buffer-name nntp-server-buffer)))
178 (defun nnml-status-message (&optional server)
181 (defun nnml-request-article (id &optional newsgroup server buffer)
182 (nnml-possibly-change-directory newsgroup)
183 (let* ((nntp-server-buffer (or buffer nntp-server-buffer))
184 file path gpath group-num)
186 (when (and (setq group-num (nnml-find-group-number id))
188 (assq (cdr group-num)
189 (nnheader-article-to-file-alist
191 (nnmail-group-pathname
193 nnml-directory)))))))
194 (setq path (concat gpath (int-to-string (cdr group-num)))))
195 (unless nnml-article-file-alist
196 (setq nnml-article-file-alist
197 (nnheader-article-to-file-alist nnml-current-directory)))
198 (when (setq file (cdr (assq id nnml-article-file-alist)))
199 (setq path (concat nnml-current-directory file))))
202 (nnheader-report 'nnml "No such article: %s" id))
203 ((not (file-exists-p path))
204 (nnheader-report 'nnml "No such file: %s" path))
205 ((file-directory-p path)
206 (nnheader-report 'nnml "File is a directory: %s" path))
207 ((not (save-excursion (nnmail-find-file path)))
208 (nnheader-report 'nnml "Couldn't read file: %s" path))
210 (nnheader-report 'nnml "Article %s retrieved" id)
211 ;; We return the article number.
212 (cons newsgroup (string-to-int (file-name-nondirectory path)))))))
214 (defun nnml-request-group (group &optional server dont-check)
216 ((not (nnml-possibly-change-directory group))
217 (nnheader-report 'nnml "Invalid group (no such directory)"))
219 (nnheader-report 'nnml "Group %s selected" group)
222 (nnmail-activate 'nnml)
223 (let ((active (nth 1 (assoc group nnml-group-alist))))
225 (set-buffer nntp-server-buffer)
228 (nnheader-report 'nnml "No such group: %s" group)
229 (insert (format "211 %d %d %d %s\n"
230 (max (1+ (- (cdr active) (car active))) 0)
231 (car active) (cdr active) group))
232 (nnheader-report 'nnml "Group %s selected" group)
235 (defun nnml-request-scan (&optional group server)
236 (setq nnml-article-file-alist nil)
237 (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
239 (defun nnml-close-group (group &optional server)
242 (defun nnml-request-close ()
243 (setq nnml-current-server nil)
244 (setq nnml-server-alist nil)
247 (defun nnml-request-create-group (group &optional server)
248 (nnmail-activate 'nnml)
249 (or (assoc group nnml-group-alist)
251 (setq nnml-group-alist (cons (list group (setq active (cons 1 0)))
253 (nnml-possibly-create-directory group)
254 (nnml-possibly-change-directory group)
256 (nnheader-directory-articles nnml-current-directory )))
259 (setcar active (apply 'min articles))
260 (setcdr active (apply 'max articles)))))
261 (nnmail-save-active nnml-group-alist nnml-active-file)))
264 (defun nnml-request-list (&optional server)
266 (nnmail-find-file nnml-active-file)
267 (setq nnml-group-alist (nnmail-get-active))))
269 (defun nnml-request-newgroups (date &optional server)
270 (nnml-request-list server))
272 (defun nnml-request-list-newsgroups (&optional server)
274 (nnmail-find-file nnml-newsgroups-file)))
276 (defun nnml-request-post (&optional server)
277 (mail-send-and-exit nil))
279 (defun nnml-request-expire-articles (articles newsgroup &optional server force)
280 (nnml-possibly-change-directory newsgroup)
281 (let* ((active-articles
282 (nnheader-directory-articles nnml-current-directory))
283 (max-article (and active-articles (apply 'max active-articles)))
285 article rest mod-time number)
286 (nnmail-activate 'nnml)
288 (unless nnml-article-file-alist
289 (setq nnml-article-file-alist
290 (nnheader-article-to-file-alist nnml-current-directory)))
292 (while (and articles is-old)
293 (setq article (concat nnml-current-directory
295 (setq number (pop articles)))))
296 (when (setq mod-time (nth 5 (file-attributes article)))
297 (if (and (nnml-deletable-article-p newsgroup number)
299 (nnmail-expired-article-p newsgroup mod-time force)))
301 (nnheader-message 5 "Deleting article %s in %s..."
304 (funcall nnmail-delete-file-function article)
307 (setq active-articles (delq number active-articles))
308 (nnml-nov-delete-article newsgroup number))
309 (push number rest))))
310 (let ((active (nth 1 (assoc newsgroup nnml-group-alist))))
312 (setcar active (or (and active-articles
313 (apply 'min active-articles))
315 (nnmail-save-active nnml-group-alist nnml-active-file))
318 (nconc rest articles)))
320 (defun nnml-request-move-article
321 (article group server accept-form &optional last)
322 (let ((buf (get-buffer-create " *nnml move*"))
325 (nnml-deletable-article-p group article)
326 (nnml-request-article article group server)
329 (insert-buffer-substring nntp-server-buffer)
330 (setq result (eval accept-form))
331 (kill-buffer (current-buffer))
335 (funcall nnmail-delete-file-function
336 (concat nnml-current-directory
337 (int-to-string article)))
339 (nnml-nov-delete-article group article)
340 (and last (nnml-save-nov))))
343 (defun nnml-request-accept-article (group &optional last)
347 (nnmail-activate 'nnml)
348 ;; We trick the choosing function into believing that only one
349 ;; group is available.
350 (let ((nnmail-split-methods (list (list group ""))))
351 (setq result (car (nnml-save-mail))))
353 (nnmail-save-active nnml-group-alist nnml-active-file)
354 (and last (nnml-save-nov))))
356 (nnmail-activate 'nnml)
357 (setq result (car (nnml-save-mail)))
359 (nnmail-save-active nnml-group-alist nnml-active-file)
360 (and last (nnml-save-nov)))))
363 (defun nnml-request-replace-article (article group buffer)
364 (nnml-possibly-change-directory group)
367 (nnml-possibly-create-directory group)
368 (if (not (condition-case ()
370 (write-region (point-min) (point-max)
371 (concat nnml-current-directory
372 (int-to-string article))
373 nil (if (nnheader-be-verbose 5) nil 'nomesg))
377 (let ((chars (nnmail-insert-lines))
378 (art (concat (int-to-string article) "\t"))
380 (setq nov-line (nnml-make-nov-line chars))
381 ;; Replace the NOV line in the NOV file.
383 (set-buffer (nnml-open-nov group))
384 (goto-char (point-min))
385 (if (or (looking-at art)
386 (search-forward (concat "\n" art) nil t))
387 ;; Delete the old NOV line.
388 (delete-region (progn (beginning-of-line) (point))
389 (progn (forward-line 1) (point)))
390 ;; The line isn't here, so we have to find out where
391 ;; we should insert it. (This situation should never
392 ;; occur, but one likes to make sure...)
393 (while (and (looking-at "[0-9]+\t")
396 (match-beginning 0) (match-end 0)))
398 (zerop (forward-line 1)))))
400 (insert (int-to-string article) nov-line)
404 (defun nnml-request-delete-group (group &optional force server)
405 (nnml-possibly-change-directory group)
407 ;; Delete all articles in GROUP.
410 nnml-current-directory t
411 (concat nnheader-numerical-short-files
412 "\\|" (regexp-quote nnml-nov-file-name) "$")))
415 (setq article (pop articles))
416 (when (file-writable-p article)
417 (nnheader-message 5 "Deleting article %s in %s..." article group)
418 (funcall nnmail-delete-file-function article))))
419 ;; Try to delete the directory itself.
421 (delete-directory nnml-current-directory)
423 ;; Remove the group from all structures.
424 (setq nnml-group-alist
425 (delq (assoc group nnml-group-alist) nnml-group-alist)
426 nnml-current-group nil
427 nnml-current-directory nil)
428 ;; Save the active file.
429 (nnmail-save-active nnml-group-alist nnml-active-file)
432 (defun nnml-request-rename-group (group new-name &optional server)
433 (nnml-possibly-change-directory group)
435 (and (file-writable-p nnml-current-directory)
439 (directory-file-name nnml-current-directory)
441 (nnmail-group-pathname new-name nnml-directory)))
444 ;; That went ok, so we change the internal structures.
445 (let ((entry (assoc group nnml-group-alist)))
446 (and entry (setcar entry new-name))
447 (setq nnml-current-directory nil
448 nnml-current-group nil)
449 ;; Save the new group alist.
450 (nnmail-save-active nnml-group-alist nnml-active-file)
454 ;;; Internal functions.
456 (defun nnml-deletable-article-p (group article)
457 "Say whether ARTICLE in GROUP can be deleted."
459 (when (setq file (cdr (assq article nnml-article-file-alist)))
460 (setq path (concat nnml-current-directory file))
461 (and (file-writable-p path)
462 (or (not nnmail-keep-last-article)
463 (not (eq (cdr (nth 1 (assoc group nnml-group-alist)))
466 ;; Find an article number in the current group given the Message-ID.
467 (defun nnml-find-group-number (id)
469 (set-buffer (get-buffer-create " *nnml id*"))
470 (buffer-disable-undo (current-buffer))
471 (let ((alist nnml-group-alist)
473 ;; We want to look through all .overview files, but we want to
474 ;; start with the one in the current directory. It seems most
475 ;; likely that the article we are looking for is in that group.
476 (if (setq number (nnml-find-id nnml-current-group id))
477 (cons nnml-current-group number)
478 ;; It wasn't there, so we look through the other groups as well.
479 (while (and (not number)
481 (or (string= (car (car alist)) nnml-current-group)
482 (setq number (nnml-find-id (car (car alist)) id)))
484 (setq alist (cdr alist))))
486 (cons (car (car alist)) number))))))
488 (defun nnml-find-id (group id)
490 (insert-file-contents
491 (concat (nnmail-group-pathname group nnml-directory)
494 (while (and (not found)
495 (search-forward id nil t)) ; We find the ID.
496 ;; And the id is in the fourth field.
498 "\t" (save-excursion (beginning-of-line) (point)) t 4)
502 ;; We return the article number.
505 (read (current-buffer))
509 (defun nnml-retrieve-headers-with-nov (articles &optional fetch-old)
510 (if (or gnus-nov-is-evil nnml-nov-is-evil)
512 (let ((first (car articles))
513 (last (progn (while (cdr articles) (setq articles (cdr articles)))
515 (nov (concat nnml-current-directory nnml-nov-file-name)))
516 (if (file-exists-p nov)
518 (set-buffer nntp-server-buffer)
520 (insert-file-contents nov)
522 (not (numberp fetch-old)))
523 t ; Don't remove anything.
525 (setq first (max 1 (- first fetch-old))))
526 (goto-char (point-min))
527 (while (and (not (eobp)) (< first (read (current-buffer))))
530 (if (not (eobp)) (delete-region 1 (point)))
531 (while (and (not (eobp)) (>= last (read (current-buffer))))
534 (if (not (eobp)) (delete-region (point) (point-max)))
537 (defun nnml-possibly-change-directory (group &optional force)
539 (let ((pathname (nnmail-group-pathname group nnml-directory)))
541 (not (equal pathname nnml-current-directory)))
542 (setq nnml-current-directory pathname
543 nnml-current-group group
544 nnml-article-file-alist nil))))
547 (defun nnml-possibly-create-directory (group)
549 (setq dir (nnmail-group-pathname group nnml-directory))
550 (while (not (file-directory-p dir))
551 (setq dirs (cons dir dirs))
552 (setq dir (file-name-directory (directory-file-name dir))))
554 (make-directory (directory-file-name (car dirs)))
555 (nnheader-message 5 "Creating mail directory %s" (car dirs))
556 (setq dirs (cdr dirs)))))
558 (defun nnml-save-mail ()
559 "Called narrowed to an article."
560 (let ((group-art (nreverse (nnmail-article-group 'nnml-active-number)))
562 (setq chars (nnmail-insert-lines))
563 (nnmail-insert-xref group-art)
564 (run-hooks 'nnml-prepare-save-mail-hook)
565 (goto-char (point-min))
566 (while (looking-at "From ")
567 (replace-match "X-From-Line: ")
569 ;; We save the article in all the newsgroups it belongs in.
573 (nnml-possibly-create-directory (car (car ga)))
574 (let ((file (concat (nnmail-group-pathname
575 (car (car ga)) nnml-directory)
576 (int-to-string (cdr (car ga))))))
578 ;; It was already saved, so we just make a hard link.
579 (funcall nnmail-crosspost-link-function first file t)
581 (write-region (point-min) (point-max) file nil
582 (if (nnheader-be-verbose 5) nil 'nomesg))
585 ;; Generate a nov line for this article. We generate the nov
586 ;; line after saving, because nov generation destroys the
588 (setq nov-line (nnml-make-nov-line chars))
589 ;; Output the nov line to all nov databases that should have it.
590 (let ((ga group-art))
592 (nnml-add-nov (car (car ga)) (cdr (car ga)) nov-line)
596 (defun nnml-active-number (group)
597 "Compute the next article number in GROUP."
598 (let ((active (car (cdr (assoc group nnml-group-alist)))))
599 ;; The group wasn't known to nnml, so we just create an active
603 (setq active (cons 1 0))
604 (setq nnml-group-alist (cons (list group active) nnml-group-alist))))
605 (setcdr active (1+ (cdr active)))
606 (while (file-exists-p
607 (concat (nnmail-group-pathname group nnml-directory)
608 (int-to-string (cdr active))))
609 (setcdr active (1+ (cdr active))))
612 (defun nnml-add-nov (group article line)
613 "Add a nov line for the GROUP base."
615 (set-buffer (nnml-open-nov group))
616 (goto-char (point-max))
617 (insert (int-to-string article) line)))
619 (defsubst nnml-header-value ()
620 (buffer-substring (match-end 0) (progn (end-of-line) (point))))
622 (defun nnml-make-nov-line (chars)
623 "Create a nov from the current headers."
624 (let ((case-fold-search t)
625 subject from date id references lines xref in-reply-to char)
628 (goto-char (point-min))
631 (1- (or (search-forward "\n\n" nil t) (point-max))))
632 ;; Fold continuation lines.
633 (goto-char (point-min))
634 (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
635 (replace-match " " t t))
636 (subst-char-in-region (point-min) (point-max) ?\t ? )
637 ;; [number subject from date id references chars lines xref]
639 (goto-char (point-min))
640 (while (re-search-forward "^\\(from\\|subject\\|message-id\\|date\\|lines\\|xref\\|references\\|in-reply-to\\): "
643 (setq char (downcase (following-char)))
646 (setq subject (nnml-header-value)))
648 (setq from (nnml-header-value)))
650 (setq xref (buffer-substring (match-beginning 0)
651 (progn (end-of-line) (point)))))
653 (setq lines (nnml-header-value)))
655 (setq date (nnml-header-value)))
657 (setq id (setq id (nnml-header-value))))
659 (setq references (nnml-header-value)))
661 (setq in-reply-to (nnml-header-value))))
664 (and (not references)
666 (string-match "<[^>]+>" in-reply-to)
668 (substring in-reply-to (match-beginning 0)
670 ;; [number subject from date id references chars lines xref]
671 (format "\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t\n"
672 (or subject "(none)") (or from "(nobody)") (or date "")
673 (or id (nnmail-message-id))
674 (or references "") (or chars 0) (or lines "0")
677 (defun nnml-open-nov (group)
678 (or (cdr (assoc group nnml-nov-buffer-alist))
679 (let ((buffer (find-file-noselect
680 (concat (nnmail-group-pathname group nnml-directory)
681 nnml-nov-file-name))))
684 (buffer-disable-undo (current-buffer)))
685 (setq nnml-nov-buffer-alist
686 (cons (cons group buffer) nnml-nov-buffer-alist))
689 (defun nnml-save-nov ()
691 (while nnml-nov-buffer-alist
692 (if (buffer-name (cdr (car nnml-nov-buffer-alist)))
694 (set-buffer (cdr (car nnml-nov-buffer-alist)))
695 (and (buffer-modified-p)
697 1 (point-max) (buffer-file-name) nil 'nomesg))
698 (set-buffer-modified-p nil)
699 (kill-buffer (current-buffer))))
700 (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist)))))
703 (defun nnml-generate-nov-databases ()
704 "Generate nov databases in all nnml directories."
706 ;; Read the active file to make sure we don't re-use articles
707 ;; numbers in empty groups.
708 (nnmail-activate 'nnml)
709 (nnml-open-server (or nnml-current-server ""))
710 (setq nnml-directory (expand-file-name nnml-directory))
711 ;; Recurse down the directories.
712 (nnml-generate-nov-databases-1 nnml-directory)
713 ;; Save the active file.
714 (nnmail-save-active nnml-group-alist nnml-active-file))
716 (defun nnml-generate-nov-databases-1 (dir)
717 (setq dir (file-name-as-directory dir))
718 ;; We descend recursively
719 (let ((dirs (directory-files dir t nil t))
722 (setq dir (pop dirs))
723 (when (and (not (string-match "/\\.\\.?$" dir))
724 (file-directory-p dir))
725 (nnml-generate-nov-databases-1 dir))))
726 ;; Do this directory.
729 (lambda (name) (string-to-int name))
730 (directory-files dir nil "^[0-9]+$" t))
733 (funcall nnml-generate-active-function dir)
734 ;; Generate the nov file.
735 (nnml-generate-nov-file dir files))))
737 (defun nnml-generate-active-info (dir)
738 ;; Update the active info for this group.
739 (let ((group (nnheader-file-to-group
740 (directory-file-name dir) nnml-directory)))
741 (setq nnml-group-alist
742 (delq (assoc group nnml-group-alist) nnml-group-alist))
746 (while (cdr f) (setq f (cdr f)))
750 (defun nnml-generate-nov-file (dir files)
751 (let* ((dir (file-name-as-directory dir))
752 (nov (concat dir nnml-nov-file-name))
753 (nov-buffer (get-buffer-create " *nov*"))
756 ;; Init the nov buffer.
757 (set-buffer nov-buffer)
758 (buffer-disable-undo (current-buffer))
760 (set-buffer nntp-server-buffer)
761 ;; Delete the old NOV file.
762 (when (file-exists-p nov)
763 (funcall nnmail-delete-file-function nov))
766 (insert-file-contents (concat dir (int-to-string (car files))))
768 (goto-char (point-min))
770 (search-forward "\n\n" nil t)
771 (setq chars (- (point-max) (point)))
772 (max 1 (1- (point)))))
773 (when (and (not (= 0 chars)) ; none of them empty files...
774 (not (= (point-min) (point-max))))
775 (goto-char (point-min))
776 (setq nov-line (nnml-make-nov-line chars))
778 (set-buffer nov-buffer)
779 (goto-char (point-max))
780 (insert (int-to-string (car files)) nov-line)))
782 (setq files (cdr files)))
784 (set-buffer nov-buffer)
785 (write-region 1 (point-max) (expand-file-name nov) nil
787 (kill-buffer (current-buffer))))))
789 (defun nnml-nov-delete-article (group article)
791 (set-buffer (nnml-open-nov group))
792 (goto-char (point-min))
793 (if (re-search-forward (concat "^" (int-to-string article) "\t") nil t)
794 (delete-region (match-beginning 0) (progn (forward-line 1) (point))))
799 ;;; nnml.el ends here