From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adam Funk Newsgroups: gmane.emacs.help Subject: Re: How to pipe text or load a file directly into mail-mode? Date: Wed, 3 May 2006 16:05:54 +0100 Message-ID: References: <864q075gmf.fsf@gothmog.pc> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1146670890 26417 80.91.229.2 (3 May 2006 15:41:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 15:41:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 03 17:41:26 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbJTY-0000cA-Ma for geh-help-gnu-emacs@m.gmane.org; Wed, 03 May 2006 17:41:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbJTY-0004l1-6g for geh-help-gnu-emacs@m.gmane.org; Wed, 03 May 2006 11:41:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Followup-To: gnu.emacs.help Original-Lines: 28 Original-X-Trace: individual.net 9EJG7wCOS4/tA8eQDRgo2wVaXKtzxD26w6Y79XXeHngwOTsyBx X-Orig-Path: news.ducksburg.com!news User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Xref: shelby.stanford.edu gnu.emacs.help:139150 comp.emacs:92094 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34773 Archived-At: On 2006-05-03, Giorgos Keramidas wrote: > On Wed, 3 May 2006 12:29:03 +0100, Adam Funk wrote: >> I'd like the output of a Perl program to end up in an Emacs mail-mode >> buffer, ready to proofread, edit and then send with C-c C-c. I don't >> mind whether my program >> >> 1. pipes the output to an emacs command, or >> >> 2. saves the output in a temp file and opens it with an emacs command. I forgot to make something clear: emacs is *not* running when the Perl program starts. The Perl program generates the unedited message and then launches emacs. > One way to do this is: > > - Start composing your message > > - Then use: > > C-u M-x shell-command RET perl /foo/script.pl RET > > to run the Perl script. > > This should put the output of the script in the mail buffer, starting at > the point location. On the other hand, I'll see if I can do it this way.