From 68af1daa12beaa67cb14c4e0a35586d97cdd732a Mon Sep 17 00:00:00 2001 From: teranisi Date: Sun, 9 Nov 2003 13:41:00 +0000 Subject: [PATCH] * wl-batch.el: New file. --- wl/ChangeLog | 4 ++++ wl/wl-batch.el | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 wl/wl-batch.el diff --git a/wl/ChangeLog b/wl/ChangeLog index bce5a37..9d26b6b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,7 @@ +2003-11-09 Yuuichi Teranishi + + * wl-batch.el: New file. + 2003-11-09 TAKAHASHI Kaoru * wl-vars.el (wl-use-semi): Remove unused variable. diff --git a/wl/wl-batch.el b/wl/wl-batch.el new file mode 100644 index 0000000..2a5922e --- /dev/null +++ b/wl/wl-batch.el @@ -0,0 +1,67 @@ +;;; wl-batch.el --- batch functions for Wanderlust. + +;; Copyright (C) 2003 Yuuichi Teranishi +;; Copyright (C) 2003 Chihiro Kuroda + +;; Author: Yuuichi Teranishi , +;; Chihiro Kuroda +;; Keywords: mail, net news, batch + +;; This file is not part of GNU Emacs + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; + +;;; Commentary: +;; +;; You can use functions in this file from command line. +;; For example, +;; +;; % emacs -batch -l wl-batch -f wl-batch-prefetch + +(require 'wl) + +;;; Code: +(defgroup wl-batch nil + "Wanderlust, batch processing." + :prefix "wl-" + :group 'wl) + +(defcustom wl-batch-prefetch-folder-list nil + "A list of folder name to prefetch by `wl-batch-prefetch'." + :type '(repeat string) + :group 'wl-batch) + +(defcustom wl-batch-prefetch-max-number 100 + "Max number for summary update while prefetching." + :type 'integer + :group 'wl-batch) + +(defun wl-batch-prefetch () + "A batch function to prefetch messages by Emacs batch process." + (interactive) + (wl 1) + (let ((elmo-folder-update-threshold wl-batch-prefetch-max-number) + wl-demo elmo-folder-update-confirm + wl-interactive-exit) + (dolist (entity wl-batch-prefetch-folder-list) + (wl-folder-check-entity entity) + (wl-folder-prefetch-entity entity)) + (wl-exit))) + +(provide 'wl-batch) + +;;; wl-batch.el ends here -- 1.7.10.4