From owner-ntemacs-users@june  Mon Dec 30 13:08:50 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Mon" "30" "December" "1996" "15:27:00" "-0500" "bill@attmail.com" "bill@attmail.com" nil "36" "vm-pop and text crash box files" "^From:" nil nil "12" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id NAA00402 for <voelker@june.cs.washington.edu>; Mon, 30 Dec 1996 13:08:50 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA17202 for <voelker@joker.cs.washington.edu>; Mon, 30 Dec 1996 13:08:48 -0800
Received: from hogw2.att.com (hogw2.att.com [204.179.186.34]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id MAA29010 for <ntemacs-users@cs.washington.edu>; Mon, 30 Dec 1996 12:31:52 -0800
Received: from lynxhub.ho.att.com by hoig2.att.att.com (SMI-8.6/EMS-1.2 sol2) 	id PAA02522; Mon, 30 Dec 1996 15:25:11 -0500
Received: from CARPENTER.cis.att.com ([135.46.61.210]) by lynxhub.ho.att.com (5.x/EMS-1.2 sol2) 	id AA23631; Mon, 30 Dec 1996 15:27:02 -0500
Message-Id: <9612302027.AA23631@lynxhub.ho.att.com>
X-Mailer: emacs 19.34.1 (via feedmail 3 Q) WJC
Original-From: bill@attmail.com (WJCarpenter)
Reply-To: bill@attmail.com (WJCarpenter)
From: bill@attmail.com
To: ntemacs-users@cs.washington.edu
Cc: bug-vm@uunet.uu.net, bug-gnu-emacs@prep.ai.mit.edu
Subject: vm-pop and text crash box files
Date: Mon, 30 Dec 1996 15:27:00 -0500

GNUemacs 19.34 on Win95; VM 5.96 (beta).

When vm-pop reads messages, it accumulates them in a scratch buffer
and then writes the buffer to the VM crash box.  NTemacs can decide on
whether a file is binary or text (in the DOS sense) based on a regexp
look at the filename.  Unfortunately, this doesn't work (as far as I
can tell) with buffers not affiliated with files.  The end result is
that when VM does the write-region in to the crash box, there is a
good chance of it treating it like a text file, thereby putting back
the extra CRs that vm-pop goes to the trouble to strip.  (Whether it
treats the crash box as binary or text depends on individual
configuration.)

My workaround for this is to explicitly type the buffer as binary when
it is created.  I now have a section like this in vm-pop.el's
vm-pop-move-mail:

	  ;; get the trace buffer
	  (setq process-buffer
		(get-buffer-create (format "trace of POP session to %s" host)))
	  ;; clear the trace buffer of old output
	  (save-excursion
	    (set-buffer process-buffer)
		;; bill@att.com ... make trace buffer binary to avoid extra ^M crud
		(if (boundp 'buffer-file-type)
			(setq buffer-file-type t))
		;; bill@att.com
	    (erase-buffer))

If anyone knows of a solution for this that doesn't require changing
VM code (e.g., a way to type buffers by buffer name instead of
filename), I'd love to hear it.
-- 
  bill@attmail.com                    LZ 1C-320
  bill@att.com      (Voice/Fax) +1.908.576.2932
  AT&T Labs       /       AT&T WorldNet Service

From bill@attmail.com  Mon Jan  6 11:07:04 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Mon" " 6" "January" "1997" "10:30:41" "-0500" "bill@attmail.com" "bill@attmail.com" nil "17" "Re: vm-pop and text crash box files" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from cagw1.att.com ([192.128.52.89]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id LAA01332 for <voelker@cs.washington.edu>; Mon, 6 Jan 1997 11:07:03 -0800
Received: from lynxhub.ho.att.com by caig1.att.att.com (SMI-8.6/EMS-1.2 sol2) 	id KAA16475; Mon, 6 Jan 1997 10:27:30 -0500
Received: from CARPENTER.cis.att.com ([135.46.61.210]) by lynxhub.ho.att.com (5.x/EMS-1.2 sol2) 	id AA28588; Mon, 6 Jan 1997 10:30:43 -0500
Message-Id: <9701061530.AA28588@lynxhub.ho.att.com>
X-Mailer: emacs 19.34.1 (via feedmail 7-beta[work-in-progress] I) WJC
Original-From: bill@attmail.com (WJCarpenter)
In-Reply-To: Geoff Voelker's note of 15:51:57, 4 Jan 1997
References: <9612302027.AA23631@lynxhub.ho.att.com> 	<199701042351.PAA25381@joker.cs.washington.edu>
Reply-To: bill@attmail.com (WJCarpenter)
From: bill@attmail.com
To: voelker@cs.washington.edu
Subject: Re: vm-pop and text crash box files
Date: Mon, 6 Jan 1997 10:30:41 -0500

gv> There is no way to type buffers by name instead of filename.  But
gv> why do the contents of the scratch buffer have to be written out
gv> as binary?

Strictly speaking, they don't.

But, I have the filename typing set to treat all my mailboxes as
binary.  That way, they mail folder format is exactly identical to the
UNIX version.  I have often just copied a mail folder one way or the
other.

As far as I know, VM behaves OK if the file is text, but when I claim
it to be binary, it displays the extra ^Ms.
-- 
  bill@attmail.com                    LZ 1C-320
  bill@att.com      (Voice/Fax) +1.908.576.2932
  AT&T Labs       /       AT&T WorldNet Service

