2

So I have 2 files, file1.sml & file2.sml both of which have correct code & I'm using a Windows operating system.

When I run Emacs and execute: use "file1.sml", it runs fine but then when I simply go to tab File->Close to close the file and then I drag file2.sml into Emacs and try to run it the same way, it gives the following error:

[use failed: Io: openIn failed on "file2.sml", Win32TextPrimIO:openRd: failed]

I tried restarting SML by doing c-c c-d but it's the same. So what I do is I quit Emacs and then start again and run file2.sml and it runs fine.

Why do I have to quit just to run another file?

xskxzr
  • 12,442
  • 12
  • 37
  • 77
Square-root
  • 853
  • 1
  • 12
  • 25
  • 1
    Are both files in the same directory? They need to be in the working directory of the sml process. (It's often more convenient to use the SML mode commands, e.g. `Send buffer` and `Send region`, than to `use` files.) – molbdnilo Jan 18 '17 at 15:17
  • No they're in different folders. You're right it works that way. But I remember a while ago I was able to run them fine though they were in different folders.. I don't know what happened :( – Square-root Jan 19 '17 at 03:58

1 Answers1

1

there are few things you can right now do. 1. save the file you created before trying to open it. i mean yes it sounds lame, but people new to programming ( as you tried to save it as "file.sml" , First save it. 2. try to change \ to // Win32TextPrimIO:openRd: failed

because it cant find it.

Saksham
  • 11
  • 1