Skip to content

Commit

Permalink
tweak(org-msg): remember last directory when adding attachements
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 14, 2023
1 parent 309e5a5 commit 499d731
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/me-email.el
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,15 @@
"ad" #'org-msg-attach-delete
"k" #'org-msg-edit-kill-buffer
"p" #'org-msg-preview)
(org-msg-mode 1))
(org-msg-mode 1)

;; HACK: When adding multiple attachements, we likely need it to remember the
;; directory of the last added attachement.
(advice-add
'org-msg-attach-attach :after
(defun +org-msg-attach-attach--save-default-directory-a (file &rest _)
(when-let ((dir (file-name-directory file)))
(setq-local default-directory dir)))))

(use-package org-mime
:straight t
Expand Down

0 comments on commit 499d731

Please sign in to comment.