From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: sending a buffer by mail Date: Thu, 31 Aug 2017 07:43:43 +0300 Message-ID: <87wp5ktkhs.fsf@mithlond.arda> References: <05596771-5F19-4254-848C-77F6E66233A6@gmail.com> <87a82gfxyl.fsf@ericabrahamsen.net> <85C51987-1B1D-494B-A2A1-700190E68A73@gmail.com> <871snsd0e1.fsf@ericabrahamsen.net> <87tw0obkxz.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1504187663 25283 195.159.176.226 (31 Aug 2017 13:54:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2017 13:54:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Eric Abrahamsen , help-gnu-emacs@gnu.org To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 31 15:54:13 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnPuj-0004z0-Ug for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2017 15:53:46 +0200 Original-Received: from localhost ([::1]:55927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnPur-0002st-2o for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2017 09:53:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnHKv-0007wT-RD for help-gnu-emacs@gnu.org; Thu, 31 Aug 2017 00:44:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnHKq-0004hg-P4 for help-gnu-emacs@gnu.org; Thu, 31 Aug 2017 00:44:13 -0400 Original-Received: from mta-out1.inet.fi ([62.71.2.233]:36190 helo=johanna1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnHKq-0004fh-Ed for help-gnu-emacs@gnu.org; Thu, 31 Aug 2017 00:44:08 -0400 RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 80 2014-11-10_18-01-23 260f8afb9361da3c7edfd3a8e3a4ca908191ad29 RazorGate-KAS: Lua profiles 69136 [Nov 12 2014] RazorGate-KAS: Method: none Original-Received: from mithlond (193.210.225.132) by johanna1.inet.fi (9.0.002.03-2-gbe5d057) id 59A5591C003092C1; Thu, 31 Aug 2017 07:43:52 +0300 In-Reply-To: (John Mastro's message of "Wed, 30 Aug 2017 18:55:47 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 62.71.2.233 X-Mailman-Approved-At: Thu, 31 Aug 2017 09:53:29 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114152 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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) ...) =2D-=20 /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkhZiiC54Bnj5a16Skzo1BB5+rVEFAlmnk/8ACgkQkzo1BB5+ rVFaGQgAjr5dLoA7qVO8jonTH4pYXpCYhFWCaPaz3AhKrCvNvEjI/5Lls8orIbnt +NCI9dTgY9ohLIXC2SitnJUM7c7T7tvjEC0tIa1muEOvyIUlN+zn3o78AMP2zvLd iN4B8r/9cfBBSqPCbGAg476twboo9/amo0k5r2TWMJ0ER6xQdgiwz/l5fFtRvEBs zZfj9jXD7TvM3obLKGBXPgaO+jrVUxALEkhsS8EjADZKaPfGAGARSaLPmJsMQZt9 tLombgz65HART28fgY7BxqJvhoIDAy0tA/S/FrvoKazvxBnjpYVyVC5jmmEICiQS X70pDY1F/CoDUC/GyaWPOZzFXnqlSw== =jWF8 -----END PGP SIGNATURE----- --=-=-=--