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: Tue, 9 May 2006 12:00:14 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1147174890 25661 80.91.229.2 (9 May 2006 11:41:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 May 2006 11:41:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 09 13:41:28 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 1FdQag-000640-6X for geh-help-gnu-emacs@m.gmane.org; Tue, 09 May 2006 13:41:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdQaf-0004ad-Nl for geh-help-gnu-emacs@m.gmane.org; Tue, 09 May 2006 07:41:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 21 Original-X-Trace: individual.net yC/w0nSSRjF69Qat1oHU6A3qZ8EsOwxh+gsXnIVWsJwFdelyk3 X-Orig-Path: news.ducksburg.com!news User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Xref: shelby.stanford.edu comp.emacs:92130 gnu.emacs.help:139305 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:34928 Archived-At: I now have most of this working the way I want, except for launching emacs in mail-mode. The Perl program saves its data in a file named $edit_file (which ends with the suffix ".mail") and calls $status = system('emacs', '-nw', $edit_file, '-f', ' mail-mode'); which is equivalent to emacs -nw $FILENAME -f mail-mode on the command-line. This launches Emacs with the correct file open, but it says "Mail (Fundamental)" on the status line and "Symbol's function definition is void: \ mail-mode" in the minibuffer. If I then hit M-x mail-mode, it then says "Mail (Mail MC-w Fill)" on the status line and "Loading sendmail...done" in the minibuffer, and everything works correctly. What else do I need to do to get mail-mode to come up initially?