From: hmurata Date: Sun, 27 Aug 2006 14:30:46 +0000 (+0000) Subject: (elsp-bsfilter-list-spam-files): Fix the X-Git-Tag: wl-2_15_4~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7d9422ddcfda28c198323f0f90a240af003d8400;p=elisp%2Fwanderlust.git (elsp-bsfilter-list-spam-files): Fix the argument BUFFER of `call-process'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f9b9951..ce6df16 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-08-27 Hiroya Murata + + * elsp-bsfilter.el (elsp-bsfilter-list-spam-files): Fix the + argument BUFFER of `call-process'. + 2006-08-27 Yoichi NAKAYAMA * elsp-bsfilter.el (elsp-bsfilter-call-bsfilter): Remove nil from diff --git a/elmo/elsp-bsfilter.el b/elmo/elsp-bsfilter.el index ab7f53d..9ba26af 100644 --- a/elmo/elsp-bsfilter.el +++ b/elmo/elsp-bsfilter.el @@ -108,22 +108,29 @@ (if register elmo-spam-bsfilter-update-switch))))) (defsubst elsp-bsfilter-list-spam-files (targets) - (apply - #'call-process - elmo-spam-bsfilter-shell-program - nil - (list t (if elmo-spam-bsfilter-debug - (get-buffer-create "*Debug ELMO Bsfilter*"))) - nil - (append (if elmo-spam-bsfilter-shell-switch - (list elmo-spam-bsfilter-shell-switch)) - (if elmo-spam-bsfilter-program - (list elmo-spam-bsfilter-program)) - elmo-spam-bsfilter-args - (list "--list-spam") - (if elmo-spam-bsfilter-database-directory - (list "--homedir" elmo-spam-bsfilter-database-directory)) - targets))) + (let ((temp-file (and elmo-spam-bsfilter-debug + (make-temp-file "elsp-bserror")))) + (unwind-protect + (apply + #'call-process + elmo-spam-bsfilter-shell-program + nil + (list t temp-file) + nil + (append (if elmo-spam-bsfilter-shell-switch + (list elmo-spam-bsfilter-shell-switch)) + (if elmo-spam-bsfilter-program + (list elmo-spam-bsfilter-program)) + elmo-spam-bsfilter-args + (list "--list-spam") + (if elmo-spam-bsfilter-database-directory + (list "--homedir" elmo-spam-bsfilter-database-directory)) + targets)) + (when (and temp-file (file-exists-p temp-file)) + (with-current-buffer (get-buffer-create "*Debug ELMO Bsfilter*") + (goto-char (point-max)) + (insert-file-contents temp-file)) + (delete-file temp-file))))) (luna-define-method elmo-spam-list-spam-messages :around ((processor elsp-bsfilter) folder &optional numbers)