Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: doc lists out-of-date go-mode.el configuration #24953

phillipao opened this issue Apr 19, 2018 · 2 comments

x/tools/cmd/goimports: doc lists out-of-date go-mode.el configuration #24953

phillipao opened this issue Apr 19, 2018 · 2 comments


Copy link

@phillipao phillipao commented Apr 19, 2018

It says to add the following to .emacs:

(setq gofmt-command "goimports")
(add-to-list 'load-path "/home/you/somewhere/emacs/")
(require 'go-mode-autoloads)
(add-hook 'before-save-hook 'gofmt-before-save)

go-mode-autoloads is no longer used by go-mode (see dominikh/go-mode.el#222), and this line will probably produce an error. That line should be removed.

Also, I found the add-to-list line confusing, because it's not clear from context whether this is optional or required. Might be good to remove that, and then say something like "This searches load-path for goimports, so you may need to add the goimports location to load-path." (Sorry for this separate issue. Feel free to tell me to break it out to a separate issue if it's too large or controversial.)

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2018
Copy link

@dominikh dominikh commented Jun 27, 2018

Really, the only line that is necessary is the first one. Emacs users will already have done all of the other necessary steps to get go-mode working.

Copy link

@ALTree ALTree commented Jul 1, 2019

This was fixed in golang/tools@1c3d964, so I'm closing this issue.

@ALTree ALTree closed this Jul 1, 2019
@golang golang locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.