notmuch-emacs: forward messages inline

Mark Walters markwalters1009 at gmail.com
Mon Nov 9 06:58:58 PST 2015


Hi

Does adding something like the following to your .emacs file do what you want?


(defun my-forward (prefix)
  (interactive "P")
  (let ((message-forward-as-mime nil)
	(message-forward-ignored-headers ".*"))
    (notmuch-show-forward-message prefix)))

(define-key notmuch-show-mode-map "F" 'my-forward)

Then "F" should forward the message as a plain message rather than
rfc822, and there should not be any spurious headers.

Best wishes

Mark



On Fri, 06 Nov 2015, Matthew Lear <matt at bubblegen.co.uk> wrote:
> Hi Daniel,
>
>> On 5 Nov 2015, at 21:42, Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:
>>> On Fri 2015-11-06 04:51:53 +0900, Matthew Lear wrote:
>>> Are there any recommended ways to selectively forward an email as
>>> inline with notmuch-emacs rather than as an RFC822 attachment, eg have
>>> a new shortcut key that can be used for this purpose in addition to f?
>>> I have toggled one of the mml configuration variables (I forget
>>> exactly what it was) which switched the forwarding method to inline
>>> (ACAICT this also removed the ability of being able to forward as
>>> RFC822), but it also included various header information in the body
>>> of the email. Not good.
>> 
>> I suppose you could reply to the message (r) and just change the
>> addresses, which would include the previous message "inline".  If you
>> don't like that it leaks the previous message-id in the In-Reply-To and
>> References headers, you can just kill them from the buffer manually.
>
> I guess that's one way, but it's a bit of a faff. Unless it was possible to wrap
> it all up in lisp, I don't really think it's a good option.
>
>> But can i ask why you'd want this?  forwarded messages as RFC 822
>> attachments are significantly more sane for any MUA to deal with.
>
> No arguments on the 'being sane' front, although I have seen
> notmuch-emacs fail to correctly formulate an RFC822 attachment of the
> original email message a few times. I suspect this was due to MS Outlook
> formatting but can't be sure, though. My main use of notmuch is at work
> where I have to handle large amounts of email such as bug notifications from
> a couple of systems, messages to/from lists, auto generated stuff for tracking,
> plus the usual reams of corporate email from teams and colleagues. Notmuch
> allows me to handle this fantastically. A common use case of forwarding
> messages inline is to take an email already received, and send it onto
> colleagues. It's not uncommon for this to initiate a new thread of conversation
> and other people could be added to the thread as appropriate. If I were to
> forward a message I received as an RFC822 attachment, in order for the
> conversation to be coherent and contained in the text when other people were
> added to the thread, the email containing my attachment would need to be
> forwarded to (additional) recipients because 'replying to all' and including new
> recipients wouldn't contain the original message. As I see it, to be able to
> forward and include people starting a new thread based on the forwarded
> message, it needs to be inline. Make sense?
> --  Matt 
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list