[mew-dist 28945] 振り分け条件の入れ子
Yasushi
paf03637 at example.com
2009年 7月 31日 (金) 09:43:18 JST
Yasushiです。Mew 6.2 on Meadow 3.01の環境です。
.mew.elに下記のような入れ子の条件を書いてみました。
;; 振り分け条件
(setq mew-refile-guess-alist
'(
("From:"
("paf03637 at example.com"
("To:" ("paf03637 at example.com" "+spam"))))
))
自分が自分宛にメールを送る事はまずないので、spamをはじく意図です。
すると
setq: Wrong type argument: listp, "To:"
と怒られてしまいます。多重の振り分け条件をこのように書くのは間違ってい
るのでしょうか。どなたか御指南してくださると助かります。
エラーの際のバックトレースを添付しました。
-------------- next part --------------
Debugger entered--Lisp error: (wrong-type-argument listp "To:")
car("To:")
(setq key (car rl))
(while --cl-dolist-temp-- (setq rl (car --cl-dolist-temp--)) (setq key (car rl)) (setq alist (cdr rl)) (cond (... ...) (... ...) (... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- rule) rl) (while --cl-dolist-temp-- (setq rl ...) (setq key ...) (setq alist ...) (cond ... ... ...) (setq --cl-dolist-temp-- ...)) nil)
(catch (quote --cl-block-nil--) (let (... rl) (while --cl-dolist-temp-- ... ... ... ... ...) nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
(block nil (let (... rl) (while --cl-dolist-temp-- ... ... ... ... ...) nil))
(dolist (rl rule) (setq key (car rl)) (setq alist (cdr rl)) (cond (... ...) (... ...) (... ...)))
(let (key alist val f-or-r header ent ret fin) (dolist (rl rule) (setq key ...) (setq alist ...) (cond ... ... ...)) (if proto (dolist ... ...) (nreverse ret)))
mew-refile-guess-by-alist1(("To:" ("paf03637 at example.com" "+spam")) "+")
(setq ent (mew-refile-guess-by-alist1 f-or-r proto))
(cond ((stringp f-or-r) (setq ent ...)) ((listp f-or-r) (setq ent ...)))
(progn (cond (... ...) (... ...)))
(if (and (stringp val) (string-match val header)) (progn (cond ... ...)))
(when (and (stringp val) (string-match val header)) (cond (... ...) (... ...)))
(while --cl-dolist-temp-- (setq al (car --cl-dolist-temp--)) (setq val (mew-alist-get-key al)) (setq f-or-r (mew-alist-get-value al)) (setq ent nil) (when (and ... ...) (cond ... ...)) (when ent (if ... ... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- alist) al) (while --cl-dolist-temp-- (setq al ...) (setq val ...) (setq f-or-r ...) (setq ent nil) (when ... ...) (when ent ...) (setq --cl-dolist-temp-- ...)) nil)
(catch (quote --cl-block-nil--) (let (... al) (while --cl-dolist-temp-- ... ... ... ... ... ... ...) nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
(block nil (let (... al) (while --cl-dolist-temp-- ... ... ... ... ... ... ...) nil))
(dolist (al alist) (setq val (mew-alist-get-key al)) (setq f-or-r (mew-alist-get-value al)) (setq ent nil) (when (and ... ...) (cond ... ...)) (when ent (if ... ... ...)))
(cond ((eq key t) (mew-addq ret ...)) ((eq key nil) (or ret ...)) ((setq header ...) (dolist ... ... ... ... ... ...)))
(while --cl-dolist-temp-- (setq rl (car --cl-dolist-temp--)) (setq key (car rl)) (setq alist (cdr rl)) (cond (... ...) (... ...) (... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- rule) rl) (while --cl-dolist-temp-- (setq rl ...) (setq key ...) (setq alist ...) (cond ... ... ...) (setq --cl-dolist-temp-- ...)) nil)
(catch (quote --cl-block-nil--) (let (... rl) (while --cl-dolist-temp-- ... ... ... ... ...) nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
(block nil (let (... rl) (while --cl-dolist-temp-- ... ... ... ... ...) nil))
(dolist (rl rule) (setq key (car rl)) (setq alist (cdr rl)) (cond (... ...) (... ...) (... ...)))
(let (key alist val f-or-r header ent ret fin) (dolist (rl rule) (setq key ...) (setq alist ...) (cond ... ... ...)) (if proto (dolist ... ...) (nreverse ret)))
mew-refile-guess-by-alist1((("From:" ("paf03637 at example.com" ...))) "+")
(let ((alist ...) (proto mew-inherit-refile-proto)) (mew-refile-guess-by-alist1 alist proto))
mew-refile-guess-by-alist()
funcall(mew-refile-guess-by-alist)
(setq ret (funcall func))
(if (string-match "ctrl" (symbol-name func)) (when (setq ret ...) (setq stop t) (or show-all ...)) (setq ret (funcall func)))
(while --cl-dolist-temp-- (setq func (car --cl-dolist-temp--)) (if (string-match "ctrl" ...) (when ... ... ...) (setq ret ...)) (unless (listp ret) (setq ret ...)) (setq info (nconc info ...)) (unless stop (dolist ... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- funcs) func) (while --cl-dolist-temp-- (setq func ...) (if ... ... ...) (unless ... ...) (setq info ...) (unless stop ...) (setq --cl-dolist-temp-- ...)) nil)
(catch (quote --cl-block-nil--) (let (... func) (while --cl-dolist-temp-- ... ... ... ... ... ...) nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
(block nil (let (... func) (while --cl-dolist-temp-- ... ... ... ... ... ...) nil))
(dolist (func funcs) (if (string-match "ctrl" ...) (when ... ... ...) (setq ret ...)) (unless (listp ret) (setq ret ...)) (setq info (nconc info ...)) (unless stop (dolist ... ...)))
(catch (quote last) (dolist (func funcs) (if ... ... ...) (unless ... ...) (setq info ...) (unless stop ...)))
(let ((case-fold-search t) (funcs mew-refile-guess-control) ret guess info stop) (catch (quote last) (dolist ... ... ... ... ...)) (setq guess (nreverse guess)) (if (not mew-refile-ctrl-multi) (setq guess ...)) (cons guess info))
mew-refile-guess(t)
(setq learn-info (mew-refile-guess auto))
(save-excursion (set-buffer buf) (setq learn-info (mew-refile-guess auto)))
(let ((proto mew-inherit-refile-proto) (case mew-inherit-refile-case) learn-info folders ret cands singlep lst-lst) (save-excursion (set-buffer buf) (setq learn-info ...)) (if auto (setq folders ...) (cond ... ... ...) (setq cands ...) (when exfld ... ...) (setq cands ...) (unless cands ...) (setq folders ...)) (setq lst-lst (mapcar ... folders)) (dolist (lst lst-lst) (dolist ... ...)) (cons (nreverse ret) (cdr learn-info)))
mew-refile-decide-folders(#<buffer *Mew* > "1" nil t nil)
(setq learn-info (mew-refile-decide-folders buf msg cur-folders auto exfld))
(condition-case nil (setq learn-info (mew-refile-decide-folders buf msg cur-folders auto exfld)) (quit (goto-char pos)))
(if exp-flds (setq folders exp-flds) (unless (or auto ...) (mew-summary-display)) (setq buf (mew-cache-hit fld msg)) (unless buf (save-excursion ... ... ... ... ... ...)) (when (and ... ...) (save-excursion ... ...)) (condition-case nil (setq learn-info ...) (quit ...)) (setq folders (car learn-info)))
(cond ((and mark ...) (or no-msg ...) nil) (invalidp (or no-msg ...) nil) (t (if exp-flds ... ... ... ... ... ... ...) (dolist ... ...) (setq folders ...) (setq folders ...) (unless no-mark ...) (if delbuf ...) (setq mew-refile-last-folder folders) (set-buffer-modified-p nil)))
(let ((pos ...) fld msg folders cur-folders mark buf learn-info tmp delbuf invalidp folders-str mew-inherit-refile-proto mew-inherit-refile-case) (mew-summary-goto-message) (when (mew-sumsyn-match mew-regex-sumsyn-short) (setq fld ...) (setq msg ...) (setq invalidp ...)) (setq mew-inherit-refile-case (mew-case:folder-case fld)) (setq mew-inherit-refile-proto (substring ... 0 1)) (setq mark (mew-summary-get-mark)) (cond (... ... nil) (invalidp ... nil) (t ... ... ... ... ... ... ... ...)) (goto-char pos) folders)
mew-summary-refile-body(nil t no-msg)
(or (and mark (or mew-refile-auto-refile-skip-any-mark ...)) (mew-summary-refile-body nil t (quote no-msg)))
(if mew-mark-review-only (and mark (char-equal mark mew-mark-review) (mew-summary-refile-body nil t ...)) (or (and mark ...) (mew-summary-refile-body nil t ...)))
(while (re-search-forward mew-regex-sumsyn-valid nil t) (setq mark (mew-summary-get-mark)) (if mew-mark-review-only (and mark ... ...) (or ... ...)) (if (= ... 0) (message "Auto refiling...%s%%" ...)) (setq line (1+ line)) (forward-line))
(save-window-excursion (goto-char (point-min)) (while (re-search-forward mew-regex-sumsyn-valid nil t) (setq mark ...) (if mew-mark-review-only ... ...) (if ... ...) (setq line ...) (forward-line)))
(if (and mew-refile-auto-refile-confirm (not ...)) (message "Not refiled") (message "Auto refiling...") (save-window-excursion (goto-char ...) (while ... ... ... ... ... ...)) (message "Auto refiling...done"))
(let ((mew-use-highlight-x-face nil) (lines ...) (case-fold-search nil) (line 1) (mark nil) msg) (cond (mew-mark-review-only ...) (mew-refile-auto-refile-skip-any-mark ...) (t ...)) (if (and mew-refile-auto-refile-confirm ...) (message "Not refiled") (message "Auto refiling...") (save-window-excursion ... ...) (message "Auto refiling...done")))
(cond ((not ...) (message "This command cannot be used in this mode")) ((or ... ...) (message "This command cannot be used in %s" ...)) (t (mew-decode-syntax-delete) (let ... ... ...)))
(mew-summary-local-or-imap (mew-decode-syntax-delete) (let (... ... ... ... ... msg) (cond ... ... ...) (if ... ... ... ... ...)))
(cond ((not ...) (message "This command cannot be used in this mode")) ((mew-summary-draft-p) (message "This command cannot be used in %s" ...)) (t (mew-summary-local-or-imap ... ...)))
(mew-summary-not-in-draft (mew-summary-local-or-imap (mew-decode-syntax-delete) (let ... ... ...)))
(cond ((not ...) (message "This command cannot be used in this folder")) (t (mew-summary-not-in-draft ...)))
(mew-pickable (mew-summary-not-in-draft (mew-summary-local-or-imap ... ...)))
(mew-summary-refilable (mew-decode-syntax-delete) (let (... ... ... ... ... msg) (cond ... ... ...) (if ... ... ... ... ...)))
mew-summary-auto-refile(nil)
call-interactively(mew-summary-auto-refile)
Mew-dist メーリングリストの案内