On 2001.07.29, in <[EMAIL PROTECTED]>,
        "Simon Collyer" <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> I'm trying to do something not so simple here it appears.
> 
> What I am trying to do is load the external editor
> in a new window, eg trying to be able to reply to multiple
> seperate messages while composing and reading other mail.

Launching your editor so that it detaches from mutt isn't the goal --
if you do that, mutt will just think that you've made no changes to the
file, and abort the reply.

The fundamental problem is that mutt cannot react to two message
operation pipelines at the same time. In short, it's not possible to do
this using only one instance of mutt.

You might be able to do sneaky things like binding a key to launch
mutt on the message and push a reply operation into the input queue...
something like this:

macro index \Cr "<copy-message>/tmp/mutt-reply<enter><shell-escape>xterm -e mutt -f 
/tmp/mutt-reply -e 'push <reply><shell-escape>rm /tmp/mutt-reply\<enter><exit>' 
&<enter>" "Reply asynchronously in a new xterm"

...but that's just an idea. I've never tested it, and I cannot test
it right now. It probably doesn't work without some significant
alterations, and what's more, it can only run one asynch reply at a time
since there's no means of sharing a unique file name between mutt and
the shell.

Perhaps something cleverer could be done by setting $editor to a shell
sequence to save the reply template (with edit_headers) to a file and
run mutt -H (draft mode) on it. In fact, I think I or someone else might
have posted such a value for $editor in the past. Check the archives.

It might be something like:

set editor="cat >/tmp/mutt.$$; xterm -e sh -c 'mutt -H /tmp/mutt.'$$' -e push 
\'<enter-command>set editor=\"vi\"<enter>\'; rm -f /tmp/mutt.$$' &"

(Or it might not.)

-- 
 -D.    [EMAIL PROTECTED]        NSIT    University of Chicago

Reply via email to