From: Teemu Likonen <tlikonen@iki.fi>
To: John Mastro <john.b.mastro@gmail.com>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, help-gnu-emacs@gnu.org
Subject: Re: sending a buffer by mail
Date: Thu, 31 Aug 2017 07:43:43 +0300 [thread overview]
Message-ID: <87wp5ktkhs.fsf@mithlond.arda> (raw)
In-Reply-To: <CAOj2CQRFqUUZi9+c9m3E3ScErnz-GvU0ZNAKWayMMtrnacVuWQ@mail.gmail.com> (John Mastro's message of "Wed, 30 Aug 2017 18:55:47 -0700")
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
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 ///
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2017-08-31 4:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 23:00 sending a buffer by mail Jean-Christophe Helary
2017-08-30 23:16 ` Eric Abrahamsen
2017-08-31 0:46 ` Jean-Christophe Helary
2017-08-31 0:52 ` Eric Abrahamsen
2017-08-31 1:11 ` Eric Abrahamsen
2017-08-31 1:55 ` John Mastro
2017-08-31 2:04 ` Eric Abrahamsen
2017-08-31 4:43 ` Teemu Likonen [this message]
2017-09-21 13:05 ` Jean-Christophe Helary
2017-08-31 4:54 ` Bob Newell
2017-08-31 0:38 ` Mario Castelán Castro
2017-09-07 21:24 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wp5ktkhs.fsf@mithlond.arda \
--to=tlikonen@iki.fi \
--cc=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
--cc=john.b.mastro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.