Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(193)

Issue 7781043: code review 7781043: misc/emacs: Add support for godef (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by Dominik Honnef
Modified:
12 years, 2 months ago
Reviewers:
CC:
adonovan, cw, pah, Sameer Ajmani, golang-dev
Visibility:
Public.

Description

misc/emacs: Add support for godef godef[1][2] is a third party tool for printing information about expressions, especially the location of their definition. This can be used to implement a "jump to definition" function. Unlike cross-language solutions like ctags, godef does not require an index, operates on the Go AST instead of symbols and works across packages, including the standard library. This patch implements two new public functions: godef-describe (C-c C-d) and godef-jump (C-d C-j). godef-describe describes the expression at point, printing its type, and godef-jump jumps to its definition. [1]: https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/ [2]: go get code.google.com/p/rog-go/exp/cmd/godef

Patch Set 1 #

Patch Set 2 : diff -r dfbaf2b999a6 https://code.google.com/p/go #

Patch Set 3 : diff -r dfbaf2b999a6 https://code.google.com/p/go #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -0 lines) Patch
M misc/emacs/go-mode.el View 1 4 chunks +73 lines, -0 lines 3 comments Download

Messages

Total messages: 15
Dominik Honnef
Hello adonovan@google.com, cw@f00f.org, patrick.allen.higgins@gmail.com, sameer@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
12 years, 2 months ago (2013-03-13 05:47:12 UTC) #1
Dominik Honnef
https://codereview.appspot.com/7781043/diff/5001/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): https://codereview.appspot.com/7781043/diff/5001/misc/emacs/go-mode.el#newcode19 misc/emacs/go-mode.el:19: ;; being used A XEmacs developer is in the ...
12 years, 2 months ago (2013-03-13 05:48:26 UTC) #2
pah
LGTM I am currently using this and really enjoying it. Thanks! https://codereview.appspot.com/7781043/diff/5001/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): ...
12 years, 2 months ago (2013-03-13 16:49:48 UTC) #3
Dominik Honnef
https://codereview.appspot.com/7781043/diff/5001/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): https://codereview.appspot.com/7781043/diff/5001/misc/emacs/go-mode.el#newcode868 misc/emacs/go-mode.el:868: (call-process-region (point-min) (point-max) "godef" nil outbuf nil "-i" "-t" ...
12 years, 2 months ago (2013-03-13 16:51:59 UTC) #4
Dominik Honnef
Any other comments or can we get this committed?
12 years, 2 months ago (2013-03-18 19:20:26 UTC) #5
adonovan
On 2013/03/18 19:20:26, Dominik Honnef wrote: > Any other comments or can we get this ...
12 years, 2 months ago (2013-03-18 19:24:07 UTC) #6
adonovan
On 2013/03/18 19:24:07, adonovan wrote: > On 2013/03/18 19:20:26, Dominik Honnef wrote: > > Any ...
12 years, 2 months ago (2013-03-18 19:28:35 UTC) #7
Dominik Honnef
I'll look into it. I do have some automated testing for the odd indentation cases, ...
12 years, 2 months ago (2013-03-18 19:32:35 UTC) #8
Dominik Honnef
Please don't wait on tests for this CL though. I'll probably need a while to ...
12 years, 2 months ago (2013-03-18 19:55:13 UTC) #9
adonovan
No, of course, that was just a general suggestion. The reason I haven't submitted this ...
12 years, 2 months ago (2013-03-18 20:00:45 UTC) #10
cw
I really like this so far. LGMT
12 years, 2 months ago (2013-03-18 21:08:30 UTC) #11
adonovan
*** Submitted as https://code.google.com/p/go/source/detail?r=4ad21a3b23a4 *** misc/emacs: Add support for godef godef[1][2] is a third party ...
12 years, 2 months ago (2013-03-19 15:29:58 UTC) #12
adonovan
One suggestion: this code seems to assume that godef is on Emacs's $PATH. It would ...
12 years, 2 months ago (2013-03-19 15:32:14 UTC) #13
Dominik Honnef
I'm definitely not a fan of "heuristics". A variable to set the path to godef ...
12 years, 2 months ago (2013-03-19 17:27:53 UTC) #14
adonovan
12 years, 2 months ago (2013-03-19 18:05:23 UTC) #15
jOn 19 March 2013 13:27,  <dominik.honnef@gmail.com> wrote:
> I'm definitely not a fan of "heuristics". A variable to set the path to
> godef might be considered, but I'm wondering what's wrong with assuming
> that it's in your PATH. Every binary you want to use usually has to be
> somewhere in your PATH, and I think most people who use Go seriously
> have GOPATH/bin in their PATH.

Ok, fair enough.  I've been learning a lot about GOROOT and GOPATH in
the last 24 hours and also that perhaps my setup is overcomplicated.
Never mind.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b