Re: [VM] Make vm-save-and-expunge-folder use a trash can?
Thank you very much for this suggestion. This solution is almost (but not quite) complete because you can't delete anything in the trash folder. :-) Each time you press D in the trash, another copy of the message gets appended. How do you obtain the path to the current folder, so I can add if/then/else logic to the function, e.g., if not viewing the trash folder then bind D to vm-save-message-to-trash else let D remain as an ordinary delete operation end if Thanks! Dan On June 6, 2014, Uday Reddy wrote: Rebind the delete key (`d') to the `vm-save-message-to-trash' function defined here: http://comments.gmane.org/gmane.emacs.viewmail/106 Cheers, Uday Daniel Barrett writes: Hi - I just joined the viewmail-info list today. Been using VM for maybe 20 years...? Anyway, I have a question. The most common mistake I make with VM is hitting S (vm-save-and-expunge-folder) too soon, deleting a message that I didn't mean to delete. Is there some way to make vm-save-and-expunge-folder move messages into a trash folder, rather than permanently deleting them, so I can undo my mistake the next time it happens? It would be fine if this worked only for the inbox folder. (My other folders I can presumably retrieve from backups. Inbox changes too frequently for that.) Thanks very much. -- Dan Barrett dbarr...@blazemonger.com
Re: [VM] Make vm-save-and-expunge-folder use a trash can?
Thanks. Even so, how do you retrieve the folder path to the currently-viewed folder in VM? I'd still like to set up different logic for the trash folder, e.g., (cond ((eq (PATH-TO-CURRENT-FOLDER) (vm-trash-folder)) ... Thanks, Dan On June 11, 2014, Uday Reddy wrote: Daniel Barrett writes: Thank you very much for this suggestion. This solution is almost (but not quite) complete because you can't delete anything in the trash folder. :-) Not really. vm-delete-message and all its functionality is still there. You just lost its key binding. You can find some other key to bind it to, if it is really necessary. Cheers, Uday
Re: [VM] Make vm-save-and-expunge-folder use a trash can?
Daniel Barrett dbarrett@... writes: Anyway, I have a question. The most common mistake I make with VM is hitting S (vm-save-and-expunge-folder) too soon, deleting a message that I didn't mean to delete. Is there some way to make vm-save-and-expunge-folder move messages into a trash folder, rather than permanently deleting them, so I can undo my mistake the next time it happens? It would be fine if this worked only for the inbox folder. (My other folders I can presumably retrieve from backups. Inbox changes too frequently for that.) In such a case I on my vmCrashBoxes. From the manual: VM transfers the mail from a spool file to a folder via a temporary file known as the crash box. The variable `vm-crash-box' names the crash box file for the primary inbox. Or a crash-box name may be created from `vm-crash-box-suffix' described below. (*note Spool Files::.) VM first copies the mail to the crash box, truncates the spool file to zero messages, merges the crash box contents into the primary inbox, and then deletes the crash box. If the system or Emacs should crash in the midst of this activity, any message not present in the primary inbox will be either in the spool file or the crash box. Some messages may be duplicated but no mail will be lost. --
Re: [VM] Make vm-save-and-expunge-folder use a trash can?
Rebind the delete key (`d') to the `vm-save-message-to-trash' function defined here: http://comments.gmane.org/gmane.emacs.viewmail/106 Cheers, Uday Daniel Barrett writes: Hi - I just joined the viewmail-info list today. Been using VM for maybe 20 years...? Anyway, I have a question. The most common mistake I make with VM is hitting S (vm-save-and-expunge-folder) too soon, deleting a message that I didn't mean to delete. Is there some way to make vm-save-and-expunge-folder move messages into a trash folder, rather than permanently deleting them, so I can undo my mistake the next time it happens? It would be fine if this worked only for the inbox folder. (My other folders I can presumably retrieve from backups. Inbox changes too frequently for that.) Thanks very much. -- Dan Barrett dbarr...@blazemonger.com