[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding multiple attachments
On Sun, 17 Oct 2010 05:18:33 -0400,David Abrahams wrote:
>It would be nice to combine that with wildcard expansion, too, as
>above, and easily enough done. And I would do "Insert file as MIME
>message: (or RET if done)" so I didn't have to y-or-n between files.
>But I don't want to embarrass myself by posting incorrect code in the
>middle of the night ;-)
Okay, here's what I've cobbled together for my .wl:
;;Cobbled together from posts by Erik Hetzner & Harald Judt to
;; wl-en@lists.airs.net
(defun mime-edit-insert-multiple-files ()
"Insert MIME parts from multiple files."
(interactive)
(let ((dir default-directory))
(let ((next-file (expand-file-name
(read-file-name "Insert file as MIME message: "
dir))))
(setq file-list (file-expand-wildcards next-file))
(while (car file-list)
(mime-edit-insert-file (car file-list))
(setq file-list (cdr file-list))))))
(global-set-key "\C-c\C-x\C-a" 'mime-edit-insert-multiple-files)
Cheers,
JJG
--
jjg: Jonathan J. Groll : groll co za
has_one { :blog => "http://bloggroll.com" }