Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [VM] Mainly: How do you use virtual folders every day? and other questions

8 views
Skip to first unread message

Uday Reddy

unread,
Jan 18, 2013, 4:46:59 PM1/18/13
to Stefan.Gr...@stmail.uni-bayreuth.de, viewma...@nongnu.org
Stefan.Gr...@stmail.uni-bayreuth.de writes:

> Uday Reddy wrote some time ago
> (http://lists.nongnu.org/archive/html/viewmail-info/2012-10/msg00025.html) :
> > But I still wanted the subject tags retained in the INBOX
> > folders, because the mail comes from a variety of sources and I want to be
> > able to quickly eyeball it for important stuff. However, once I have filed
> > away the mail in archival folders, I wanted the subject tags to disappear.
>
> My question is: How, in more detail, do you use vm, dealing with lots of
> email traffic, lists, newsletters and private mails?

I discovered through experience that I am the kind of guy that only looks at
one INBOX regularly. So, sorting incoming mail into separate folders
doesn't help me. I never look at the stuff that has been sorted away. So,
I stick to a single INBOX.

(That is not entirely true. I have a separate INBOX on my home account, one
on gmail, and one for my vmrocks account etc. But I look at those less
frequently, and things that go there are rarely time-critical. This mailing
list, for instance, goes into my "standard" INBOX.)

My normal mode of reading email is:

- if something can be taken care of immediately, do it, and archive it.
(What I mean by "archive" is saving it in a purpose-built folder, perhaps
the folder for a course I am teaching, a research project I am working on,
discussions with a particular colleague etc.)

- if it cannot be taken care of immediately and needs to stay around in the
INBOX, leave it there. Typically, there will be some toing-and-froing and
follow-ups to such messages. When it looks like that thread has reached its
end, I can archive it.

- if it is purely an informational message, I either delete it after
reading, or let it stay if it has some longer life span. (For instance, an
announcement for a meeting or a seminar that might happen in a few
days/weeks time.)

I do the regular archiving using `auto-folder-alist'. This is the No. 1
most useful feature of VM for me, which is not available in most other mail
clients. I can define the auto-folder-alist using clues from the names of
the senders, recipients and subject headings. I could perhaps use
`vm-virtual-auto-folder-alist' as well. But I haven't gotten around to
converting my old `auto-folder-alist'.

The overall principle is that my valuable mail is in the archival folders,
where it is easy to find things. The INBOX is just a waystation in getting
there.

For the messages that are left around in the INBOX, my method involves
periodically cleaning it, by:

- archiving messages that need to be archived,
- deleting messages that are of no use any more, and
- saving the rest in a compressed version of the INBOX in quarterly chunks,
e.g., INBOX.2012-1.gz, INBOX.2012-2.gz etc.

Unfortunately, I haven't been able to do this cleaning for several years
because the volume of email has grown far too much. So, currently, I am
developing virtual folder techniques to help me do the cleaning. For
instance, I now have a "softspam" virtual folder that tries to identify all
the messages that can be deleted. Some other virtual folders group messages
related to some particular topic so that I can process them more easily
during the "cleaning" process. But I don't have this fully developed yet.

> For simplicity, let's assume I only have one inbox, say a POP box. Now I
> defined some virtual folders which can sort out certain mailing lists or
> other regularly arriving messages. But physically they remain in the inbox
> and in this inbox I still have a mixture of private mails and others. Do
> you have a certain filter for private mails?

Yes, it might be possible to define virtual folders that identify all the
private mails. It takes time to develop these virtual folders, and they are
rarely fool-proof because the world keeps changing and you have to keep
adding rules to cover it.

> Or do you use vm-virtual-auto-archive?

I personally never use auto-archive. Since the mail I want archived is the
"valuable" mail, it doesn't serve my purpose to archive everything, which is
what auto-archive does.

The auto-folder-alist variables work for manual archiving (i.e., saving) as
well as for auto-achirving.

Cheers,
Uday

Uday Reddy

unread,
Jan 19, 2013, 5:57:50 AM1/19/13
to Stefan.Gr...@stmail.uni-bayreuth.de, viewma...@nongnu.org
Stefan.Gr...@stmail.uni-bayreuth.de writes:

> Evolution did not recover using the "backup archive" I made before because
> of version conflicts etc. So I hope to migrate my emails more easily
> whenever I change to a fresh installation.

Yeah, it is surprising how many mail clients are unable to deal with
reinstalls and upgrades. I used to use Outlook Express once upon a time
(mainly to connect to hotmail), and it used to corrupt its own database
every time it had to be reinstalled.

> (i) I found a html version of the vm.info document in my /usr/share/doc/vm
> and found it very useful, especially to get you going, because there are
> people like me who have never distinguished between spool files and
> folders before... It explains this quite well I think, in contrast to the
> VMQuickstart page on the Emacswiki.

So you prefer html to info? It is nice of your Linux distribution to create
the html version. It is not part of the offical build. Which Linux
distribution do you use?

Ideally, we should have the VM manual in HTML and PDF on the web. But
Savannah hosting site is a bit too complicated for me to figure out how to
upload things. I could use some help in uploading releases to Savannah.
Any volunteers?

Cheers,
Uday

Johan Vromans

unread,
Jan 19, 2013, 6:42:33 AM1/19/13
to viewma...@nongnu.org
Uday Reddy <usr.vm...@gmail.com> writes:

> Stefan.Gr...@stmail.uni-bayreuth.de writes:
>
> I discovered through experience that I am the kind of guy that only looks at
> one INBOX regularly. So, sorting incoming mail into separate folders
> doesn't help me. I never look at the stuff that has been sorted away. So,
> I stick to a single INBOX.

More or less the same here...

I have a mail filter (sort of procmail, but written in Perl) that
distributes mails from mailing lists into local newsgroups (nnml) that I
read with Gnus. All other mail arrives in my INBOX. I also keep BCCs of
every mail I send out in my INBOX, so I have a complete overview of
discussions.

Sometimes I archive mail that has been dealt with, e.g. business mail,
but most often I do not. Every month, I move the INBOX to INBOX.YYYYMM,
and the INBOX I work with is a virtual folder consisting of the current
INBOX, and the old INBOXes of the past three months. This way I keep the
mails that I have online limited to 1000-2000.

I index all my mailboxes with mairix so I can quickly retrieve relevant
messages.

-- Johan

Uday Reddy

unread,
Jan 19, 2013, 1:58:21 PM1/19/13
to Stefan.Gr...@stmail.uni-bayreuth.de, viewma...@nongnu.org
Stefan.Gr...@stmail.uni-bayreuth.de writes:

> I defined `vm-virtual-auto-folder-alist' as follows (there are other
> virtual folders too)
>
> (setq vm-virtual-folder-alist
> '(
> ("veryold"
> (("inbox" "gmail" "stmail")
> (older-than 150)
> ))))
>
> (setq vm-virtual-auto-folder-alist
> '(
> ("veryold" . "~/.email/archiv")
> ))
>
> and I can visit these with 'V V'. But when I invoke `M-x
> vm-virtual-auto-archive-messages' i only get the Messages:

The vm-virtual-auto-archive-messages function is in the Rob Fenk's
vm-avirtual package. This package is not properly documented and generally
not of the same quality as VM proper. This function will also tend to be
slow because it checks each message for membership in every virtual folder.
As you keep defining more and more virtual folders, it will run slower and
slower.

So, you might consider more efficient ways of doing things. For instance,
you can visit the virtual folder "veryold" and save all its messages
somewhere. vm-avirtual also has a function
`vm-virtual-make-folder-persistent' which might help for this.

