VM

msdos CR stored in sent-mail

Asked by Kyle

When I FCC to my sent-mail, something is including dos-style newlines (carriage returns / ^M). I'm not sure if this is a VM thing or emacs function. When I visit the sent-mail folder the messages are not visible unless I edit the file to remove the ^M. I can work around this by editing my sent-mail to remove the carriage return, but I'm sure there is a better way.

I'm using VM 8.1.93a on Windows with GNU Emacs 23.1.50.1.

Question information

Language:
English Edit question
Status:
Solved
For:
VM Edit question
Assignee:
No assignee Edit question
Solved by:
Uday Reddy
Solved:
Last query:
Last reply:
Revision history for this message
Uday Reddy (reddyuday) said :
#1

You haven't mentioned which operating system you are running.

Recall that mail sending is done by Emacs mail-mode, not VM. Handling FCC's
is also part of mail-mode. The file appending needed for FCC is handled by
Emacs core. So, you will need to look at those.

I believe Emacs guesses the line ending style by looking at the contents of
the file. So, you will need to first clean the file of ^M's to get Emacs to
guess right. Look for programs called "dos2unix" and "unix2dos" which do
such cleaning.

For my own use, I couldn't find anyway to get Emacs and mail-mode to use
Unix line endings for FCC on Win32. So, I maintain two sent-mail folders,
one for use Unix and one for Win32.

Revision history for this message
Best Uday Reddy (reddyuday) said :
#2

Sorry, you did mention that you were running Windows. In that case, Emacs will tend to prefer DOS line endings. So, it is better to convert the sent-mail folder to DOS style and keep it that way.

Revision history for this message
Kyle (8-launchpad-patentinvestor-com) said :
#3

Thanks Uday Reddy, that solved my question.