[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sending a buffer by mail

From: Teemu Likonen
Subject: Re: sending a buffer by mail
Date: Thu, 31 Aug 2017 07:43:43 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

John Mastro [2017-08-30 18:55:47-07] wrote:

> The difference is likely irrelevant, but you can still use
> `insert-buffer' rather than consing a string of the buffer's contents:
> (defun send-buffer-as-mail ()
>   (interactive)
>   (let ((buf (current-buffer)))
>     (compose-mail)
>     (save-excursion
>       (message-goto-body)
>       (insert-buffer buf))))

If you are going to use function message-goto-body I think it's a good
idea to ensure that compose-mail will use message-mode.

    (let ((mail-user-agent 'message-user-agent) ; or gnus-user-agent

/// Teemu Likonen   - .-..   <> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]