On 4/27/2011 10:28 PM, Robert Adesam wrote:
Hi all,
I am using VM 8.1.1 and Orgmode 7.01. I would like to write a custom
trigger when saving a message in VM, looking around I could not find a
vm-save-message-hook or similar. So would I have redefine the
vm-save-message function all together? Any hints?
I have now added a variable called `vm-save-message-hook' in the
development version on Launchpad. If you have never used Launchpad
before, please see the README file in the VM directory.
The variable stores hook functions that take one argument, the folder
being saved to. (My memory is that Emacs Lisp didn't originally have
hook functions taking arguments, but it does now. Good for us.)
I am curious how you are going to use this hook. Will you search
through all the Org files to see which ones reference the saved message?
Or, do you store links from VM folders to the Org files that reference
them? (Well, I guess, if you do then you will have the opposite problem
of updating VM folders when Org files move!)
A better idea in the long run might be to use an index like mairix,
which keep track of where the messages have moved. I recall that
somebody on the Org list mentioned having used it.
Cheers,
Uday