From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Paul Lalli" Newsgroups: gmane.emacs.help Subject: Re: How to pipe text or load a file directly into mail-mode? Date: 4 May 2006 10:13:41 -0700 Organization: http://groups.google.com Message-ID: <1146762821.191268.297460@v46g2000cwv.googlegroups.com> References: <86vesme7tk.fsf@gothmog.pc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1146764471 4075 80.91.229.2 (4 May 2006 17:41:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 17:41:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 04 19:41:09 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 1Fbhox-0007Gi-GG for geh-help-gnu-emacs@m.gmane.org; Thu, 04 May 2006 19:40:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fbhow-0003pe-QM for geh-help-gnu-emacs@m.gmane.org; Thu, 04 May 2006 13:40:58 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.berkeley.edu!ucberkeley!news.glorb.com!postnews.google.com!v46g2000cwv.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.perl.misc,comp.emacs Original-Lines: 20 Original-NNTP-Posting-Host: 204.97.183.31 Original-X-Trace: posting.google.com 1146762829 1179 127.0.0.1 (4 May 2006 17:13:49 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 4 May 2006 17:13:49 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 mndnetcachea (NetCache NetApp/6.0.2) Complaints-To: groups-abuse@google.com Injection-Info: v46g2000cwv.googlegroups.com; posting-host=204.97.183.31; posting-account=p3DCbw0AAAAc32agNMy1mXKInuw5KHP_ Original-Xref: shelby.stanford.edu gnu.emacs.help:139200 comp.lang.perl.misc:582264 comp.emacs:92101 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:34823 Archived-At: Adam Funk wrote: > my $status = system('emacs', '-nw', $temp_file, '-f mail-mode'); > > Emacs produces this error: > > standard input is not a tty I have no idea what that error message means as far as emacs is concerned, but your Perl system() command is wrong. That command is calling the executable "emacs" with three arguments: '-nw', $temp_file, and '-f mail-mode'. That last one is the problem. This is no different than if you had called emacs on the command line, surrounding '-f mail-mode' in quotes. You need -f and mail-mode to be two separate arguments, not one argument: my $status = system('emacs', '-nw', $temp_file, '-f', 'mail-mode'); Paul Lalli