[mew-dist 19326] Re: 一括添付
Hideyuki SHIRAI ( 白井秀行 )
shirai at example.com
2001年 10月 15日 (月) 18:20:40 JST
From: KOIE Hidetaka (鯉江英隆) <hide at example.com> さん曰く
Subject: [mew-dist 19323] 一括添付
Message-ID: <01Oct15.172321jst.29573 at example.com>
Date: Mon, 15 Oct 2001 17:25:04 +0900
鯉江> 夢は
鯉江> 「dired風の画面で添付したいやつにマークをつけてC-c C-cで一括添付!」です。
案一:
http://www.asahi-net.or.jp/~pi9s-nnb/dired-dd-home.html
の dired-dd と dired-dd-mew.el を使えば、dird で mark をつけて、
attach 領域まで mouse で drag/drop すれば、夢がかないます :-)
案二:
mouse はなるだけ使いたくないので、作ってみました。
今、でっち上げたのでなにかしら不具合があるかもしれないです。
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map "\C-c\C-m" 'dired-do-mew-attach-copy)))
(defvar dired-mew-attach-copy nil)
(defun dired-do-mew-attach-copy (&optional arg)
(interactive "P")
(or (featurep 'dired-aux) (require 'dired-aux))
(setq dired-mew-attach-copy nil)
(dired-map-over-marks-check
(function dired-mew-attach-copy) arg 'mew-attach-copy t)
(when dired-mew-attach-copy
(let ((draft (mew-max-draft-buffer)) buf file)
(if (null draft)
(message "No draft buffer exists!")
(setq buf (mew-input-buffer draft))
(if (null (get-buffer buf))
(message "No such draft buffer!")
(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 1))
(sit-for 0)
(when (y-or-n-p "Attach files ? ")
(while (setq file (car dired-mew-attach-copy))
(mew-attach-copy file (file-name-nondirectory file))
(setq dired-mew-attach-copy (cdr dired-mew-attach-copy)))))))))))
(defun dired-mew-attach-copy ()
(let ((file (dired-get-filename)))
(if (file-readable-p file)
(progn
(setq dired-mew-attach-copy (cons file dired-mew-attach-copy))
nil)
t)))
--
白井秀行 (mailto:shirai at example.com)
Mew-dist メーリングリストの案内