Tuesday, 15 February 2011

Emacs can't find gofmt in go-mode -



Emacs can't find gofmt in go-mode -

i'm trying utilize emacs golang programming. downloaded go-mode bundle , installed it. .emacs is:

(require 'go-mode)

when i'm opening *.go files, go-mode enables correctly. can't save *.go files because when i'm trying save *.go files i'm getting error in minibuffer says

gofmtprogram not found.

golang installed (version 1.3), gofmt works terminal.

how can solve problem?

thank you.

make sure have gofmt in path. (echo $path) check, if can't run gofmt in shell, emacs won't well.

gofmt on setup in $gobin/gofmt, think can in 1 of $gopath/bin.

if have in path, chances have emacs configuration sets path. alter needed.

if installed via packet manager, chances gofmt somewhere else. (i think brew puts in /usr/local/bin)

small tip when happen , need save: switch text-mode (m-x text-mode).

emacs go

No comments:

Post a Comment