7 messages in com.perforce.perforce-user[p4] problem using emacs as P4EDITOR ...
FromSent OnAttachments
Paul Mitchell14 Jan 2002 07:18 
Simon Green14 Jan 2002 07:30 
Simon Green14 Jan 2002 08:08 
David Birkhead14 Jan 2002 08:08 
Chuck Karish14 Jan 2002 08:21 
Paul Mitchell14 Jan 2002 08:40 
Gareth Rees14 Jan 2002 12:58 
Subject:[p4] problem using emacs as P4EDITOR under win2k and tcsh or cmd shell
From:Paul Mitchell (pmit@ati.com)
Date:01/14/2002 08:40:31 AM
List:com.perforce.perforce-user

Son of a gun, emacs.exe works! I've tried runemacs, gnuclientw, and gnuclient, but didn't think to try plain old emacs!?

Thanks alot David.

-----Original Message----- From: David Birkhead [mailto:daveb at data-pipes.com] Sent: Monday, January 14, 2002 11:09 AM To: Simon Green Cc: Paul Mitchell; 'perforce-user at perforce.com' Subject: Re: [p4] problem using emacs as P4EDITOR under win2k and tcsh or cmd shell

There are actually 2 commands for running emacs, 'emacs' and 'runemacs'. If you run 'runemacs' from a command prompt will see that it returns immediately, while running 'emacs' does not.

Try using the 'emacs' command. I believe that will solve your problems.

-Daveb

At 03:30 PM 1/14/2002 +0000, Simon Green wrote:

Paul Mitchell <pmitchel at ati.com> writes:

We are seeing the problem described in Perforce's technote 17 (http://www.perforce.com/perforce/technotes/note017.html). Quoting from that tech note:

On NT 4.0, Perforce sometimes uses the DOS shell (cmd.exe) to start programs designated by the user's P4EDITOR or P4DIFF environment variable. Unfortunately, the DOS shell is smart enough to know that when a Windows command is run, it doesn't need to wait for the command to complete. This makes Perforce think the command has finished, and Perforce then continues processing, often deleting the temporary files that the editor or diff were run on. This yields errors about temp files not being found and other weird results.

The workarounds that are described in the note do not work under tcsh or cmd shell. Can anyone point me toward a fix for this?

Untested: Can you wrap the command you really want to run in something that doesn't look like a windows program (ie a .cmd or .bat script)?

If that doesn't work and you're desperate, you could always put a 'pause' command at the end of the wrapper, to force the shell to wait. Ugh.

--Simon

--------------------------------------------------------------------