Discussion:
[VM] Newbie emacs/imap question
blueman
2012-06-04 04:10:37 UTC
Permalink
Can someone point me to the right method and/or documentation for doing
the following (if it is even possible)?

I have been using VM to read my email directly from the local email
server for more than 25 years now, so that I have a rich heirarchy of
folders containing filed mail plus my Inbox that collects new email.

I would now like to read my email remotely on a droid smartphone. In the
past I used ssh to log in to my server and read it in a text emacs
terminal running remotely, but this sort of loses all the advantages of
a smartphone graphical interface plus it's relatively slow and the fonts
are ridiculously tiny. I also used to use pop to just pop a copy of new
mail but this didn't allow me to access old filed emails or nor did it make
it easy to synchronize deletions or movements to folders.

So, instead I was wondering whether it is possible to let my home server
function as an imap server that gets email from my Inbox and all the
stored associated vm folders so that I can then read/move/delete all my
past and current emails remotely over my android phone via
Imap. Ideally, I would like to do this without messing (too much) with
any of my existing vm folders.
Uday Reddy
2012-06-04 09:23:50 UTC
Permalink
blueman writes:
John Stoffel
2012-06-06 14:20:24 UTC
Permalink
Hi Uday,

I think I just found a bug in version 8.2.0b which I'm using on my
work machine (Centos 6.2, x86_64, emacs 23.1.1). When I mark a group
of messages by subject, then save them, it tells me how many were
written.

I then re-did the save (MNs) to another folder but it told me that 0
(zero) messages were saved. This confused me, so I did it a couple of
more times, even unmarking all the messages, re-marking them and
re-saving. Ended up with a bunch of copies in the destination folder.

My suspicion is that you count the number of messages marked 'filed',
not the actual number of messages written, when the status is shown.
Since these five messages were already marked as filed, it didn't
update properly.

But my elisp-fu is non-existant, so I can't really do much to debug
this. Hopefully this report is enough.

Thanks,
John
Uday Reddy
2012-06-10 18:31:20 UTC
Permalink
Post by John Stoffel
I think I just found a bug in version 8.2.0b which I'm using on my
work machine (Centos 6.2, x86_64, emacs 23.1.1). When I mark a group
of messages by subject, then save them, it tells me how many were
written.
Thanks, John. This has been fixed in the trunk, thanks to John Hein. I
haven't had the time to create a follow-up release yet.

Cheers,
Uday
John Stoffel
2012-06-11 01:52:11 UTC
Permalink
Post by John Stoffel
I think I just found a bug in version 8.2.0b which I'm using on my
work machine (Centos 6.2, x86_64, emacs 23.1.1). When I mark a group
of messages by subject, then save them, it tells me how many were
written.
Uday> Thanks, John. This has been fixed in the trunk, thanks to John Hein. I
Uday> haven't had the time to create a follow-up release yet.

Awesome, glad I could help and find bugs to be squashed. Any hope of
a 8.2.0c release for more testing with all the niggling bugs rolled
in?

John

blueman
2012-06-04 17:36:35 UTC
Permalink
Uday Reddy
2012-06-04 18:39:15 UTC
Permalink
Unfortunately, I still use 'mbox' mode and offlineimap seems to only
work with maildir -- otherwise it seems like a great idea
The official web page http://offlineimap.org/ says that it supports Maildir
or IMAP as the local repository.
1. Is there a companion function to vm-imap-move-mail that moves mail in
the opposite direction -- from a VM folder to an IMAP mail box?
No, there isn't a way to make the IMAP server into a client of local
folders. You can however save individual messages into an IMAP folder
using `vm-save-message-to-imap-folder'.
2. Is there a way to get the 'FCC' copy to go to an imap folder?
Yes, `vm-imap-save-composition' does that. Or, look up IMAP-FCC in a recent
version of the manual.

Cheers,
Uday
blueman
2012-06-04 20:09:33 UTC
Permalink
Post by Uday Reddy
Unfortunately, I still use 'mbox' mode and offlineimap seems to only
work with maildir -- otherwise it seems like a great idea
The official web page http://offlineimap.org/ says that it supports Maildir
or IMAP as the local repository.
Ahhh maybe I am misunderstanding, but I wanted to have mbox as my local
repository since that is what I use for vm... so I would have IMAP on
the server and mbox locally...

