2

I'm currently trying out Cygwin. I am trying to get emacs to open in terminal mode. When I run $ emacs -nw through mintty with the Cygwin shell. I get bash: emacs: command not found. I am running Windows Vista SP2 if that helps. I think you need to edit the environment variables but I don't know what to do then.

Please help! Any suggestions are greatly appreciated.

Thanks in advance!


Updates:

  1. This is what comes up when I run $ echo $PATH:

    $ echo $PATH
    

    /usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Program Files/Common Files/Adobe/AGL:/cygdrive/c/Program Files/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Common Files/Roxio Shared/10.0/DLLShared:/cygdrive/c/Program Files/Common Files/RoxioShared/DLLShared:/cygdrive/c/Program Files/Common Files/Roxio Shared/10.0/DLLShared:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Common Files/Ulead Systems/MPEG:/cygdrive/c/Program Files/Windows Live/Shared:/cygdrive/c/Program Files/QuickTime/QTSystem:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/gtk2/bin:/cygdrive/c/Program Files/mlt/bin:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Python27:/cygdrive/c/Program Files/Console:/cygdrive/c/Program Files/OpenLibraries/bin

Anish Gupta
  • 2,218
  • 2
  • 23
  • 37

1 Answers1

5

If you want to use emacs -nw, I'm pretty sure you're going to need to install the cygwin emacs (using the cygwin installer).

If you want to use some other emacs for Windows (I don't think -nw will work then), then you need to add the path to that emacs to your PATH, e.g.

export PATH=${PATH}:/cygdrive/c/Program Files/<path_to_emacs_dir>.

If you want that to be permanent, then you can add it to your ".bashrc" file.

Anish Gupta
  • 2,218
  • 2
  • 23
  • 37
jtahlborn
  • 52,909
  • 5
  • 76
  • 118
  • So I just type "export PATH=${PATH}:/cygdrive/c/Program Files/"? It won't mess up anything right? I couldn't find any cygwin emacs in setup.exe. I tried just about everything. Or is it something else I need to download? Thanks for everything! – Anish Gupta Dec 11 '11 at 19:57
  • oops, my path didn't come out correctly, fixed that. typing in a PATH won't mess up anything permanently. if you mess it up, just restart mintty. emacs _is_ available through setup.exe, and you must install that first if you want "emacs -nw" to work. – jtahlborn Dec 11 '11 at 20:00
  • you have the latest setup.exe from cygwin.com? what mirror are you using? – jtahlborn Dec 11 '11 at 20:05
  • Aha! tweedo.com (the mirror that I was using) didn't have it. I checked a couple of other ones and found it!!! Thank you very much! – Anish Gupta Dec 11 '11 at 20:10