0

I use Emacs and mu4e for email. If I forward an email, the body defaults to this:

From: me <>
To: 
Subject: Fwd: ...
--text follows this line--


Sender <> writes:
...

I would like mu4e to add the date of the email forwarded, such as:

On 1 October 2019, at 18:07, sender <> wrote:
...

I looked at the source code of mu4e-forward, mu4e-compose, and mu4e~proc-compose without seeing where the text is added. I think it's in:

  (mu4e~proc-send-command
    "cmd:compose type:%s docid:%d extract-encrypted:%s use-agent:true"
    (symbol-name type) docid (if decrypt "true" "false")))

but I don't know how to hack "cmd:compose ..."

Has anyone tweaked the default message when forwarding or replying?

4

mu4e uses message.el to edit the messages. The documentation for message-citation-line-function in that package shows:

Function called to insert the "Whomever writes:" line.

Predefined functions include ‘message-insert-citation-line’ and ‘message-insert-formatted-citation-line’ (see the variable ‘message-citation-line-format’).

The definition of message-insert-citation-line has:

(insert (mail-header-from message-reply-headers) " writes:")

But this one has no formatting to customize with date and time. The definition of message-citation-line-format shows a value of:

On %a, %b %d %Y, %N wrote:

So you'll have to set both message-citation-line-function and message-citation-line-format:

(setq message-citation-line-function 'message-insert-formatted-citation-line)
(setq message-citation-line-format "On %Y-%m-%d at %R %Z, %f wrote:\n")

The FAQs mention this customization to avoid a bug in Outlook:

(setq  message-citation-line-format "On %Y-%m-%d at %R %Z, %f wrote...")` 
  • thanks @miguelmorin, I tend to be far too brief in my answers. – Muihlinn Oct 3 at 9:50
  • Totally fine! You find the right answer and I pad it with documentation... seems like a good trade to me :) – miguelmorin Oct 3 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.