<<< Date Index >>>     <<< Thread Index >>>

Re: save-message to ? and then sync the folder



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, November 27 at 02:20 PM, quoth trance202@xxxxxx:
>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>"

Well, the trick here is that you're giving mutt a bunch of things to 
do all at once, as others on this list have suggested. HOWEVER, I 
think this can be done if you're especially clever.

The '<save-message>?' part of the macro puts you into the browser. To 
then get mutt to do something as you *exit* the browser (i.e. after 
you've selected an entry), you'd need to tuck your desired behavior 
into the methods of exiting from the browser. For example:

     macro index s "<enter-command> macro browser \\<return\\>
     '<select-entry><sync-mailbox>'<enter><save-message>?"

It would be even cooler if you could have the secondary macro clean up 
after itself:

     macro index s "<enter-command> macro browser \\<return\\>
     '<enter-command>bind browser
     return<enter><select-entry><sync-mailbox>'<enter><save-message>?"

... but there seems to be some problem with the handling of <enter> in 
the rebinding part that I can't quite figure out.

~Kyle
- -- 
Look, I can surely say by now that I've got the antibodies to 
communism inside me. But when I think of consumer society, with all 
its tragedies, I wonder which of the two systems is better.
                                             -- Pope John Paul II, 1979
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkkz//EACgkQBkIOoMqOI14IBACfcx9aKGaIIgXGXKFLVxJ/uYCu
478AnRJNnUPwqMj4H8XIKyUjNIkN3ceP
=ltLX
-----END PGP SIGNATURE-----