On 16Apr2015 00:32, Quolick <[email protected]> wrote:
What is mutt's counterpart feature to gmail's archive? what is used here?
I don't want to delete messages, but I want to have them locally searchable, 
like gmail can do.
What is the best practice? Just to move to another folder?

That is what I do.

For each mail folder "foo" I have a mail folder "OLD/YYYY/foo", where "YYYY" is the current year. Of course you may prefer to use a single big folder for this.

I have the following hooks defined:

 fcc-hook . OLD/YYYY/foo
 save-hook . OLD/YYYY/foo

and have rebound 'd' (normally delete-message) and control-d (normally delete-thread) as follows:

 macro index,pager d "<save-message><enter><next-undeleted>" "archive message"

 macro index \D 
"<untag-pattern>~T<enter><tag-thread><tag-prefix><save-message><enter><untag-pattern>~T<enter><next-undeleted>"
 "archive thread"

 macro pager \D "<exit>\D<display-message>" "archive thread"

so that 'd' deletes the current message by saving it (using the default, which is the deleted mail folder); control-d does the same with the whole thread. The "pager" control-d macro just exits the pager and runs the "index" control-d macro.

Then all you need is a mail indexing tool. I used to use mairix, and now use notmuch. Run their indexers periodically. From cron for example. Write a tiny easy to invoke script to do your search. Or, of course, just open the deleted-mail folder and use mutt to search. With the header-cache extension active this is quite effective.

Cheers,
Cameron Simpson <[email protected]>

The peever can look at the best day in his life and sneer at it.
       - Jim Hill, JennyGfest '95

Reply via email to