help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pipe text or load a file directly into mail-mode?


From: Ralf Fassel
Subject: Re: How to pipe text or load a file directly into mail-mode?
Date: Thu, 04 May 2006 18:43:05 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chestnut, linux)

* Adam Funk <a24061@yahoo.com>
| ... but I'm having problems with the fact that the Perl program
| reads STDIN, processes it and stores the results in a temp file.
| When the Perl program gets to this line:
| 
|    my $status = system('emacs', '-nw', $temp_file, '-f mail-mode');
| 
| Emacs produces this error:
| 
|    standard input is not a tty
| 
| and doesn't run.

Well, via '-nw' you tell emacs to use the tty as input, but the tty is
already used by perl.  Do you really need '-nw'?  If you really need
-nw, you could try something along the lines of

  system("emacs -nw $tempfile -f mail-mode </dev/tty");

I.e. use shell input redirection to the controlling tty.  I have no
idea how robust that would be, and would rather get rid of the '-nw'.

R'


reply via email to

[Prev in Thread] Current Thread [Next in Thread]