5

after checking path with M-: (eval "PATH") the location of C:/Go/bin shows up, so I know the binary is found. If i try to do M-x gofmt on other files it will give proper errors (not *.go files).

however I noticed something weird in the Messages which is where the gofmt is trying to format..

Calling gofmt: gofmt (-w c:/Users/LunchBox/AppData/Local/Temp/gofmt5200q9o.go)
Error: (file-error "Searching for program" "no such file or directory" "diff")

why is it looking in the -w /appdata/locals/temp/etc..?
shouldn't it be the file I'm working on currently? which is just called ovRESTful.go in c:/work/users/ovRESTful/ovRESTful.go

the line I have for my code..

(add-hook 'before-save-hook 'gofmt-before-save)
Drew
  • 29,895
  • 7
  • 74
  • 104
Andrei
  • 1,196
  • 1
  • 11
  • 25

1 Answers1

2

diff is the name of a command to compare files line by line which is usually distributed with unix-derived operating systems.

You could try to install these utilities on windows:

http://gnuwin32.sourceforge.net/packages/diffutils.htm

to see if that helps.

cjdp
  • 81
  • 5
  • Makes a lot more sense, as they are windows environments and it didn't work on another windows machine. – Andrei Aug 30 '16 at 12:25
  • worked like a charm! There was nothing on the net that was helping me figure out that issue. +1000 for you! – Andrei Aug 30 '16 at 13:34