[mew-dist 21105] dired-do-mew-attach-copy
MURAOKA Koji
mura050418 at example.com
2002年 7月 4日 (木) 11:44:04 JST
村岡です.
[mew-dist 19329]で白井さんが投稿された一括添付用コードをとても
重宝して使っていました.
ところが 3.0.55 になってからこの一括添付機能を使うとエラーが出
てしまいます.
是非ともこの機能を使えるようにしていただけないでしょうか.
BackTrace と,参考までに白井さんのコード(1行だけ変更しています)
を添付します.
---
Koji
-------------- next part --------------
Debugger entered--Lisp error: (void-function mew-match)
(mew-match 1)
(format "Attach files at \"%s\" ? " (mew-match 1))
(y-or-n-p (format "Attach files at \"%s\" ? " (mew-match 1)))
(if (y-or-n-p (format "Attach files at \"%s\" ? " ...)) (mew-attach-from-dired) (message (substitute-command-keys "Move cursor and press '\\<mew-draft-attach-map>\\[mew-attach-from-dired]'")))
(progn (goto-char (match-beginning 2)) (sit-for 0) (if (y-or-n-p ...) (mew-attach-from-dired) (message ...)))
(if (re-search-forward " +\\([1-9][.0-9]*\\) +\\(\\.\\)" nil t) (progn (goto-char ...) (sit-for 0) (if ... ... ...)))
(when (re-search-forward " +\\([1-9][.0-9]*\\) +\\(\\.\\)" nil t) (goto-char (match-beginning 2)) (sit-for 0) (if (y-or-n-p ...) (mew-attach-from-dired) (message ...)))
(if (null (mew-draft-p)) (message "draft folder!") (unless (mew-attach-p) (mew-draft-prepare-attachments)) (goto-char (mew-attach-begin)) (when (re-search-forward " +\\([1-9][.0-9]*\\) +\\(\\.\\)" nil t) (goto-char ...) (sit-for 0) (if ... ... ...)))
(if (null (get-buffer buf)) (message "No such draft buffer!") (if (get-buffer-window buf) (select-window ...) (switch-to-buffer buf)) (if (null ...) (message "draft folder!") (unless ... ...) (goto-char ...) (when ... ... ... ...)))
(if (null draft) (message "No draft buffer exists!") (setq buf (mew-input-draft-buffer draft)) (if (null ...) (message "No such draft buffer!") (if ... ... ...) (if ... ... ... ... ...)))
(let ((draft ...) buf file) (if (null draft) (message "No draft buffer exists!") (setq buf ...) (if ... ... ... ...)))
(progn (let (... buf file) (if ... ... ... ...)))
(if dired-mew-attach-copy-files (progn (let ... ...)))
(when dired-mew-attach-copy-files (let (... buf file) (if ... ... ... ...)))
(progn (or (featurep ...) (require ...)) (setq dired-mew-attach-copy-files nil) (dired-map-over-marks-check (function dired-mew-attach-copy) arg (quote mew-attach-copy) t) (when dired-mew-attach-copy-files (let ... ...)))
(if (featurep (quote mew)) (progn (or ... ...) (setq dired-mew-attach-copy-files nil) (dired-map-over-marks-check ... arg ... t) (when dired-mew-attach-copy-files ...)))
(when (featurep (quote mew)) (or (featurep ...) (require ...)) (setq dired-mew-attach-copy-files nil) (dired-map-over-marks-check (function dired-mew-attach-copy) arg (quote mew-attach-copy) t) (when dired-mew-attach-copy-files (let ... ...)))
dired-do-mew-attach-copy(nil)
* call-interactively(dired-do-mew-attach-copy)
-------------- next part --------------
;;; Mew- attach ;;;
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map "\C-c\C-m" 'dired-do-mew-attach-copy)))
(add-hook 'mew-draft-mode-hook
(lambda ()
(define-key mew-draft-attach-map "M" 'mew-attach-from-dired)))
(defvar dired-mew-attach-copy-files nil)
(defun dired-do-mew-attach-copy (&optional arg)
(interactive "P")
(when (featurep 'mew)
(or (featurep 'dired-aux) (require 'dired-aux))
(setq dired-mew-attach-copy-files nil)
(dired-map-over-marks-check
(function dired-mew-attach-copy) arg 'mew-attach-copy t)
(when dired-mew-attach-copy-files
(let ((draft (mew-max-draft-buffer)) buf file)
(if (null draft)
(message "No draft buffer exists!")
;; (setq buf (mew-input-buffer draft))
(setq buf (mew-input-draft-buffer draft))
(if (null (get-buffer buf))
(message "No such draft buffer!")
(if (get-buffer-window buf)
(select-window (get-buffer-window buf))
(switch-to-buffer buf))
(if (null (mew-draft-p))
(message "draft folder!")
(unless (mew-attach-p) (mew-draft-prepare-attachments))
(goto-char (mew-attach-begin))
(when (re-search-forward " +\\([1-9][.0-9]*\\) +\\(\\.\\)" nil t)
(goto-char (match-beginning 2))
(sit-for 0)
(if (y-or-n-p (format "Attach files at \"%s\" ? " (mew-match 1)))
(mew-attach-from-dired)
(message
(substitute-command-keys
"Move cursor and press '\\<mew-draft-attach-map>\\[mew-attach-from-dired]'")))))))))))
(defun dired-mew-attach-copy ()
(let ((file (dired-get-filename)))
(if (file-readable-p file)
(progn
(setq dired-mew-attach-copy-files (cons file dired-mew-attach-copy-files))
nil)
t)))
(defun mew-attach-from-dired ()
(interactive)
(if (mew-attach-not-line012-1)
(when dired-mew-attach-copy-files
(let (file)
(while (setq file (car dired-mew-attach-copy-files))
(mew-attach-copy file (file-name-nondirectory file))
(setq dired-mew-attach-copy-files (cdr dired-mew-attach-copy-files)))))
(message "Can not attach from dired here")))
Mew-dist メーリングリストの案内