Discussion:
[VM] VM is awesome (was vm-save-buffer) (Hugo Geir)
Robert P. Goldman
2015-11-07 19:18:17 UTC
Permalink
I used to use VM and really liked it (even submitted some patches back
in the day).

I had to switch to Thunderbird because I am a heavy IMAP user. I use
IMAP so that I can read my email, including old filed emails, on
multiple devices.

I moved to Thunderbird when VM's IMAP interface was very limited.

I'd like to come back to VM, but have felt like I could not because
AFAICT it doesn't support my current mode of operation, which involves
simultaneously keeping open two IMAP inboxes for two different accounts.

When I tried to use VM again, it seemed like I couldn't effectively keep
two IMAP servers open simultaneously, so I gave up. Was I wrong about
that, or is it feasible? I'd love to come back to the fold, if possible.

By the way, for readers trying alternatives, I should mention that I
experimented with mutt, but gave up on that, as well. Moving between
folders and servers in mutt is *EXTREMELY* clunky. Also, interacting
with large numbers of folders seemed very bad: (1) it involved a lot of
hacking of configuration files (2) the interactions to switch folders
were very clunky and (3) mutt didn't seem to be able to handle
displaying a large number of folders and letting you jump to them
interactively.
Kurt Hackenberg
2015-11-08 01:16:26 UTC
Permalink
Post by Robert P. Goldman
I used to use VM and really liked it (even submitted some patches back
in the day).
I had to switch to Thunderbird because I am a heavy IMAP user. I use
IMAP so that I can read my email, including old filed emails, on
multiple devices.
Everybody uses multiple computers and IMAP, don't they? (I don't, but
that's another story.)

