On Sat, Jan 03, 2009 at 12:07:40AM -0500, Chris Jones wrote:
Firing up an xterm (or creating a new gnu/screen window) .. firing up another instance of mutt .. drilling down to the particular message I need .. having gnu/screen do a screen split .. bringing up the other instance of mutt in said split window .. and what..? repeat the process if I happen to need to refer to a second message?
That's laborious if you do it manually, but computers are good at grunt work, and mutt is good at giving you hooks to automate things.
This doesn't do split screens, because I don't like them, but here's my solution.
macro index <Esc>s "<sync-mailbox>!screen -X screen mutt -f =sent\n" macro index F '<sync-mailbox><enter-command>set my_folder=`mutt-prompt "Change to folder" \\`; push "!screen -X screen mutt -f $my_folder\<enter\>"<enter>'I've got a couple more of the first variety to speed access to mailboxes I open all the time, and the second variety is so that I don't have to have a key for each box. It uses the mutt-prompt shell script, which has been posted recently, but I'll be happy to send it to you.
I don't do this often, but you could use the ^ special variable (which holds the current folder name) if you commonly accessed the same folder. Untested attempt:
macro index <Esc>c "<sync-mailbox>!screen -X screen mutt -f ^\n" Explanation:"<sync-mailbox>" syncs unsaved changes to the current mailbox (will delete messages marked for deletion, make sure that's what you want, leave it out if not).
"!screen -X" creates a shell, and sends the following command to the currently running screen session.
"screen mutt" opens a new screen window and runs mutt instead of a shell.
"-f =mailbox" opens mutt with a given mailbox instead of the inbox. Ed
Attachment:
signature.txt
Description: Digital signature