New feature: toggle visibility of mime buttons.
[more-wl.git] / wl / wl-batch.el
blob2a5922e93874e4755e564713a4326b3a84826daf
1 ;;; wl-batch.el --- batch functions for Wanderlust.
3 ;; Copyright (C) 2003 Yuuichi Teranishi <teranisi@gohome.org>
4 ;; Copyright (C) 2003 Chihiro Kuroda <chee@iijmio-mail.jp>
6 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>,
7 ;; Chihiro Kuroda <chee@iijmio-mail.jp>
8 ;; Keywords: mail, net news, batch
10 ;; This file is not part of GNU Emacs
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
28 ;;; Commentary:
30 ;; You can use functions in this file from command line.
31 ;; For example,
33 ;; % emacs -batch -l wl-batch -f wl-batch-prefetch
35 (require 'wl)
37 ;;; Code:
38 (defgroup wl-batch nil
39 "Wanderlust, batch processing."
40 :prefix "wl-"
41 :group 'wl)
43 (defcustom wl-batch-prefetch-folder-list nil
44 "A list of folder name to prefetch by `wl-batch-prefetch'."
45 :type '(repeat string)
46 :group 'wl-batch)
48 (defcustom wl-batch-prefetch-max-number 100
49 "Max number for summary update while prefetching."
50 :type 'integer
51 :group 'wl-batch)
53 (defun wl-batch-prefetch ()
54 "A batch function to prefetch messages by Emacs batch process."
55 (interactive)
56 (wl 1)
57 (let ((elmo-folder-update-threshold wl-batch-prefetch-max-number)
58 wl-demo elmo-folder-update-confirm
59 wl-interactive-exit)
60 (dolist (entity wl-batch-prefetch-folder-list)
61 (wl-folder-check-entity entity)
62 (wl-folder-prefetch-entity entity))
63 (wl-exit)))
65 (provide 'wl-batch)
67 ;;; wl-batch.el ends here