I've used VM for about 15 years, and generally like it. VM strikes me
as a programmer's mail reader: powerful, flexible, extensible.
Threading, virtual folders, many folders, folders anywhere in the
filesystem, recursive display of digests.... The obvious weakness is
displaying various MIME data types, since text editors don't do that.
(Emacs can display some images, but that's limited.) There also seem
to be capacity limits.

It might be good to have a second IMAP client, or an option to the
existing one, that doesn't keep a local copy of the IMAP folder. Of
course, it should use IMAP's ability to fetch only message headers,
without bodies, to generate the summary. I think it would only have
to fetch one message body at a time, when the user looks at it. It
could cache, in memory, about the last three or so messages.

Of course a local disk copy of the folder is necessary when the
network connection is intermittent, unreliable, or slow -- but that's
not always the case. For example:

The usual corporate setup, where the IMAP server is down the hall,
across a gigabit Ethernet. For a folder of 1000 messages, with each
message header being, oh, a couple of KB, fetching all the folder's
message headers to generate the summary would take...(mumble
mumble)...roughly a tenth of a second. That seems plenty fast.

Even with my home setup, connected to the world at 25 mbps, that same
fetch of headers should take just a few seconds.

Another case: when the IMAP client and server are on the same
computer. Why would you do that? To avoid incompatibility. Each
mail reader has its own representation of message attributes (read,
saved, forwarded, etc.), all incompatible. But IMAP represents those
in a common form. That way you could use more than one mail reader on
the same folder, and they'd all understand each other. IMAP servers
handle concurrent access, too. Obviously when the client and server
are on the same computer, making another copy of the folder is
pointless.
Kurt Hackenberg
2015-11-13 17:27:23 UTC
Permalink
Post by Kurt Hackenberg
It might be good to have a second IMAP client, or an option to the
existing one, that doesn't keep a local copy of the IMAP folder. Of
course, it should use IMAP's ability to fetch only message headers,
without bodies, to generate the summary. I think it would only have
to fetch one message body at a time, when the user looks at it. It
could cache, in memory, about the last three or so messages.
You can set `vm-imap-max-message-size' to 0 to avoid loading message bodies.
So, what, VM still keeps a local disk copy of the folder but puts only
headers in it? Which would mean that variable is the maximum size of
the body, not the whole message?
Uday Reddy
2015-11-16 15:14:35 UTC
Permalink
Post by Kurt Hackenberg
You can set `vm-imap-max-message-size' to 0 to avoid loading message bodies.
So, what, VM still keeps a local disk copy of the folder but puts only
headers in it? Which would mean that variable is the maximum size of
the body, not the whole message?
Indeed. The headers are needed to generaty the summary. So they are always
loaded.

It would be possible to keep only selected header fields necessary for the
summary and refetch the others as needed. But that would need some delicate
programming that I didn't have the stomach for.

Cheers,
Uday
Uday Reddy
2015-11-16 11:45:05 UTC
Permalink
Post by Kurt Hackenberg
You can set `vm-imap-max-message-size' to 0 to avoid loading message bodies.
So, what, VM still keeps a local disk copy of the folder but puts only
headers in it? Which would mean that variable is the maximum size of
the body, not the whole message?
Indeed. The headers are needed to generaty the summary. So they are always
loaded.

It would be possible to keep only selected header fields necessary for the
summary and refetch the others as needed. But that would need some delicate
programming that I didn't have the stomach for.

Cheers,
Uday
k***@pnnnnx.invalid
2015-11-18 22:13:32 UTC
Permalink
Post by Uday Reddy
Post by Kurt Hackenberg
You can set `vm-imap-max-message-size' to 0 to avoid loading message bodies.
So, what, VM still keeps a local disk copy of the folder but puts only
headers in it? Which would mean that variable is the maximum size of
the body, not the whole message?
Indeed. The headers are needed to generaty the summary. So they are always
loaded.
It would be possible to keep only selected header fields necessary for the
summary and refetch the others as needed. But that would need some delicate
programming that I didn't have the stomach for.
Sure, saving partial headers would be a lot of trouble for almost no
gain. The win -- in some cases -- would be not to use disk at all.
Uday Reddy
2015-11-13 15:03:48 UTC
Permalink
Post by Kurt Hackenberg
It might be good to have a second IMAP client, or an option to the
existing one, that doesn't keep a local copy of the IMAP folder. Of
course, it should use IMAP's ability to fetch only message headers,
without bodies, to generate the summary. I think it would only have
to fetch one message body at a time, when the user looks at it. It
could cache, in memory, about the last three or so messages.
You can set `vm-imap-max-message-size' to 0 to avoid loading message bodies.

The main reason for downloading bodies is to enable full text search inside
VM. VM could carry out external IMAP search, but currently it
doesn't. Somebody can take this on as a project.

Cheers,
Uday
Robert P. Goldman
2015-11-13 14:59:05 UTC
Permalink
Post by Robert P. Goldman
I moved to Thunderbird when VM's IMAP interface was very limited.
I'd like to come back to VM, but have felt like I could not because
AFAICT it doesn't support my current mode of operation, which involves
simultaneously keeping open two IMAP inboxes for two different accounts.
This was never a serious problem really. The only reason it wasn't easy to
do earlier was that the VM buffers were named after the IMAP folder name. It
would still be tricky to visit multiple folders with the same name. But for
INBOX, I now name the VM buffers by the IMAP account name. So it works fine.
Please try the version 8.2.0b from the Launchpad site.
Cheers,
Uday
Thank you so much! I will try again this afternoon. I'm very excited to
try this again! And I appreciate your taking the time to respond.

Best,
Robert
Robert P. Goldman
2015-11-17 17:54:00 UTC
Permalink
Post by Robert P. Goldman
I moved to Thunderbird when VM's IMAP interface was very limited.
I'd like to come back to VM, but have felt like I could not because
AFAICT it doesn't support my current mode of operation, which involves
simultaneously keeping open two IMAP inboxes for two different accounts.
This was never a serious problem really. The only reason it wasn't easy to
do earlier was that the VM buffers were named after the IMAP folder name. It
would still be tricky to visit multiple folders with the same name. But for
INBOX, I now name the VM buffers by the IMAP account name. So it works fine.
Please try the version 8.2.0b from the Launchpad site.
Is there any way to have VM open multiple inboxes upon startup? E.g., I
have a work IMAP account and a personal IMAP account. Can I have VM
start up with both of them open, ideally in different tabs?

Also, is there a way to hide deleted messages?

I did try to RTFM before asking these questions, and I am willing to
provide FM patches as appropriate.



Thank you,
r
Uday Reddy
2015-11-18 11:33:32 UTC
Permalink
Post by Robert P. Goldman
Is there any way to have VM open multiple inboxes upon startup? E.g., I
have a work IMAP account and a personal IMAP account. Can I have VM
start up with both of them open, ideally in different tabs?
You can define little elisp functions to do whatever you want. Here is a
sample function that I use to open the vmrocks account (via a virtual folder
that includes both its INBOX and Sent folders):

(defun vmrocks ()
(interactive)
(vm-visit-virtual-folder "vmrocks")
(vm-get-new-mail))

or you could use more simply

(defun vmrocks ()
(interactive)
(vm-visit-imap-folder-other-frame
"imap-ssl:imap.gmail.com:993:INBOX:login:usr.vm.rocks:*")
)

You can try doing it with multiple visits and see if it works.

Cheers,
Uday
Robert P. Goldman
2015-11-17 17:55:03 UTC
Permalink
When I first try to start up VM it slurps up years-old caches and grinds
away forever trying to do something with them. But I wasn't able to
figure out where these caches live and kill them....

Then when I tried to kill my session and restart, I ended up in a state
where I was asked to do a vm-recover-folder. I did so. At this point I
was prompted for a pathname, and had simply no clue what that pathname
should be. Maybe prompting should be added to help us find said recovery
folder? Otherwise this isn't very helpful.

Best,
r
Uday Reddy
2015-11-18 11:43:42 UTC
Permalink
Post by Robert P. Goldman
Then when I tried to kill my session and restart, I ended up in a state
where I was asked to do a vm-recover-folder. I did so. At this point I
was prompted for a pathname, and had simply no clue what that pathname
should be. Maybe prompting should be added to help us find said recovery
folder? Otherwise this isn't very helpful.
See vm-imap-folder-cache-directory.

I recommend not doing crash recovery for IMAP folders because your IMAP
server has the full folder. Trying to synchronize an auto-save file with the
server is not easy.

Cheers,
Uday
Uday Reddy
2015-11-19 00:07:08 UTC
Permalink
Post by Robert P. Goldman
When I first try to start up VM it slurps up years-old caches and grinds
away forever trying to do something with them. But I wasn't able to
figure out where these caches live and kill them....
Then when I tried to kill my session and restart, I ended up in a state
where I was asked to do a vm-recover-folder. I did so. At this point I
was prompted for a pathname, and had simply no clue what that pathname
should be. Maybe prompting should be added to help us find said recovery
folder? Otherwise this isn't very helpful.
Oh, I forgot to say, the Crash Recovery section of the manual tells you how
to deal with it.

Cheers,
Uday

Loading...