Discussion:
[VM] Request for howto select email easily
John Stoffel
2014-09-18 15:21:32 UTC
Permalink
Guys,

I've been a long time user of VM, and I use it to read lots of email,
including a couple of very high volume mailing lists. I'd like to
usually just delete most of the email, but then go back and un-delete
any emails and threads where certain people have written. My way to
following only the generally good discussions.

So how would I go about doing this? I guess I could setup a Macro in
Emacs itself to go about doing this, but that seems clunky and error
prone.

The basic idea would be:

1. Delete all new emails.
2. Mark all emails from any of the email addresses listed in ????
3. Mark all threads those emails from 2 are in. Or mark all emails
with the same subject as those found in 2.
4. Un-delete all those emails.
5. Clear the marks.


Any hints? My elisp-fu is horribly non-existent. Wrapping my brain
around lisp is just never going to happen. Sorry. :-)

John
Uday Reddy
2014-09-18 15:57:20 UTC
Permalink
Interesting application! Here are the basic ideas.
Post by John Stoffel
1. Delete all new emails.
You would need to set vm-arrived-message-hook or vm-arrived-messages-hook to
delete the new mail.
Post by John Stoffel
2. Mark all emails from any of the email addresses listed in ????
3. Mark all threads those emails from 2 are in. Or mark all emails
with the same subject as those found in 2.
You would need to define a virtual folder for the kind of messages you want
to read. See in particular, the `thread' virtual-selector operator.

vm-mark-messages-by-virtual-folder should allow you to mark these messages.
Post by John Stoffel
4. Un-delete all those emails.
M N u does it.
Post by John Stoffel
5. Clear the marks.
M u does it.

(All this applies to VM 8.2.0b. Can't say if it works in older versions.)

Cheers,
Uday
John Stoffel
2014-09-18 21:08:48 UTC
Permalink
Thanks for the pointers Uday, this is a good start. Now how would I
bind this all to a single key-stroke on my VM instance? I assume I
would need to defun a new function to step through and do all the
steps you list below, since I really don't want to have to do this all
by hand each time. And I'd love to be easily able to add/delete email
addresses from the list of email addresses to watch for.


Uday> Interesting application! Here are the basic ideas.
Post by John Stoffel
1. Delete all new emails.
Uday> You would need to set vm-arrived-message-hook or vm-arrived-messages-hook to
Uday> delete the new mail.
Post by John Stoffel
2. Mark all emails from any of the email addresses listed in ????
3. Mark all threads those emails from 2 are in. Or mark all emails
with the same subject as those found in 2.
Uday> You would need to define a virtual folder for the kind of messages you want
Uday> to read. See in particular, the `thread' virtual-selector operator.

Uday> vm-mark-messages-by-virtual-folder should allow you to mark these messages.
Post by John Stoffel
4. Un-delete all those emails.
Uday> M N u does it.
Post by John Stoffel
5. Clear the marks.
Uday> M u does it.

Uday> (All this applies to VM 8.2.0b. Can't say if it works in older versions.)

Uday> Cheers,
Uday> Uday
Uday Reddy
2014-09-18 23:09:25 UTC
Permalink
Post by John Stoffel
Thanks for the pointers Uday, this is a good start. Now how would I
bind this all to a single key-stroke on my VM instance? I assume I
would need to defun a new function to step through and do all the
steps you list below, since I really don't want to have to do this all
by hand each time. And I'd love to be easily able to add/delete email
addresses from the list of email addresses to watch for.
Better do it manually first.

Then you might considering defining a defun or a keyboard-macro. My memory
is that keyboard-macros can't deal with M N (next-command-uses-marks), but I
can't be sure.

Cheers,
Uday
John Stoffel
2014-09-19 20:32:47 UTC
Permalink
Post by John Stoffel
Thanks for the pointers Uday, this is a good start. Now how would I
bind this all to a single key-stroke on my VM instance? I assume I
would need to defun a new function to step through and do all the
steps you list below, since I really don't want to have to do this all
by hand each time. And I'd love to be easily able to add/delete email
addresses from the list of email addresses to watch for.
Uday> Better do it manually first.

Tried to... didn't get so far. I need to learn how to put a hook in
place to select all new messages, delete them, then go back and find
the ones I want to keep and un-delete them.

Uday> Then you might considering defining a defun or a keyboard-macro.
Uday> My memory is that keyboard-macros can't deal with M N
Uday> (next-command-uses-marks), but I can't be sure.

Hmmm... this will complicate things. Can I save Virtual Folder
definitions? Can I edit them over time? Can I change multiple
selections into one virtual folder?

It may be that using procmail to filter for me would be easier,
again because my elisp skills are non-existant. I know what I want, I
just can't begin to even think how to write it.

John

Continue reading on narkive:
Loading...