Skip to content

Commit

Permalink
Images of parent message should be inline
Browse files Browse the repository at this point in the history
This addresses Issue #177.

Signed-off-by: Jeremy Compostella <[email protected]>
  • Loading branch information
jeremy-compostella committed Jan 16, 2024
1 parent 60e22e4 commit 90e4272
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions org-msg.el
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,9 @@ MML tags."
""
(concat " " (org-msg-get-to-name))))))
(when (eq .style 'top-posting)
(setq mml-content-disposition-alist
(append (org-msg--mml-content-disposition-alist)
mml-content-disposition-alist))
(save-excursion
(insert "\n\n" org-msg-separator "\n")
(delete-region (line-beginning-position) (1+ (line-end-position)))
Expand Down Expand Up @@ -1378,16 +1381,24 @@ This function is used as an advice function of
(goto-char citation-start))
(re-search-forward ,regexp (point-max) t)))))

(defun org-msg--mml-content-disposition-alist ()
"Return the appropriate per-file MIME disposition."
(mapcar (lambda (x)
(cons (concat x ".*") "inline"))
(org-msg-get-prop "reply-to")))

(defun org-msg-kill-buffer ()
"Delete temporary files."
(let ((files (org-msg-get-prop "reply-to")))
(dolist (file files)
(when (and (not (string= "" file)) (file-exists-p file))
(cond ((file-directory-p file) (delete-directory file t))
((delete-file file)))))
(when org-msg-mml-buffer-list
(let ((mml-buffer-list org-msg-mml-buffer-list))
(mml-destroy-buffers)))))
(dolist (file (org-msg-get-prop "reply-to"))
(when (and (not (string= "" file)) (file-exists-p file))
(cond ((file-directory-p file) (delete-directory file t))
((delete-file file)))))
(dolist (disposition (org-msg--mml-content-disposition-alist))
(setq mml-content-disposition-alist
(delete disposition mml-content-disposition-alist)))
(when org-msg-mml-buffer-list
(let ((mml-buffer-list org-msg-mml-buffer-list))
(mml-destroy-buffers))))

(defun org-msg-store-mml-buffers ()
"Locally store the list of MML temporary buffers."
Expand Down

0 comments on commit 90e4272

Please sign in to comment.