mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(mu4e): file attachment prompt arguments
There are two changes to the default optional read-file-name arguments that should be made for the purpose of attaching files: 1. The optional MUSTMATCH argument should be set, as one can't exactly attach non-existent files. 2. The INITIAL argument should be set to the empty string so that if default-directory is customised for some reason or another that selecting it leads to the expected directory being selected. Without INITIAL or DEFAULT-FILENAME being specified, the current file path will be used, which is never desirable as this is simply a path to the message buffer.
This commit is contained in:
@ -270,7 +270,7 @@ When otherwise called, open a dired buffer and enable `dired-mu4e-attach-ctrl-c-
|
||||
(pcase major-mode
|
||||
((or 'mu4e-compose-mode 'org-msg-edit-mode)
|
||||
(let ((mail-buffer (current-buffer))
|
||||
(location (read-file-name "Attach: ")))
|
||||
(location (read-file-name "Attach: " nil nil t "")))
|
||||
(if (not (file-directory-p location))
|
||||
(pcase major-mode
|
||||
('mu4e-compose-mode
|
||||
|
Reference in New Issue
Block a user