Hello Jamie > Hello. I have been working on trying to achieve a sort of pseudo > multi-threading in mutt. I have managed to make some progress, but it's been > trickier than I would have liked and I was hoping maybe others out there could > help or offer suggestions. Maybe the attached script is of any help. It is intended to be used together with screen (but it might be possible to change this script to use something other? :)) Just add the following line to your .muttrc and everythings should work as expected. `/path/to/mutt_compose.sh config` btw: I think I will put this script on my homepage, if there is interest. Might take some time though. :) Greetings #!/bin/sh # Based on a cool script found on the mutt-Mailinglist. Unfortunately I don't # know who sent the original script. # This script opens up a new screen-window to edit and sent a mail via mutt. So # you still are able to go back to your original mutt and read some other mails # while you edit a new mail. # Gerhard Siegesmund <jerri@xxxxxxxx> case $1 in # Output the configuration. You can use this script in the # mutt-configuration-files like this: # `compose.sh config` config) echo -n "set editor=\"vim -c 'set bs=1 tw=72 comments=nb:>' +/^To: +'silent! s/ignore@me//'\";" echo -n "macro index m \"<shell-escape>$0 newmail<enter>\";" echo -n "macro pager m \"<shell-escape>$0 newmail<enter>\";" echo -n "macro index r \"<pipe-message>$0 reply<enter>\";" echo -n "macro pager r \"<pipe-message>$0 reply<enter>\";" echo -n "macro index g \"<pipe-message>$0 group-reply<enter>\";" echo -n "macro pager g \"<pipe-message>$0 group-reply<enter>\";" echo -n "macro compose q \"<exit>\";" echo "" exit 0 ;; # This is the action to create a new mail. newmail) screen -X screen -t "compose" sh -c "mutt 'ignore@me'; screen -X kill" exit 0 ;; # And here are all other cases. Normally this would be reply or groupreply. *) BOX=/tmp/comp_mbox-${USER}-$$-$RANDOM { date "+From root %a %b %d %H:%M:%S %Y"; cat; } > "$BOX" screen -X screen -t "compose" sh -c "mutt -f \"$BOX\" -e \"macro compose y '<send-message><exit>'\" -e \"exec '$1'\"; rm -f \"$BOX\"; screen -X kill" ;; esac -- cu --== Jerri ==-- Homepage: http://www.jerri.de/ ICQ: 54160208 Public PGP Key: http://www.jerri.de/jerris_public_key.asc
Attachment:
mutt-compose.sh
Description: Bourne shell script
Attachment:
signature.asc
Description: Digital signature