From: dmaus Date: Sun, 12 Feb 2012 13:56:01 +0000 (+0000) Subject: wl-mime.el (wl-mime-save-content): Fix incorrect usage of `read-file-name'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eda5297f9ab640468905b55fde6f9fb8d8f8e421;p=elisp%2Fwanderlust.git wl-mime.el (wl-mime-save-content): Fix incorrect usage of `read-file-name'. * wl-mime.el (wl-mime-save-content): Fix incorrect usage of `read-file-name'. Function signature is (read-file-name PROMPT &optional DIR DEFAULT-FILENAME MUSTMATCH INITIAL PREDICATE) Passing the full path to the target file as second argument causes problems with saving attachments when `ido-mode' is enabled. The function signature didn't change in 22 and as it seems didn't change in 21 (guessing from the usage, couldn't compile 21 on x64 system). --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 20e2f2f..0dcbec9 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2012-02-12 David Maus + + * wl-mime.el (wl-mime-save-content): Fix incorrect usage of + `read-file-name'. + 2012-01-01 TAKAHASHI Kaoru * wl-demo.el (wl-demo-copyright-notice): Add 2012. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 364f426..9d28f8b 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -749,11 +749,12 @@ With ARG, ask destination folder." (defun wl-mime-save-content (entity situation) (let ((filename (expand-file-name (read-file-name "Save to file: " - (expand-file-name - (or (mime-entity-safe-filename entity) - ".") - (or wl-mime-save-directory - wl-temporary-file-directory)))))) + (or wl-mime-save-directory + wl-temporary-file-directory) + nil nil + (or (mime-entity-safe-filename entity) + ".") + )))) (while (file-directory-p filename) (setq filename (read-file-name "Please set filename (not directory): " filename)))