Live data from Hacker News

Dumb-jump: an Emacs “jump to definition” package

github.com

31–40 of 53 posts

Re: Dumb-jump: an Emacs “jump to definition” package

#31
this looks neat.

i notice one of the supported languages is go -- if you're doing much go, i recommend installing godef and using go-mode.el. no tags files or anything like that, and works perfectly well for jumping to definition.

(i also highly recommend gorename and guru.)

Re: Dumb-jump: an Emacs “jump to definition” package

#34

What do people use to get something like this for C/C++? Also is there any package for auto-completion in C/C++?

CEDET could be replacement, although sometimes very slow, and requires customization for complex projects. I made it working with Java as well, but for last 2 years, I didn't have a chance to contribute anymore, and my fork with better Java support is outdated...

I wrote an article that should be introduction to CEDET: http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html - maybe it will be useful

Re: Dumb-jump: an Emacs “jump to definition” package

#35
This is cool, I've also been writing a similar emacs package: it uses `git grep` and `git ls-files` to quickly find patterns and file names in the current git repo, and has a simple interface for filtering the search results to narrow down to what you were looking for (and also uses a regexp heuristic for jumping to definitions).

https://github.com/dandavison/emacs-search-files

Re: Dumb-jump: an Emacs “jump to definition” package

#36

I must be missing something, but what is the advantage of this over something like Emacs Tags ( https://www.emacswiki.org/emacs/EmacsTags ) ?

One major advantage is that approaches like this just work, with zero configuration, and zero persistent state to be wrong. `git grep` (and ag) are very fast on modern laptops. That changes considerations dramatically from 10 or 20 years ago or whenever TAGS were introduced.

Re: Dumb-jump: an Emacs “jump to definition” package

#37
I really love how well this works with Cider though, for Clojure projects. It even lets you jump to the definition of Java or Clojure files that live outside your current project, e.g. in third party libraries or even the Java standard library. Why, just today I jumped to the definition of java.time.Month because I had never actually seen a real live Java enum before. (Sure enough, it's defined with the keyword `enum`. Neat!) Cider has become essential to my Clojure workflow at work.

Re: Dumb-jump: an Emacs “jump to definition” package

#38

Ah yes, yet another proof that the Wrong Thing™ isn't necessarily the wrong thing. Sure it's objectively worse than [ce]tags, but haven't you heard? Worse is Better. :-D

I am not sure "proof" is the appropriate word.

> Dumb Jump uses The Silver Searcher ag (and falls back to grep) ... [and] a set of regular expressions

If you're going to install ag, you might as well install universal-ctags[1], a revival of ctags with many improved and new parsers. It allowed me to discard my C and javascript ctags config entirely.

Combined with gutentags[2] you have a "just works" and "Less Dumb" setup.

[1] https://github.com/universal-ctags/ctags

[2] https://github.com/ludovicchabant/vim-gutentags

Re: Dumb-jump: an Emacs “jump to definition” package

#39
For C/C++ RTags (https://github.com/Andersbakken/rtags) together with company-mode and fly-check can do jump-to-definition, auto-completion and on-the-fly-syntax-checking. Super easy to use if using cmake as build system.

Respond to this comment if you need pointers on how to set things up.

Re: Dumb-jump: an Emacs “jump to definition” package

#40
post #39

For C/C++ RTags ( https://github.com/Andersbakken/rtags ) together with company-mode and fly-check can do jump-to-definition, auto-completion and on-the-fly-syntax-checking. Super easy to use if using cmake as build system. Respond to this comment if you need pointers on how to set things up.

Any equivalent options for make?
Post reply on HN