Re: Ed.bat won't open file
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 26, 2007
- 544 views
Alex Caracatsanis wrote: > Robert Craig wrote: > > Alex Caracatsanis wrote: > > > I've just noticed that with Eu3.1 ed.bat can't open my file (eg > > > MyProg.exw) > > > > You might be using a version of ed.bat that runs ex.exe, > > rather than exwc.exe, so it doesn't handle long filenames very well. > > If you type: > > ex where ed.bat > > at a command prompt, it should tell you which ed.bat it is picking up, > > based on your PATH environment variable. > > Have a look at ed.bat with ed or NotePad or something to see if > > it has ex.exe or exwc.exe. > > Perhaps you are picking up the old version of ed.bat that is > > installed for pre-XP systems by the DOS/WIN installer. > > If so, fix your PATH. I think if you fix this problem, > > then the .exu problem won't happen. > > Thanks Rob. I've done as above, and have reinstalled 3.1. My ed.bat says: > exwc.exe ed.ex %1 %2 %3 > > Still get the same behaviour: ie I have a source file on a path whose name > has a hard space (eg: c:\Eu Projects\MyProg.exw); I can open it with ed > after right-clicking on the file name; but can't run it by pressing Esc + e > > Not to worry tho - it all runs properly from a command prompt if I use cd\ > and type the pathname and filename myself, so no fuss. Just thought I'd > mention it in case I was overlooking something simple... OK, the fix for this is easy. I added double-quotes around the filename for Esc e in ed.ex. (.ex and .exw files). I changed ed.ex (line 1795) to read:
if platform() = LINUX then shell("exu " & file_name) elsif match(".exw", lower(file_name)) or match(".ew", lower(file_name)) then shell("exw \"" & file_name & "\"") else shell("ex \"" & file_name &"\"") end if
I'll test the double-quote fix on Linux later today and check in the change. Thanks, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com