mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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:
@ -247,7 +247,13 @@ When otherwise called, open a dired buffer."
|
|||||||
(location (read-file-name "Attach: ")))
|
(location (read-file-name "Attach: ")))
|
||||||
(if (not (file-directory-p location))
|
(if (not (file-directory-p location))
|
||||||
(pcase major-mode
|
(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)))
|
('org-msg-edit-mode (org-msg-attach-attach location)))
|
||||||
(split-window-sensibly)
|
(split-window-sensibly)
|
||||||
(with-current-buffer (dired location)
|
(with-current-buffer (dired location)
|
||||||
|
Reference in New Issue
Block a user