Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run sml console at emacs - searching for program: no such file or directory?

I installed SML on Ubuntu 12.04.

Here is more info:

nazar_art@nazar-desctop:~$ sml -version
Standard ML of New Jersey v110.75 [built: Mon Sep  2 23:36:16 2013]

And added to emacs this package:

M x list-packages  + Enter

find sml-mode and install by mouse click. But when I tried write easy .sml file I want to open sml console at emacs.

I press C c + C s => I see SML command: sml and press Enter.

And see this message:

Searching for program: no such file or directory

Instead of opening sml console.

I couldn't figure out why this happen?

  • How to solve this trouble?

Update:

Here is my which sml:

/usr/local/SML/bin/sml

and emacs version - GNU Emacs 24.3.1 Installed from here but only for emacs24, not for emacs-snapshot.

like image 907
catch23 Avatar asked Sep 22 '13 16:09

catch23


2 Answers

Option 4: Eval the following with: C-M-: (setq exec-path (cons "/usr/local/SML/bin" exec-path)) return/enter or put it into $home/.emacs to make it persist over all sessions.

like image 191
Bleeding Fingers Avatar answered Sep 17 '22 18:09

Bleeding Fingers


Your problem is that the sml executable isn't on the PATH that Emacs sees. And you can launch sml from bash probably because you modify path in ~/.bashrc.

  1. Option 1: modify PATH In ~/.profile (you'll need to log out once):

    export PATH=$PATH:/usr/local/SML/bin/

  2. Option 2: create link

    sudo ln -s /usr/local/SML/bin/sml /usr/bin/sml

  3. Option 3: apt installs for me sml to /usr/bin/ (Emacs knows this path)

    sudo apt-get install smlnj

like image 42
abo-abo Avatar answered Sep 20 '22 18:09

abo-abo