* On 2008.11.27, in <[EMAIL PROTECTED]>, * "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Hello > > how can I sync the mailbox after save a message to any folder like this: > > macro s "<save-message>?" > > the above works great, but after this save mutt should sync > automatically. Like this: > > macro s "<save-message>?<sync-mailbox>"
This works for me. macro index S '<enter-command>set my_folder=`mutt-prompt "Save to folder" \\`; push <refresh><save-message>$my_folder\<enter\><sync-mailbox><enter>' Be sure to enter it in only one line. The backslashes are wacky, but so are mutt's quoting rules. This is no typo; it really does work on my system. A "mutt-prompt" script is required; see attachment. -- -D. [EMAIL PROTECTED] NSIT University of Chicago
#!/bin/sh ## ## usage: mutt-prompt "prompt text" ## ## In muttrc: ## set my_var=`mutt-prompt "Folder"` ## # save current tty state s=`stty -g` # redirect default i/o, saving current stdout in fd 5 exec 5>&1 exec >/dev/tty </dev/tty # reset tty state stty icanon sane onlcr # position cursor at bottom of screen rows=`tput lines` rows=`expr $rows - 1` tput cup $rows 0 # print prompt and read response printf "${1}: " read answer # return response to mutt echo "$answer" >&5 # reset tty state stty "$s"