1. Ed.bat won't open file
- Posted by Alex Caracatsanis <sunpsych at ncable.com.au> Jun 24, 2007
- 564 views
I've just noticed that with Eu3.1 ed.bat can't open my file (eg MyProg.exw) which is in a folder whose name contains a hard space (eg c:\Eu Projects); so when I try to open c:\Eu Projects\MyProg.exw I see my source code in the editor's window (under c:\Windows\system32\cmd.exe), but then can't run it. I receive an error message: "Can't open c:\Eu.exu" It seems unable to recognise the space in the folder's name, because the problem disappears when I rename the folder to c:\EuProjects\... Is this the expected behaviour? Is there a way around it? I'm using XP. "EUDIR = c:\Euphoria" and "PATH = c:\Euphoria\bin;" Thank you Alex Caracatsanis
2. Re: Ed.bat won't open file
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 24, 2007
- 574 views
- Last edited Jun 25, 2007
Alex Caracatsanis wrote: > I've just noticed that with Eu3.1 ed.bat can't open my file (eg MyProg.exw) > which is in a folder whose name contains a hard space (eg c:\Eu Projects); > so when I try to open c:\Eu Projects\MyProg.exw I see my source code in the > editor's window (under c:\Windows\system32\cmd.exe), but then can't run it. > I receive an error message: "Can't open c:\Eu.exu" It shouldn't show ".exu" as the extension. That's a new bug in 3.1 that has been reported already (See SourceForge). > It seems unable to recognise the space in the folder's name, because the > problem disappears when I rename the folder to c:\EuProjects\... 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. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Ed.bat won't open file
- Posted by Alex Caracatsanis <sunpsych at ncable.com.au> Jun 26, 2007
- 561 views
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. > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a> 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... Thank you all the same. Alex Caracatsanis
4. Re: Ed.bat won't open file
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 26, 2007
- 543 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