[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4388: 23.1; rmailmm save option does not prompt for filename correct
From: |
Glenn Morris |
Subject: |
bug#4388: 23.1; rmailmm save option does not prompt for filename correctly (patch) |
Date: |
Fri, 11 Sep 2009 02:54:57 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
"David J. Biesack" wrote:
> On the attachment button/link, press Enter to invoke rmail-mime-save
> Currently, this prompts for a location to save the attachment but
> does not pass the current file name and directory name correctly.
I don't understand what you mean - can you explain?
> + (setq directory (if (not (string-match "^~$\\.*/" directory))
> + (concat directory "/")
> + directory))
What is this supposed to do?
> (read-file-name (format "Save as (default: %s): "
> filename)
> directory
> ! (expand-file-name filename directory)
> ! nil
> ! filename)
It seems you basically want the default value to be eg:
~/foo.jpg
rather than just
~
as it is now?
The current behaviour is consistent with, eg, C-x C-w. Having an
initial default file part just means more typing if you want to delete
it and use a different value.
The only change I would make here is:
--- rmailmm.el 10 Sep 2009 06:18:23 -0000 1.9
+++ rmailmm.el 11 Sep 2009 02:09:11 -0000
@@ -79,7 +79,7 @@
(defun rmail-mime-save (button)
"Save the attachment using info in the BUTTON."
(let* ((filename (button-get button 'filename))
- (directory (button-get button 'directory))
+ (directory (file-name-as-directory (button-get button 'directory)))
(data (button-get button 'data)))
(while (file-exists-p (expand-file-name filename directory))
(let* ((f (file-name-sans-extension filename))