I've just noticed that one of my mail files ~/Mail/lists, has close to
300 emails in it, but only the first 178 are shown.
I tried saving a new message to this file from my inbox using vm (using
s), and the message does get appended to the file, but when I open the
file from vm (using v), I still only see the first 178 messages. I also
deleted one of the 178 emails that are visible, which resulted in only
the first 177 messages being displayed. Please help!
VM = 8.0.11
GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-07-11
Tyler
--
Philosophy of science is about as useful to scientists as ornithology is
to birds. --Richard Feynman
have you checked the buffer named *Messages* after loading that
mailbox? perhaps there's an error in parsing the file.
..AlexJB
Nothing that caused an obvious error message:
Reading /home/tyler/Mail/lists... done
Parsing messages... done
Reading attributes... done
177 messages, 0 new, 172 unread, 0 deleted
Generating summary... 168
Generating summary markers...
Generating summary... done
177 messages, 0 new, 172 unread, 0 deleted
Checking for new mail for /home/tyler/Mail/lists...
177 messages, 0 new, 172 unread, 0 deleted
Tyler
--
Power corrupts. PowerPoint corrupts absolutely.
--Edward Tufte
>T> Hi,
>T> I've just noticed that one of my mail files ~/Mail/lists, has close to
>T> 300 emails in it, but only the first 178 are shown.
>T> I tried saving a new message to this file from my inbox using vm (using
>T> s), and the message does get appended to the file, but when I open the
>T> file from vm (using v), I still only see the first 178 messages. I also
>T> deleted one of the 178 emails that are visible, which resulted in only
>T> the first 177 messages being displayed. Please help!
>T> VM = 8.0.11
>T> GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-07-11
I once had something similar. I opened the file as a regular file with
C-x C-f (find-file), after closing the mailbox. I looked for the message
following the last one that was properly displayed and found something
fishy in the headers (probably the X-VM-v5-Data: stuff). After manually
repairing it the whole mailbox was again visible. I think that you also
can delete that whole header and VM will reconstruct it when you reopen
the mailbox.
--
Piet van Oostrum <pi...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: pi...@vanoostrum.org
>>>>>> tyler <tyler...@mail.mcgill.ca> (T) wrote:
>
>>T> Hi,
>>T> I've just noticed that one of my mail files ~/Mail/lists, has close to
>>T> 300 emails in it, but only the first 178 are shown.
>
>>T> I tried saving a new message to this file from my inbox using vm (using
>>T> s), and the message does get appended to the file, but when I open the
>>T> file from vm (using v), I still only see the first 178 messages. I also
>>T> deleted one of the 178 emails that are visible, which resulted in only
>>T> the first 177 messages being displayed. Please help!
>
>>T> VM = 8.0.11
>>T> GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-07-11
>
> I once had something similar. I opened the file as a regular file with
> C-x C-f (find-file), after closing the mailbox. I looked for the message
> following the last one that was properly displayed and found something
> fishy in the headers (probably the X-VM-v5-Data: stuff). After manually
> repairing it the whole mailbox was again visible. I think that you also
> can delete that whole header and VM will reconstruct it when you reopen
> the mailbox.
This is getting more disturbing. On reopening the file today, there are,
again, only 176 messages (I deleted another one as a test). Then I check
for how many messages are actually there:
grep X-VM-v5-Data: ~/Mail/lists | wc
176 1760 8984
So now, vm has deleted all the messages it wouldn't display yesterday. I
double-checked by checking my backup of the file (nearly a month old,
ouch), which had 229 messages (from the grep line), but only displayed
178. If vm is not only failing to display messages, but also deleting
them for some reason, I'm going to have to switch to something else
until I can figure this out.
Ok, just noticed that the messages that don't display have something
wrong with the line-endings - they all have '^M' at the ends of the
lines. Prior to having this problem, I have never opened this file for
direct editing, so somewhere along the line something switched encoding
or something? Deleting these line-endings (carriage-return/linefeed
thing) makes all the messages visible again.
So where did the ^M come from? I don't notice it in other mailboxes
created from vm.
Help!
Tyler
--
When in doubt, use brute force.
--Ken Thompson
that's a line-ending character used by DOS. UNIX doesn't use it, and
most unix apps ignore it. those could possibly have been inserted by
a text editor running in windows, but it's odd that they would only
appear in some of the messages.
it's not surprising that VM would have effectively deleted the ~50
messages. basically, when VM read the file, it encountered something
that made it think that it had reached the end of the file (this would
be where the possible bug is). but once that happened, since VM didn't
realize that something had gone wrong, if you saved the folder, VM
would have overwritten what was on disc with it's current concept of
the complete folder.
so, aside from the epic (silent and therefore deadly) fail on opening
the folder in the first place, it's behaving as expected.
i think it could be worth documenting a little more precisely if this
is a reproducable error. perhaps someone will understand what caused
it.
..AlexJB
> Ok, just noticed that the messages that don't display have something
> wrong with the line-endings - they all have '^M' at the ends of the
> lines. Prior to having this problem, I have never opened this file for
> direct editing, so somewhere along the line something switched encoding
> or something? Deleting these line-endings (carriage-return/linefeed
> thing) makes all the messages visible again.
>
> So where did the ^M come from? I don't notice it in other mailboxes
> created from vm.
Sorry that I am getting into this thread kind of late.
^M is the carriage return character (CR). Windows text files use CR-LF to
denote the end of line whereas Unix files use just LF. Emacs can deal with
both formats. But if the two formats are intermixed within the *same* text
file (like a VM mail file), then Emacs doesn't know what to do with it.
Why does this happen? Emacs and VM use a program called 'movemail' to
append new mail to an existing mail file. This program is supposed to find
out what format the existing mail file is in and convert the new mail to the
same format before appending it. There is some amount of guess work
involved in this and 'movemail' is not perfect in guessing.
You can clean up the file by deleting all the useless ^M characters. Visit
the mail file as a text file and type something like M-x replace string RET
^Q^M RET RET. Then save the file, kill the buffer, and revisit it in VM.
Cheers,
Uday