1 ;;; nnsoup.el --- SOUP 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 the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
33 (eval-when-compile (require 'cl))
35 (defvar nnsoup-directory "~/SOUP/"
36 "*SOUP packet directory.")
38 (defvar nnsoup-tmp-directory "/tmp/"
39 "*Where nnsoup will store temporary files.")
41 (defvar nnsoup-replies-directory (concat nnsoup-directory "replies/")
42 "*Directory where outgoing packets will be composed.")
44 (defvar nnsoup-replies-format-type ?n
45 "*Format of the replies packages.")
47 (defvar nnsoup-replies-index-type ?n
48 "*Index type of the replies packages.")
50 (defvar nnsoup-active-file (concat nnsoup-directory "active")
53 (defvar nnsoup-packer "tar cf - %s | gzip > $HOME/Soupin%d.tgz"
54 "Format string command for packing a SOUP packet.
55 The SOUP files will be inserted where the %s is in the string.
56 This string MUST contain both %s and %d. The file number will be
57 inserted where %d appears.")
59 (defvar nnsoup-unpacker "gunzip -c %s | tar xvf -"
60 "*Format string command for unpacking a SOUP packet.
61 The SOUP packet file name will be inserted at the %s.")
63 (defvar nnsoup-packet-directory "~/"
64 "*Where nnsoup will look for incoming packets.")
66 (defvar nnsoup-packet-regexp "Soupout"
67 "*Regular expression matching SOUP packets in `nnsoup-packet-directory'.")
71 (defconst nnsoup-version "nnsoup 0.0"
74 (defvar nnsoup-status-string "")
75 (defvar nnsoup-group-alist nil)
76 (defvar nnsoup-current-prefix 0)
77 (defvar nnsoup-replies-list nil)
78 (defvar nnsoup-buffers nil)
79 (defvar nnsoup-current-group nil)
85 (defvar nnsoup-current-server nil)
86 (defvar nnsoup-server-alist nil)
87 (defvar nnsoup-server-variables
88 `((nnsoup-directory ,nnsoup-directory)
89 (nnsoup-active-file ,nnsoup-active-file)
90 (nnsoup-status-string "")
91 (nnsoup-current-prefix 0)
92 (nnsoup-group-alist nil)))
96 ;;; Interface functions.
98 (defun nnsoup-retrieve-headers (sequence &optional group server fetch-old)
99 (nnsoup-possibly-change-group group)
101 (set-buffer nntp-server-buffer)
103 (let ((areas (cddr (assoc nnsoup-current-group nnsoup-group-alist)))
106 useful-areas this-area-seq msg-buf)
107 (if (stringp (car sequence))
108 ;; We don't support fetching by Message-ID.
110 ;; We go through all the areas and find which files the
111 ;; articles in SEQUENCE come from.
112 (while (and areas sequence)
113 ;; Peel off areas that are below sequence.
114 (while (and areas (< (cdr (car (car areas))) (car sequence)))
115 (setq areas (cdr areas)))
117 ;; This is a useful area.
118 (push (car areas) useful-areas)
119 (setq this-area-seq nil)
120 ;; We take note whether this MSG has a corresponding IDX
122 (when (or (= (gnus-soup-encoding-index
123 (gnus-soup-area-encoding (nth 1 (car areas)))) ?n)
126 (gnus-soup-area-prefix (nth 1 (car areas)))))))
128 ;; We assign the portion of `sequence' that is relevant to
129 ;; this MSG packet to this packet.
130 (while (and sequence (<= (car sequence) (cdr (car (car areas)))))
131 (push (car sequence) this-area-seq)
132 (setq sequence (cdr sequence)))
133 (setcar useful-areas (cons (nreverse this-area-seq)
134 (car useful-areas)))))
136 ;; We now have a list of article numbers and corresponding
138 (setq useful-areas (nreverse useful-areas))
140 ;; Two different approaches depending on whether all the MSG
141 ;; files have corresponding IDX files. If they all do, we
142 ;; simply return the relevant IDX files and let Gnus sort out
143 ;; what lines are relevant. If some of the IDX files are
144 ;; missing, we must return HEADs for all the articles.
146 ;; We have IDX files for all areas.
149 (goto-char (point-max))
151 (number (car (nth 1 (car useful-areas))))
152 (index-buffer (nnsoup-index-buffer
153 (gnus-soup-area-prefix
154 (nth 2 (car useful-areas))))))
156 (insert-buffer-substring index-buffer)
158 ;; We have to remove the index number entires and
159 ;; insert article numbers instead.
160 (while (looking-at "[0-9]+")
161 (replace-match (int-to-string number) t t)
164 (setq useful-areas (cdr useful-areas)))
168 (setq articles (car (car useful-areas))
169 useful-areas (cdr useful-areas))
172 (nnsoup-narrow-to-article
173 (car articles) (cdr (car useful-areas)) 'head))
174 (goto-char (point-max))
175 (insert (format "221 %d Article retrieved.\n" (car articles)))
176 (insert-buffer-substring msg-buf)
177 (goto-char (point-max))
179 (setq articles (cdr articles))))
181 (nnheader-fold-continuation-lines)
184 (defun nnsoup-open-server (server &optional defs)
185 (nnheader-init-server-buffer)
186 (if (equal server nnsoup-current-server)
188 (if nnsoup-current-server
189 (setq nnsoup-server-alist
190 (cons (list nnsoup-current-server
191 (nnheader-save-variables nnsoup-server-variables))
192 nnsoup-server-alist)))
193 (let ((state (assoc server nnsoup-server-alist)))
196 (nnheader-restore-variables (nth 1 state))
197 (setq nnsoup-server-alist (delq state nnsoup-server-alist)))
198 (nnheader-set-init-variables nnsoup-server-variables defs)))
199 (setq nnsoup-current-server server))
200 (nnsoup-read-active-file))
202 (defun nnsoup-request-close ()
203 (nnsoup-write-active-file)
204 (nnsoup-write-replies)
205 (gnus-soup-save-areas)
206 ;; Kill all nnsoup buffers.
208 (while nnsoup-buffers
209 (setq buffer (cdr (pop nnsoup-buffers)))
212 (kill-buffer buffer))))
213 (setq nnsoup-group-alist nil
214 nnsoup-current-group nil
215 nnsoup-current-server nil
216 nnsoup-server-alist nil
217 nnsoup-replies-list nil)
220 (defun nnsoup-close-server (&optional server)
223 (defun nnsoup-server-opened (&optional server)
224 (and (equal server nnsoup-current-server)
226 (buffer-name nntp-server-buffer)))
228 (defun nnsoup-status-message (&optional server)
229 nnsoup-status-string)
231 (defun nnsoup-request-article (id &optional newsgroup server buffer)
232 (nnsoup-possibly-change-group newsgroup)
233 (let ((buffer (or buffer nntp-server-buffer)))
239 (insert-buffer-substring
240 (nnsoup-narrow-to-article id))
243 (defun nnsoup-request-group (group &optional server dont-check)
244 (nnsoup-possibly-change-group group)
247 (let ((active (cadr (assoc group nnsoup-group-alist))))
249 (nnheader-report 'nnsoup "No such group: %s" group)
252 (max (1+ (- (cdr active) (car active))) 0)
253 (car active) (cdr active) group)))))
255 (defun nnsoup-request-type (group &optional article)
256 (nnsoup-possibly-change-group group)
259 (let ((kind (gnus-soup-encoding-kind
260 (gnus-soup-area-encoding
261 (nth 1 (nnsoup-article-to-area
262 article nnsoup-current-group))))))
263 (cond ((= kind ?m) 'mail)
267 (defun nnsoup-close-group (group &optional server)
268 ;; Kill all nnsoup buffers.
269 (let ((buffers nnsoup-buffers)
272 (when (equal (car (setq elem (pop buffers))) group)
273 (setq nnsoup-buffers (delq elem nnsoup-buffers))
274 (and (cdr elem) (buffer-name (cdr elem))
275 (kill-buffer (cdr elem))))))
278 (defun nnsoup-request-list (&optional server)
280 (set-buffer nntp-server-buffer)
282 (let ((alist nnsoup-group-alist)
284 (while (setq entry (pop alist))
285 (insert (format "%s %d %d y\n" (car entry)
286 (cdadr entry) (caadr entry))))
289 (defun nnsoup-request-scan (group &optional server)
290 (nnsoup-unpack-packets))
292 (defun nnsoup-request-newgroups (date &optional server)
293 (nnsoup-request-list))
295 (defun nnsoup-request-list-newsgroups (&optional server)
298 (defun nnsoup-request-post (&optional server)
299 (nnsoup-store-reply "news")
302 (defun nnsoup-request-mail ()
303 (nnsoup-store-reply "mail")
306 (defun nnsoup-request-expire-articles (articles group &optional server force)
307 (nnsoup-possibly-change-group group)
308 (let* ((total-infolist (assoc group nnsoup-group-alist))
309 (active (cadr total-infolist))
310 (infolist (cddr total-infolist))
311 info range-list mod-time prefix)
313 (setq info (pop infolist)
314 range-list (gnus-uncompress-range (car info))
315 prefix (gnus-soup-area-prefix (nth 1 info)))
316 (when ;; All the articles in this file are marked for expiry.
317 (and (or (setq mod-time (nth 5 (file-attributes
318 (nnsoup-file prefix))))
319 (setq mod-time (nth 5 (file-attributes
320 (nnsoup-file prefix t)))))
321 (gnus-sublist-p articles range-list)
322 ;; This file is old enough.
323 (nnmail-expired-article-p group mod-time force))
324 ;; Ok, we delete this file.
325 (when (condition-case nil
328 5 "Deleting %s..." (nnsoup-file prefix))
329 (when (file-exists-p (nnsoup-file prefix))
330 (delete-file (nnsoup-file prefix)))
332 5 "Deleting %s..." (nnsoup-file prefix t))
333 (when (file-exists-p (nnsoup-file prefix t))
334 (delete-file (nnsoup-file prefix t)))
337 (setcdr (cdr total-infolist) (delq info (cddr total-infolist)))
338 (setq articles (gnus-sorted-complement articles range-list))))
340 (setcdr (cdr total-infolist) (delq info (cddr total-infolist)))))
341 (if (cddr total-infolist)
342 (setcar active (car (car (car (cdr (cdr total-infolist))))))
343 (setcar active (1+ (cdr active))))
344 (nnsoup-write-active-file)
345 ;; Return the articles that weren't expired.
349 ;;; Internal functions
351 (defun nnsoup-possibly-change-group (group &optional force)
353 (setq nnsoup-current-group group)
356 (defun nnsoup-read-active-file ()
357 (setq nnsoup-group-alist)
358 (when (file-exists-p nnsoup-active-file)
360 (load nnsoup-active-file)
362 ;; Be backwards compatible.
363 (when (and nnsoup-group-alist
364 (not (atom (caadar nnsoup-group-alist))))
365 (let ((alist nnsoup-group-alist)
367 (while (setq e (cdr (setq entry (pop alist))))
372 (setcdr entry (cons (cons min max) (cdr entry))))))
375 (defun nnsoup-write-active-file ()
376 (when nnsoup-group-alist
378 (set-buffer (get-buffer-create " *nnsoup work*"))
379 (buffer-disable-undo (current-buffer))
381 (insert (format "(setq nnsoup-group-alist '%S)\n" nnsoup-group-alist))
382 (insert (format "(setq nnsoup-current-prefix %d)\n"
383 nnsoup-current-prefix))
384 (write-region (point-min) (point-max) nnsoup-active-file
386 (kill-buffer (current-buffer)))))
388 (defun nnsoup-next-prefix ()
389 "Return the next free prefix."
391 (while (or (file-exists-p
392 (nnsoup-file (setq prefix (int-to-string
393 nnsoup-current-prefix))))
394 (file-exists-p (nnsoup-file prefix t)))
395 (incf nnsoup-current-prefix))
396 (incf nnsoup-current-prefix)
399 (defun nnsoup-read-areas ()
401 (set-buffer nntp-server-buffer)
402 (let ((areas (gnus-soup-parse-areas (concat nnsoup-tmp-directory "AREAS")))
403 entry number area lnum cur-prefix file)
404 ;; Go through all areas in the new AREAS file.
405 (while (setq area (pop areas))
406 ;; Change the name to the permanent name and move the files.
407 (setq cur-prefix (nnsoup-next-prefix))
408 (message "Incorporating file %s..." cur-prefix)
410 (setq file (concat nnsoup-tmp-directory
411 (gnus-soup-area-prefix area) ".IDX")))
412 (rename-file file (nnsoup-file cur-prefix)))
414 (setq file (concat nnsoup-tmp-directory
415 (gnus-soup-area-prefix area) ".MSG")))
416 (rename-file file (nnsoup-file cur-prefix t)))
417 (gnus-soup-set-area-prefix area cur-prefix)
418 ;; Find the number of new articles in this area.
419 (setq number (nnsoup-number-of-articles area))
420 (if (not (setq entry (assoc (gnus-soup-area-name area)
421 nnsoup-group-alist)))
422 ;; If this is a new area (group), we just add this info to
424 (push (list (gnus-soup-area-name area)
426 (list (cons 1 number) area))
428 ;; There are already articles in this group, so we add this
429 ;; info to the end of the entry.
430 (nconc entry (list (list (cons (1+ (setq lnum (cdadr entry)))
433 (setcdr (cadr entry) (+ lnum number)))))
434 (nnsoup-write-active-file)))
436 (defun nnsoup-number-of-articles (area)
439 ;; If the number is in the area info, we just return it.
440 ((gnus-soup-area-number area)
441 (gnus-soup-area-number area))
442 ;; If there is an index file, we just count the lines.
443 ((/= (gnus-soup-encoding-index (gnus-soup-area-encoding area)) ?n)
444 (set-buffer (nnsoup-index-buffer (gnus-soup-area-prefix area)))
445 (count-lines (point-min) (point-max)))
446 ;; We do it the hard way - re-searching through the message
449 (set-buffer (nnsoup-message-buffer (gnus-soup-area-prefix area)))
450 (goto-char (point-min))
451 (let ((regexp (nnsoup-header (gnus-soup-encoding-format
452 (gnus-soup-area-encoding area))))
454 (while (re-search-forward regexp nil t)
458 (defun nnsoup-index-buffer (prefix &optional message)
459 (let* ((file (concat prefix (if message ".MSG" ".IDX")))
460 (buffer-name (concat " *nnsoup " file "*")))
461 (or (get-buffer buffer-name) ; File aready loaded.
462 (when (file-exists-p (concat nnsoup-directory file))
463 (save-excursion ; Load the file.
464 (set-buffer (get-buffer-create buffer-name))
465 (buffer-disable-undo (current-buffer))
466 (push (cons nnsoup-current-group (current-buffer)) nnsoup-buffers)
467 (insert-file-contents (concat nnsoup-directory file))
468 (current-buffer))))))
470 (defun nnsoup-file (prefix &optional message)
472 (concat nnsoup-directory prefix (if message ".MSG" ".IDX"))))
474 (defun nnsoup-message-buffer (prefix)
475 (nnsoup-index-buffer prefix 'msg))
477 (defun nnsoup-unpack-packets ()
478 "Unpack all packets in `nnsoup-packet-directory'."
479 (let ((packets (directory-files
480 nnsoup-packet-directory t nnsoup-packet-regexp))
482 (while (setq packet (pop packets))
483 (message (setq msg (format "nnsoup: unpacking %s..." packet)))
484 (if (not (gnus-soup-unpack-packet
485 nnsoup-tmp-directory nnsoup-unpacker packet))
486 (message "Couldn't unpack %s" packet)
489 (message "%sdone" msg)))))
491 (defun nnsoup-narrow-to-article (article &optional area head)
492 (let* ((area (or area (nnsoup-article-to-area article nnsoup-current-group)))
493 (prefix (gnus-soup-area-prefix (nth 1 area)))
494 (msg-buf (nnsoup-index-buffer prefix 'msg))
498 ;; There is no MSG file.
502 ;; We use the index file to find out where the article begins and ends.
503 ((and (= (gnus-soup-encoding-index
504 (gnus-soup-area-encoding (nth 1 area)))
506 (file-exists-p (nnsoup-file prefix)))
507 (set-buffer (nnsoup-index-buffer prefix))
509 (goto-char (point-min))
510 (forward-line (- article (car (car area))))
511 (setq beg (read (current-buffer)))
513 (if (looking-at "[0-9]+")
515 (setq end (read (current-buffer)))
518 (let ((format (gnus-soup-encoding-format
519 (gnus-soup-area-encoding (nth 1 area)))))
521 (if (or (= format ?n) (= format ?m))
522 (setq end (progn (forward-line -1) (point))))))
523 (set-buffer msg-buf))
525 (narrow-to-region beg (or end (point-max))))
529 (goto-char (point-min))
530 (let ((header (nnsoup-header
531 (gnus-soup-encoding-format
532 (gnus-soup-area-encoding (nth 1 area))))))
533 (re-search-forward header nil t (- article (car (car area))))
536 (if (re-search-forward header nil t)
539 (goto-char (point-min))
544 (if (search-forward "\n\n" nil t)
549 (defun nnsoup-header (format)
552 "^#! *rnews +[0-9]+ *$")
554 (concat "^" rmail-unix-mail-delimiter))
558 (error "Unknown format: %c" format))))
561 (defun nnsoup-pack-replies ()
562 "Make an outbound package of SOUP replies."
564 ;; Write all data buffers.
565 (gnus-soup-save-areas)
566 ;; Write the active file.
567 (nnsoup-write-active-file)
568 ;; Write the REPLIES file.
569 (nnsoup-write-replies)
570 ;; Pack all these files into a SOUP packet.
571 (gnus-soup-pack nnsoup-replies-directory nnsoup-packer))
573 (defun nnsoup-write-replies ()
574 "Write the REPLIES file."
575 (when nnsoup-replies-list
576 (gnus-soup-write-replies nnsoup-replies-directory nnsoup-replies-list)
577 (setq nnsoup-replies-list nil)))
579 (defun nnsoup-article-to-area (article group)
580 "Return the area that ARTICLE in GROUP is located in."
581 (let ((areas (cddr (assoc group nnsoup-group-alist))))
582 (while (and areas (< (cdr (car (car areas))) article))
583 (setq areas (cdr areas)))
584 (and areas (car areas))))
586 (defvar nnsoup-old-functions
587 (list gnus-inews-article-function send-mail-function))
590 (defun nnsoup-set-variables ()
591 "Use the SOUP methods for posting news and mailing mail."
593 (setq gnus-inews-article-function 'nnsoup-request-post)
594 (setq send-mail-function 'nnsoup-request-mail))
597 (defun nnsoup-revert-variables ()
598 "Revert posting and mailing methods to the standard Emacs methods."
600 (setq gnus-inews-article-function (car nnsoup-old-functions))
601 (setq send-mail-function (cadr nnsoup-old-functions)))
603 (defun nnsoup-store-reply (kind)
604 ;; Mostly stolen from `sendmail.el'.
605 (let ((tembuf (generate-new-buffer " sendmail temp"))
606 (case-fold-search nil)
607 (mailbuf (current-buffer))
612 (insert-buffer-substring mailbuf)
613 (goto-char (point-max))
614 ;; require one newline at the end.
615 (or (= (preceding-char) ?\n)
617 ;; Change header-delimiter to be what sendmail expects.
618 (goto-char (point-min))
619 (if (re-search-forward
620 (concat "^" (regexp-quote mail-header-separator) "\n") nil t)
622 (search-forward "\n\n" nil t))
624 (setq delimline (point-marker))
625 (if mail-aliases (expand-mail-aliases (point-min) delimline))
626 (goto-char (point-min))
627 ;; ignore any blank lines in the header
628 (while (and (re-search-forward "\n\n\n*" delimline t)
629 (< (point) delimline))
630 (replace-match "\n"))
631 (let ((case-fold-search t))
632 (goto-char (point-min))
633 ;; Find and handle any FCC fields.
634 (goto-char (point-min))
635 (if (re-search-forward "^FCC:" delimline t)
636 (mail-do-fcc delimline))
637 (goto-char (point-min))
638 ;; "S:" is an abbreviation for "Subject:".
639 (goto-char (point-min))
640 (if (re-search-forward "^S:" delimline t)
641 (replace-match "Subject:"))
642 ;; Don't send out a blank subject line
643 (goto-char (point-min))
644 (if (re-search-forward "^Subject:[ \t]*\n" delimline t)
646 ;; Insert an extra newline if we need it to work around
647 ;; Sun's bug that swallows newlines.
648 (goto-char (1+ delimline))
649 (if (eval mail-mailer-swallows-blank-line)
653 nnsoup-replies-directory
654 (nnsoup-kind-to-prefix kind) nil nnsoup-replies-format-type
655 nnsoup-replies-index-type))
657 (when (and msg-buf (bufferp msg-buf))
660 (goto-char (point-min))
661 (while (re-search-forward "^#! *rnews" nil t)
663 (message "Stored %d messages" num)))
664 (nnsoup-write-replies)
665 (kill-buffer tembuf))))
667 (defun nnsoup-kind-to-prefix (kind)
668 (unless nnsoup-replies-list
669 (setq nnsoup-replies-list
670 (gnus-soup-parse-replies
671 (concat nnsoup-replies-directory "REPLIES"))))
672 (let ((replies nnsoup-replies-list))
674 (not (string= kind (gnus-soup-reply-kind (car replies)))))
675 (setq replies (cdr replies)))
677 (gnus-soup-reply-prefix (car replies))
678 (setq nnsoup-replies-list
679 (cons (vector (gnus-soup-unique-prefix nnsoup-replies-directory)
682 nnsoup-replies-format-type
683 nnsoup-replies-index-type
684 (if (string= kind "news")
686 nnsoup-replies-list))
687 (gnus-soup-reply-prefix (car nnsoup-replies-list)))))
689 (defun nnsoup-make-active ()
690 "(Re-)create the SOUP active file."
692 (let ((files (sort (directory-files nnsoup-directory t "IDX$")
694 (< (progn (string-match "/\\([0-9]+\\)\\." f1)
695 (string-to-int (match-string 1 f1)))
696 (progn (string-match "/\\([0-9]+\\)\\." f2)
697 (string-to-int (match-string 1 f2)))))))
698 active group lines ident elem min)
699 (set-buffer (get-buffer-create " *nnsoup work*"))
700 (buffer-disable-undo (current-buffer))
702 (message "Doing %s..." (car files))
704 (insert-file-contents (car files))
705 (goto-char (point-min))
707 (re-search-backward "[ \t]\\([^ ]+\\):[0-9]")
708 (setq group (buffer-substring (match-beginning 1) (match-end 1)))
709 (setq lines (count-lines (point-min) (point-max)))
710 (setq ident (progn (string-match
711 "/\\([0-9]+\\)\\." (car files))
713 (car files) (match-beginning 1)
715 (if (not (setq elem (assoc group active)))
716 (push (list group (cons 1 lines)
718 (vector ident group "ncm" "" lines)))
722 (list (cons (setq min (1+ (cdr (car (car
725 (vector ident group "ncm" "" lines))))
726 (setcdr (cadr elem) (+ min lines)))
727 (setq files (cdr files)))
729 (setq nnsoup-group-alist active)
731 (setcdr (car active) (nreverse (cdr (car active))))
732 (setq active (cdr active)))
733 (nnsoup-write-active-file)))
735 (defun nnsoup-delete-unreferenced-message-files ()
736 "Delete any *.MSG and *.IDX files that aren't known by nnsoup."
738 (let* ((known (apply 'nconc (mapcar
742 (gnus-soup-area-prefix (cadr area)))
744 nnsoup-group-alist)))
745 (regexp "\\.MSG$\\|\\.IDX$")
746 (files (directory-files nnsoup-directory nil regexp))
748 ;; Find all files that aren't known by nnsoup.
749 (while (setq file (pop files))
750 (string-match regexp file)
751 (unless (member (substring file 0 (match-beginning 0)) known)
752 (push file non-files)))
753 ;; Sort and delete the files.
754 (setq non-files (sort non-files 'string<))
755 (map-y-or-n-p "Delete file %s? "
756 (lambda (file) (delete-file (concat nnsoup-directory file)))
761 ;;; nnsoup.el ends here