From jdennis@remus.ultranet.com  Wed Sep 18 15:14:48 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "18" "September" "1996" "17:48:37" "-0400" "John R. Dennis" "jdennis@ultranet.com" nil "27" "Call Process under NTemacs" "^From:" nil nil "9" nil nil nil nil]
	nil)
Received: from perseus.ultra.net (perseus.ultra.net [199.232.56.6]) by june.cs.washington.edu (8.7.5/7.2ju) with ESMTP id PAA19578 for <voelker@cs.washington.edu>; Wed, 18 Sep 1996 15:14:47 -0700
Received: from dakota.ultranet.com (dakota.ultranet.com [205.246.13.36]) by perseus.ultra.net (8.7.4/dae0.6) with SMTP id SAA15216 for <voelker@cs.washington.edu>; Wed, 18 Sep 1996 18:14:44 -0400 (EDT)
Received: by dakota.ultranet.com with Microsoft Mail 	id <01BBA58D.1C673C00@dakota.ultranet.com>; Wed, 18 Sep 1996 18:13:36 -0400
Message-ID: <01BBA58D.1C673C00@dakota.ultranet.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
From: "John R. Dennis" <jdennis@ultranet.com>
To: "'voelker@cs.washington.edu'" <voelker@cs.washington.edu>
Subject: Call Process under NTemacs
Date: Wed, 18 Sep 1996 17:48:37 -0400

Geoff:

I'm running emacs 19.31 on NT 4.0. When a lisp program invokes call-process sending
a region as stdin to the process, it fails with an invalid argument error.

I stepped though the lisp debugger and saw something
very interesting. Just before call-process is invoked the arguments look just as I expect
them to. Then I step once in the debugger, the call-process generates an "Invalid Argument"
error, and (this is the interesting part) the arguments to call-process in the debugger have
now changed from what they were before the call to call-process was made. The argument
list now includes "C:/TEMP/emf00092".

I'm going to guess that this temp file (which exists) was created to hold the regions data, that
instead of passing the region as stdin, its now passed as a file argument. I assume this was done
by the C code as a workaround and hence is why the argument list is different before and after the
call to call-process. I also assume the reason I got an "invalid argument" was because the
temp file name uses the Unix / as a path separator instead of backslash.

I searched the source code for something that would be creating a temp file with the prefix "emf"
but I didn't find anything.

Does this ring a bell with you? Do you have a workaround? Do you have any comments?

Thanks,

John Dennis
jdennis@ultranet.com 

From owner-ntemacs-users@june  Mon Aug 12 21:06:58 1996
X-VM-v5-Data: ([nil nil nil nil t nil nil nil nil]
	[nil "" "12" "August" "1996" "23:24:37" "-0400" "Michael Welsh Duggan" "md5i@schenley.com" "<uohkgotje.fsf@schenley.com>" "38" "start-process woes" "^From:" nil nil "8" 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.7.5/7.2ju) with SMTP id VAA28702 for <voelker@june.cs.washington.edu>; Mon, 12 Aug 1996 21:06:58 -0700
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 VAA22963 for <voelker@joker.cs.washington.edu>; Mon, 12 Aug 1996 21:06:52 -0700
Received: from maru.schenley.com (maru.schenley.com [206.62.188.70]) by june.cs.washington.edu (8.7.5/7.2ju) with SMTP id UAA25963 for <ntemacs-users@cs.washington.edu>; Mon, 12 Aug 1996 20:25:21 -0700
Received: by maru.schenley.com from localhost     (router,SLmailNT V2.0); Mon, 12 Aug 1996 23:24:39 EDT
Received: by maru.schenley.com from MARU     (127.0.0.1::mail daemon; unverified,SLmailNT V2.0); Mon, 12 Aug 1996 23:24:39 EDT
Message-ID: <uohkgotje.fsf@schenley.com>
Lines: 38
X-Mailer: Gnus v5.2.37/Emacs 19.32
From: "Michael Welsh Duggan" <md5i@schenley.com>
Sender: "Michael Welsh Duggan" <md5i@schenley.com>
To: ntemacs-users@cs.washington.edu
Subject: start-process woes
Date: 12 Aug 1996 23:24:37 -0400

I have had some problems with start-process for quite a while.  In
order to test this, I ran the following piece of code from a
lisp-interactive buffer which which thought that the emacs-19.32/src
directory was its home (this was culled from the actual call grep.el
makes):

(BTW, the variable `grep' held the result of (get-buffer "*grep*"),
just to be pedantic (this is what grep.el places in there).)

(start-process "grep" grep "C:\\WINNTSRV\\system32\\cmd.exe" "/c"
               "grep -n start-process *.c NUL")

This comes back in the *grep* buffer with the quite reasonable
response of:

----------------------------------------------------------------------
fileio.c:416:The `call-process' and `start-process' functions use this function to\n\
process.c:1004:DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0,
process.c:3770:The value takes effect when `start-process' is called.");

Process grep finished
----------------------------------------------------------------------

However, when I execute this a second time (or any subsequent times),
I get the following:

----------------------------------------------------------------------
Bad command or file name

Process grep finished
----------------------------------------------------------------------

What's up with this?  It makes it difficult to do any two M-x grep or
M-x diffs in a single session.

-- 
Michael Duggan
(md5i@schenley.com)

