From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re: sending a buffer by mail Date: Thu, 21 Sep 2017 22:05:04 +0900 Message-ID: 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> <87wp5ktkhs.fsf@mithlond.arda> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1505999154 13651 195.159.176.226 (21 Sep 2017 13:05:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Sep 2017 13:05:54 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 21 15:05:41 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 1dv1Ah-0002sY-IU for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Sep 2017 15:05:39 +0200 Original-Received: from localhost ([::1]:53612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv1Ao-0001hP-NA for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Sep 2017 09:05:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv1AG-0001f8-2N for help-gnu-emacs@gnu.org; Thu, 21 Sep 2017 09:05:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dv1AB-0003cJ-SM for help-gnu-emacs@gnu.org; Thu, 21 Sep 2017 09:05:12 -0400 Original-Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:51496) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dv1AB-0003bR-NS for help-gnu-emacs@gnu.org; Thu, 21 Sep 2017 09:05:07 -0400 Original-Received: by mail-pf0-x22a.google.com with SMTP id b70so3178580pfl.8 for ; Thu, 21 Sep 2017 06:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=7lVTqckwkSyY4FAnK6Y53XbdZ2aQbmOI5SePVCuekhc=; b=fPD7qZv9obz5AjOGD4QgZ5TfA26U4iJFBZkiQlTVN36nxzF1as2b5ehifPSCXf9D7h mQC+9BUySAU3SvehQg6LLcxVmhTPX9TiLO3xzSRCH24vnHNeZ44x0QhfC6r8wBn4ckhS UL54987LYYlvhQLuXMnlni4blxGIyWs9B1aF2nng7EV5DnRoAz9jw6vJA7Ak+Du+ni4n 8jvL5vg3oX0Wgq40t2Yvo9UysppSDSgwYAdBB/hzqPXgL7aKm5h8DMeUFkbxxChWqcyN kH3c8HTPUllhOdSe4xu/jWoSmz340AYJL5myjLfDkgAeRnfW5+RQd3ASo//YVWVs5vP5 MEeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=7lVTqckwkSyY4FAnK6Y53XbdZ2aQbmOI5SePVCuekhc=; b=QOIZ42KmyIjK3N9luTEONBp/LW2uV4wQYjCl1nf4RsK/WUsW/i/l6+2U0HAC8epl/8 ycfl1Cy/21KNEBOzbTGNNqP+HGl3Gtx4Pb267Wf/40DeAVEWIQLVt09dw921NdvIoC3j yZW7zi7Ps1Ga2BNwX+Bwy7wZMvpaTHGqwMkFDZWtXBDTt4P32A0LPjtUCaVDb6OT+k4U Pv0VBR5TbqJb12B8y1rq70pslDiL2wAFWilJ48zgVBjbJv2edmZfxhEUIgukNoCfJ2Xn BknD7+OgRPuFE1Ej/etojfDqOocytFFesb+EVzumGTLh6CcKf5VIjyVJxVAcCrwGTTc5 1p2A== X-Gm-Message-State: AHPjjUgT2/rwbpMRrZy0NE57lNlMQvbzcVJKfhRmLuGKMUuERyiW1h63 8gqyumxo/8wAV6qS1JggY6lPPUSY X-Google-Smtp-Source: AOwi7QCUaZdXdrI4EupJllSd8vUWLVC2wuIbNqy9OIbpSS6KCSBj6+1bcNev0+547FX6BEFvxhsmNg== X-Received: by 10.84.217.131 with SMTP id p3mr5628638pli.126.1505999106736; Thu, 21 Sep 2017 06:05:06 -0700 (PDT) Original-Received: from [192.168.24.59] (pl27304.ag0304.nttpc.ne.jp. [128.53.17.168]) by smtp.gmail.com with ESMTPSA id l66sm2397037pfl.156.2017.09.21.06.05.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 06:05:05 -0700 (PDT) In-Reply-To: <87wp5ktkhs.fsf@mithlond.arda> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22a 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:114330 Archived-At: Belated thank you to all who replied and helped. Jean-Christophe > On Aug 31, 2017, at 13:43, Teemu Likonen 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 - .-.. // > // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///