On Thu, Jun 27, 2002 at 11:39:01AM +0200, Cedric Duval wrote: > Vikram Goyal wrote: > > How can I prevent the action of saving messages if their are no tagged > > messages according to the pattern. > > Nicolas has a patch for this. > > http://www.rachinsky.de/nicolas/mutt.html > Thanks for the info. I applied it to 1.4i and its working properly.
The patch can be applied to 1.4i also. I think this info should be pasted along with the patch on the web page for people upgrading to 1.4i. Also I think that it should be the default behaviour of tag-prefix i.e if the tag-pattern isn't there tag-prefix should abort also end_cond should be named tag-prefix-end if tag-prefix is made to act this way. Here are the folder-hooks which I am using now. # This hook will save deleted messages from any folder not Trash to # Trash and remove them from the corresponding folder folder-hook !Trash 'push "<tag-pattern>~D<enter><enter-command>unset confirmcreate<enter><tag-prefix-cond><save-message>=Trash<enter><enter-command>unset maildir_trash<enter><sync-mailbox><enter-command>set maildir_trash<enter><end_cond><enter-command>set maildir_trash<enter><enter-command>set confirmcreate<enter>"' # A way to automatically delete email from Trash folder. # First unset maildir_trash. # Undelete and set read all the messages moved to Trash/ which are more # than 25 days old and are not flagged. Now delete messages which are # more than a month old and are not new and not flagged. sync mailbox . # reset maildir_trash. folder-hook Trash 'push "<enter-command>unset maildir_trash<enter><tag-pattern>~D<enter><tag-prefix-cond><clear-flag>D<end_cond><tag-pattern>~N~r>25d!~F<enter><tag-prefix-cond><clear-flag>N<end_cond><delete-pattern>~r>1m!(~F|~N)<enter><sync-mailbox><enter-command>set maildir_trash<enter>"' > -- > Cedric vikram... -- |||||||| |||||||| ^^'''''^^||root||^^^'''''''^^ // \\ )) //(( \\// \\ // /\\ || \\ || / )) (( \\ Thus My Computer Chittered : ~~~~~~~~~~~~~~~~~~~~~~~~~~ Many are called, few volunteer. * ~|~ =