help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: sending a buffer by mail


From: Jean-Christophe Helary
Subject: Re: sending a buffer by mail
Date: Thu, 21 Sep 2017 22:05:04 +0900

Belated thank you to all who replied and helped.

Jean-Christophe 

> On Aug 31, 2017, at 13:43, Teemu Likonen <tlikonen@iki.fi> wrote:
> 
> 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
>          ...)
>      (compose-mail)
>      ...)
> 
> -- 
> /// Teemu Likonen   - .-..   <https://keybase.io/tlikonen> //
> // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///




reply via email to

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