mirror of https://github.com/djcb/mu.git
* mu4e: support autocompletion when choosing file/dir for saving attachments
This commit is contained in:
parent
f6ec3665ae
commit
257374076c
|
@ -870,12 +870,14 @@ message-at-point if nil) to disk."
|
||||||
(attnum (or attnum
|
(attnum (or attnum
|
||||||
(mu4e~view-get-attach-num "Attachment to save" msg)))
|
(mu4e~view-get-attach-num "Attachment to save" msg)))
|
||||||
(att (mu4e~view-get-attach msg attnum))
|
(att (mu4e~view-get-attach msg attnum))
|
||||||
(path (concat mu4e-attachment-dir "/" (plist-get att :name)))
|
_ (path (concat mu4e-attachment-dir "/"))
|
||||||
|
(fname (plist-get att :name))
|
||||||
(index (plist-get att :index))
|
(index (plist-get att :index))
|
||||||
(retry t))
|
(retry t))
|
||||||
(while retry
|
(while retry
|
||||||
(setq path (expand-file-name (read-string
|
(setq path (expand-file-name
|
||||||
(mu4e-format "Save as ") path)))
|
(read-directory-name
|
||||||
|
(mu4e-format "Save as ") path nil nil fname)))
|
||||||
(setq retry
|
(setq retry
|
||||||
(and (file-exists-p path)
|
(and (file-exists-p path)
|
||||||
(not (y-or-n-p (mu4e-format "Overwrite '%s'?" path))))))
|
(not (y-or-n-p (mu4e-format "Overwrite '%s'?" path))))))
|
||||||
|
|
Loading…
Reference in New Issue