[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: |
Adam Funk |
Subject: |
Re: How to pipe text or load a file directly into mail-mode? |
Date: |
Thu, 4 May 2006 11:49:34 +0100 |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
[Adding comp.lang.perl.misc because this is now partly a Perl question
as well as an Emacs question. I hope this doesn't offend anyone.]
On 2006-05-04, Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
> Ah! This is a great idea. You don't even have to use a special
> extension for this. Emacs parses command-line arguments in order,
> so you can use:
>
> system("emacs /tmp/xxxxxx -f mail-mode");
>
> to bring up Emacs, open `/tmp/xxxxxx' and then run `mail-mode' :)
Doh! It's so easy to forget emacs's command-line processing.
Now I know why
$ emacs -f mail-mode foo.mail
didn't seem to do anything!
I think I'm on the right track now, 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. If I add the --batch option to the emacs command,
emacs runs and quits (it doesn't come up interactively), so that's not
the solution.
- How to pipe text or load a file directly into mail-mode?, Adam Funk, 2006/05/03
- Re: How to pipe text or load a file directly into mail-mode?, Ralf Fassel, 2006/05/03
- Re: How to pipe text or load a file directly into mail-mode?, Giorgos Keramidas, 2006/05/04
- Re: How to pipe text or load a file directly into mail-mode?, Ralf Fassel, 2006/05/04
- Re: How to pipe text or load a file directly into mail-mode?, Adam Funk, 2006/05/04
- Re: How to pipe text or load a file directly into mail-mode?, Giorgos Keramidas, 2006/05/04
- Re: How to pipe text or load a file directly into mail-mode?, Adam Funk, 2006/05/05
- Re: How to pipe text or load a file directly into mail-mode?, Giorgos Keramidas, 2006/05/05
- Re: How to pipe text or load a file directly into mail-mode?, Reiner Steib, 2006/05/05
- Re: How to pipe text or load a file directly into mail-mode?, Adam Funk, 2006/05/05