> ---- *Messages* ----------------
> Auto archive the entire folder? (y or n)
> Archiving...
> No messages were archived
> -----*Messages end*---------------

Remember that the auto-archive-messages functions only work on the current
folder. So, in your example, the current folder would have had to be one of
"inbox", 'gmail" and "stmail", and that folder would have had to have
messages older than 150 days. Did it?

> (iii) I could not make it to define a virtual folder on an IMAP folder. Is
> there somebody here who does use this feature? (Just to know, wether its
> me or VM...) Everything I tried produced only empty virtual folders.

Yes, virtual folders work for IMAP folders. You have to specify them the
IMAP folders using the full "maildrop" specification.

> (iv) My vm-spool-files list has several elements like this:
>
> ("~/.email/stmail" "pop-ssl:mail.host.de:995:pass:my_username:*" "~/.email/stmail.crash")
>
> The issue is: if I insert the password instead of *, then vm does not find
> any new messages, even if there are several (according to the webinterface
> of my university). Then if I use * again, it fetches them. This might be a
> bug?

It could be a bug, but it is a bad idea to put passwords into cofiguration
files. VM will ask you for a password and remember it. That should be good
enough.

> > There isn't anything built-in to do that. But it is easy enough to define a
> > function for yourself, something along the lines of:
>
> > (defun switch ()
> > (interactive)
> > (call-interactively 'vm-quit t)
> > (call-interactively 'vm-visit-imap-folder t))
>
> Thank you Uday, I use your snippet since. However, something I would find
> even a bit more useful would be: I would like 'q' (vm-quit) to go to an
> open folder, if there is one.

Replace the last line by:

(call-interactively 'vm-switch-to-folder))

I will beef up the vm-switch-to-folder function to be a bit more clever.

Cheers,
Uday

Stefan.Gr...@stmail.uni-bayreuth.de

unread,
Jan 20, 2013, 7:42:16 AM1/20/13
to Uday Reddy, viewma...@nongnu.org, Stefan.Gr...@stmail.uni-bayreuth.de

> > (i) I found a html version of the vm.info document in my /usr/share/doc/vm
> > and found it very useful
> So you prefer html to info? It is nice of your Linux distribution to create
> the html version. It is not part of the offical build. Which Linux
> distribution do you use?

I used the package in the Debian squeeze repository, see:
http://packages.debian.org/squeeze/all/vm/filelist

These days I look much more often directly into info. But I still like to fill the bookmarks toolbar of the browser with often used documentation pages, preferably somewhere in a local folder so that I can read them e.g. in a train.

> Ideally, we should have the VM manual in HTML and PDF on the web. But
> Savannah hosting site is a bit too complicated for me to figure out how to
> upload things. I could use some help in uploading releases to Savannah.
> Any volunteers?
I can try to help you with that, if it's welcome.

Stefan

Stefan.Gr...@stmail.uni-bayreuth.de

unread,
Jan 24, 2013, 4:50:19 PM1/24/13
to Johan Vromans, viewma...@nongnu.org

Thank you both a lot for your kind and detailed explanations! This way me and others can reuse some of your experiences.

I have tried out sorting away messages with filter like the following and look at mail from several folders altogether with a virtual folder called "inbox". In order to receive new mail while visiting this virtual folder I type 'g' and vm asks me for all the passwords and retrieves mail, which is okay for me.

Johan Vromans schrieb am Saturday, January 19:
> Sometimes I archive mail that has been dealt with, e.g. business mail,
> but most often I do not. Every month, I move the INBOX to INBOX.YYYYMM,
> and the INBOX I work with is a virtual folder consisting of the current
> INBOX, and the old INBOXes of the past three months. This way I keep the
> mails that I have online limited to 1000-2000.

I also like your archiving method, Johan. Have not yet configured it here, though.

have a nice evening everyone
Stefan


;; Examples:
(setq vm-auto-folder-alist
'(
("^List-ID: " ("viewmail-info" . "vmlist"))
("^\\(From\\|Sender\\): " ("\\(foo\\|bar\\|another\\)" . "newsletters"))

)
)

(setq vm-virtual-folder-alist
'(
("inbox"
(("web" "gmail" "stmail" "opera")
(any)
)
)
)
)

Johan Vromans

unread,
Jan 25, 2013, 2:25:34 AM1/25/13
to Stefan.Gr...@stmail.uni-bayreuth.de, viewma...@nongnu.org
Stefan.Gr...@stmail.uni-bayreuth.de writes:

> I also like your archiving method, Johan. Have not yet configured it
> here, though.

I'm not claiming this is the best piece of lisp I ever wrote, but it
gets the job done ;)

(setq boxlist
(sort
(directory-files jv-mail-tree t
"^INBOX.[12][0-9][0-9][0-9][0-9][0-9]$")
'(lambda (a b) (string< b a))))
(setq boxes (list (nth 0 boxlist) (nth 1 boxlist) (nth 2 boxlist)))
(setq vm-virtual-folder-alist
(append
(list (list "INBOX"
(list (append (reverse boxes)
(list vm-primary-inbox))
'(any))))))


-- Johan

Uday S. Reddy

unread,
Jan 25, 2013, 2:44:31 AM1/25/13
to Johan Vromans, viewma...@nongnu.org
On 1/19/2013 11:42 AM, Johan Vromans wrote:

> Sometimes I archive mail that has been dealt with, e.g. business mail,
> but most often I do not. Every month, I move the INBOX to INBOX.YYYYMM,
> and the INBOX I work with is a virtual folder consisting of the current
> INBOX, and the old INBOXes of the past three months. This way I keep the
> mails that I have online limited to 1000-2000.

That is nice. So you work with virtual folders on a daily basis? I am
glad because that gives me a thorough testing of virtual folders.

What techniques do you use to file stuff in INBOX.YYYYMM?

Cheers,
Uday


Julian Bradfield

unread,
Jan 25, 2013, 3:27:13 AM1/25/13
to viewma...@nongnu.org
On 2013-01-25, Uday S. Reddy <usr.vm...@gmail.com> wrote:
> On 1/19/2013 11:42 AM, Johan Vromans wrote:
>> Sometimes I archive mail that has been dealt with, e.g. business mail,
>> but most often I do not. Every month, I move the INBOX to INBOX.YYYYMM,
>> and the INBOX I work with is a virtual folder consisting of the current
>> INBOX, and the old INBOXes of the past three months. This way I keep the
>> mails that I have online limited to 1000-2000.
>
> That is nice. So you work with virtual folders on a daily basis? I am
> glad because that gives me a thorough testing of virtual folders.

I do something similar but less regimented. I have INBOX-lessnew and
INBOX-new, and my INBOX is a vf combining them. In theory, every month
I go through -new, and move mail more than a month old to -lessnew;
and go through -lessnew, and move mail more than a year or so to
archive folders. Both stages include weeding (a necessity because of
data protection - I have lots of work mail that I shouldn't keep
longer than required). In practice, -new sometimes grows to six months:-)

Johan Vromans

unread,
Jan 25, 2013, 7:50:56 AM1/25/13
to viewma...@nongnu.org
"Uday S. Reddy" <usr.vm...@gmail.com> writes:

> That is nice. So you work with virtual folders on a daily basis?

Yes. This has been so for many, many (more than 15, but probably over
20) years...

> I am glad because that gives me a thorough testing of virtual folders.
>
> What techniques do you use to file stuff in INBOX.YYYYMM?

A stupid shell script run by cron on the first day of the month moves my
current ~/INBOX to ~/Mail/INBOX.YYYYMM (unless there's an Emacs running,
in which case I get a warning mailed).

-- Johan

Stefan Monnier

unread,
Jan 25, 2013, 2:08:26 PM1/25/13
to viewma...@nongnu.org
> (setq boxlist
> (sort
> (directory-files jv-mail-tree t
> "^INBOX.[12][0-9][0-9][0-9][0-9][0-9]$")
> '(lambda (a b) (string< b a))))

I recommend you don't quote lambda. Quoted as above, it tells Emacs
"this is a list" whereas without the quote Emacs knows it's a piece
of code.


Stefan


0 new messages