In any case, I think I can mostly get around this by just running the
IMAP server locally which really is what I mostly wanted anyway...
Post by Uday Reddy
1. Is there a companion function to vm-imap-move-mail that moves mail in
the opposite direction -- from a VM folder to an IMAP mail box?
No, there isn't a way to make the IMAP server into a client of local
folders. You can however save individual messages into an IMAP folder
using `vm-save-message-to-imap-folder'.
Can I assume it works on multiple (i.e., marked messages)?
Also, I wouldn't think it would be hard to use the code in
vm-save-message-to-imap-folder to act on the entire folder either in a
copy or move (i.e., copy then delete mode). I would imagine this would
be helpful if people want to migrate (not synch) some folders back and forth.
Post by Uday Reddy
2. Is there a way to get the 'FCC' copy to go to an imap folder?
Yes, `vm-imap-save-composition' does that. Or, look up IMAP-FCC in a recent
version of the manual.
I will look at that.

One new question...
3. Has anybody written any wrapper functions that would 'unify' the
treatment of local and IMAP folders so that the same function (and more
importantly bindings) could be used independent of the folder type. I'm
thinking in particular of functions like vm-visit-folder and various
save/copy/delete functions.

vm would then 'choose' the right version of the function based on the
alreay known or given name of the folder. For example, if an unquoted
":" were disallowed from local folder names (which is probably mostly
true in practice anyway on most filesystems), the presence of a colon
would indicate whether you want to visit an imap or regular
folder.

To tell you the truth, it would be nice if this would work on virtual
folders too where perhaps a user-defined symbol could be used to
distinguish virtual folders.

Personally, I find it difficult and inconvenient to keep track sometimes
of what folder type is what and then to remember the right flavor of
function to run on them...
Post by Uday Reddy
Cheers,
Uday
Thanks
blueman
2012-06-04 21:43:33 UTC
Permalink
Post by blueman
Post by Uday Reddy
No, there isn't a way to make the IMAP server into a client of local
folders. You can however save individual messages into an IMAP folder
using `vm-save-message-to-imap-folder'.
Can I assume it works on multiple (i.e., marked messages)?
oooops... it doesn't seem to work on multiple (marked messages) --
that's a shame
Post by blueman
Also, I wouldn't think it would be hard to use the code in
vm-save-message-to-imap-folder to act on the entire folder either in a
copy or move (i.e., copy then delete mode). I would imagine this would
be helpful if people want to migrate (not synch) some folders back and forth.
Post by Uday Reddy
2. Is there a way to get the 'FCC' copy to go to an imap folder?
Yes, `vm-imap-save-composition' does that. Or, look up IMAP-FCC in a recent
version of the manual.
I will look at that.
One new question...
3. Has anybody written any wrapper functions that would 'unify' the
treatment of local and IMAP folders so that the same function (and more
importantly bindings) could be used independent of the folder type. I'm
thinking in particular of functions like vm-visit-folder and various
save/copy/delete functions.
vm would then 'choose' the right version of the function based on the
alreay known or given name of the folder. For example, if an unquoted
":" were disallowed from local folder names (which is probably mostly
true in practice anyway on most filesystems), the presence of a colon
would indicate whether you want to visit an imap or regular
folder.
To tell you the truth, it would be nice if this would work on virtual
folders too where perhaps a user-defined symbol could be used to
distinguish virtual folders.
Personally, I find it difficult and inconvenient to keep track sometimes
of what folder type is what and then to remember the right flavor of
function to run on them...
Post by Uday Reddy
Cheers,
Uday
Thanks
blueman
2012-06-05 04:01:56 UTC
Permalink
Post by blueman
Post by blueman
Post by Uday Reddy
No, there isn't a way to make the IMAP server into a client of local
folders. You can however save individual messages into an IMAP folder
using `vm-save-message-to-imap-folder'.
Can I assume it works on multiple (i.e., marked messages)?
oooops... it doesn't seem to work on multiple (marked messages) --
that's a shame
Never mind... I forgot that to work on multiple marked messages, you
need to assign the function to a keystroke (rather than using M-x)
Loading...