user2030677
user2030677

Reputation: 3526

Adding to an environment variable still doesn't work

I'm trying to get emacs to become a global name so I can reference it anywhere on my filesystem. This is what I did on the command line:

$PATH = C:/emacs/bin:$PATH

But when I do that I get the following error:

sh.exe": /c/home/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Program: No such file or directory

I even went directly to Start Menu->System [Properties]->Environment Variables and I tried to add C:\emacs\bin to the list of the paths but the name still came up as emacs: command not found. I don't know what I'm doing wrong.

Note that this is only a problem within C:\cygwin. Outside of that directory I can type emacs without a problem.

Upvotes: 0

Views: 113

Answers (1)

sds
sds

Reputation: 60014

Your command

$PATH = C:/emacs/bin:$PATH

has several problems:

  1. $ evaluates the variable, you need to set it
  2. spaces are significant, you do not need them
  3. you cannot use : inside a Cygwin path

Use this instead:

PATH=/c/emacs/bin:$PATH

Upvotes: 3

Related Questions