jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
281 stars 61 forks source link

Temporary reply-to filepaths are not persisted #172

Open robstewart57 opened 1 year ago

robstewart57 commented 1 year ago

I do not send emails after working hours. Using mu4e, I save drafts if I compose them outside of working hours.

When I save an org-msg email, the properties are e.g.:

:PROPERTIES:
:reply-to: ("/tmp/mm-oYbuU6.html")
:attachment: nil
:alternatives: (html)
:END:

The issue is that I shutdown my machine until the following working day. When the time comes to send the email, the file /tmp/mm-oYbuU6.html has been removed along with all files in /tmp. When I attempt to send these saved emails, I am unable to because this file does not exist.

Is there are way to configure the temporary directly of reply-to file paths, to a path that persists between reboots?

jeremy-compostella commented 1 year ago

As nicely requested over email, here is an idea:

For mu4e, the function responsible of creating the original email file is org-msg-save-article-for-reply-mu4e(). It uses the (make-temp-file "org-msg" nil ".html") to create the filename. make-temp-file places the file in the operating system temporary folder (aka. /tmp on Linux). I would suggest to make org-msg-save-article-for-reply-mu4e() function do things a bit differently and put the file in a configurable directory path which would survive reboots.