Discussion:
Commands for deleted purge, move read messages
Ross Vandegrift
2008-01-25 14:48:10 UTC
Permalink
Hey everyone,

I'm looking to see if there's a mutt command I can bind to a key for the
"purge deleted messages" action and the "move read mail to $mbox"
action.

I find myself periodically quitting mutt just to clean out stuff I've
already dealt with in my spool.

Thanks,
Ross
Ray Van Dolson
2008-01-25 14:50:11 UTC
Permalink
Post by Ross Vandegrift
Hey everyone,
I'm looking to see if there's a mutt command I can bind to a key for the
"purge deleted messages" action and the "move read mail to $mbox"
action.
Try '$'

Ray
Michael Kjorling
2008-01-25 15:02:41 UTC
Permalink
Post by Ray Van Dolson
Post by Ross Vandegrift
I'm looking to see if there's a mutt command I can bind to a key for the
"purge deleted messages" action and the "move read mail to $mbox"
action.
Try '$'
That will commit the changes in the current mailbox to disk, but will
it also move read mail to $mbox?

If not, you could always try something involving 'c' followed by '^'
<enter>.
--
Michael Kjörling .. ***@kjorling.se .. http://michael.kjorling.se
* ..... No bird soars too high if he soars with his own wings ..... *
* ENCRYPTED email preferred -- OpenPGP key ID: 0x(758F8749)BDE9ADA6 *
* ASCII Ribbon Campaign: Against HTML mail, proprietary attachments *
Ross Vandegrift
2008-01-25 16:24:28 UTC
Permalink
Post by Michael Kjorling
Post by Ray Van Dolson
Post by Ross Vandegrift
I'm looking to see if there's a mutt command I can bind to a key for the
"purge deleted messages" action and the "move read mail to $mbox"
action.
Try '$'
That will commit the changes in the current mailbox to disk, but will
it also move read mail to $mbox?
If not, you could always try something involving 'c' followed by '^'
<enter>.
This is what I've cooked up so far:

macro index $ <sync-mailbox>c!<enter>


And that seems to work pretty well with "set move = yes"

Ross
Michael Kjorling
2008-01-25 16:52:48 UTC
Permalink
Post by Ross Vandegrift
macro index $ <sync-mailbox>c!<enter>
You might want to try something like this:

macro index $ '<enter-command>set delete=yes move=yes<enter><sync-mailbox><change-folder>^<enter><enter-command>set move=ask-yes delete=ask-yes<enter>'

It all goes on one line in your .muttrc (in case it wraps) and adjust
as desired at the end.

The "^" means "current mailbox", so if you use this macro in a mailbox
other than your inbox, you don't get thrown out of it.

The one downside of this that I can think of is that it repositions
the current message indicator as the mailbox is reloaded, but that
seems like a relatively small trade-off.
--
Michael Kjörling .. ***@kjorling.se .. http://michael.kjorling.se
* ..... No bird soars too high if he soars with his own wings ..... *
* ENCRYPTED email preferred -- OpenPGP key ID: 0x(758F8749)BDE9ADA6 *
* ASCII Ribbon Campaign: Against HTML mail, proprietary attachments *
Ross Vandegrift
2008-01-26 16:37:37 UTC
Permalink
Post by Michael Kjorling
Post by Ross Vandegrift
macro index $ <sync-mailbox>c!<enter>
macro index $ '<enter-command>set delete=yes
move=yes<enter><sync-mailbox><change-folder>^<enter><enter-command>set
move=ask-yes delete=ask-yes<enter>'
I ended up with something very close:
macro index $ ':set move = yes<enter>:set delete = yes<enter><sync-mailbox>c!<enter>:set move = ask-yes<enter>:set delete = ask-yes<enter>'

But I like your idea of ^ instead of ! so I think I'll use that instead.

Thanks for the help,

Ross

Ross Vandegrift
2008-01-25 15:04:07 UTC
Permalink
Post by Ray Van Dolson
Post by Ross Vandegrift
Hey everyone,
I'm looking to see if there's a mutt command I can bind to a key for the
"purge deleted messages" action and the "move read mail to $mbox"
action.
Try '$'
Hmmm - works for purging deleted, but not for filing read messages.

Better than nothing!

Ross
Loading...