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: Giorgos Keramidas
Subject: Re: How to pipe text or load a file directly into mail-mode?
Date: Thu, 04 May 2006 07:24:07 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix)

On Wed, 03 May 2006 22:35:03 +0200, Ralf Fassel <address@hidden> wrote:
> * Adam Funk <address@hidden>
> | 2. saves the output in a temp file and opens it with an emacs
> |    command.
>
> If you use some well-known extension like ".perl-mail", you
> could configure your emacs to load those extensions as
> mail-mode files:
>
> Add
>
>   (setq auto-mode-alist
>         (cons '("\\.perl-mail\\'" . mail-mode)
>                auto-mode-alist))
>
> to your ~/.emacs.
>
> Then save the temp file to say /tmp/xxx.perl-mail and fire up
> emacs on that file via perls system()
>
>    system("emacs /tmp/xxx.perl-mail");

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' :)



reply via email to

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