Mu4e: ensure that attachment isn't mixed with text
Ensure that mail-add-attachment is called on a blank line at the end of the buffer.
This commit is contained in:
parent
f7438325d9
commit
6c2d68ea17
1 changed files with 7 additions and 1 deletions
|
@ -247,7 +247,13 @@ When otherwise called, open a dired buffer."
|
|||
(location (read-file-name "Attach: ")))
|
||||
(if (not (file-directory-p location))
|
||||
(pcase major-mode
|
||||
('mu4e-compose-mode (mail-add-attachment location))
|
||||
('mu4e-compose-mode
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(unless (eq (current-column) 0)
|
||||
(insert "\n\n")
|
||||
(forward-line 2))
|
||||
(mail-add-attachment location)))
|
||||
('org-msg-edit-mode (org-msg-attach-attach location)))
|
||||
(split-window-sensibly)
|
||||
(with-current-buffer (dired location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue