11

VSCode (and other graphical editors) allow you to open any folder, and all source files in that folder are already tagged such that you can jump to definitions of functions/objects as long as the definitions exist in that same folder (as well as other features like finding all references in the entire project folder)

I'm trying to explore emacs for my day-to-day tasks and would like to understand the best way to achieve the above. The official GNU Emacs documentation talks about EDE mode, but that required each subfolder to be manually assigned as a project (i.e. the .ede files will exist in all folders in the directory). Is there a better way to do this?

The reason I need this is that all of our official code is maintained as Visual Studio solutions and if I'm using any other editor/IDE, then I can open the project folder as a project and still be able to read/understand the code outside of Visual Studio.

Thanks!

1

1 Answer 1

4

Emacs packages will automatically find the project root,

IMO, workspace is an outdated idea. Everything should just work out of box without setup.

BTW, unlike VSCode, in Emacs you can easily code in multiple projects at the same time.

So the answer to your question is simple, "do nothing". Just use the most popular packages other guys are using.

2
  • 2
    What I am struggling with is - what is the actual process? Is it: 1. Open a source file from any folder 2. Run one of these packages (say gnu-global or ctags, etc.) At this point, are all the symbol definitions automatically found? Basically, how do I invoke these packages for a given directory? Should I be in dired before invoking the tagging packages? I can start with projectile which seems to be what a lot of people use and suggest. But I'm a little lost conceptually on how I'm setting up a project with an existing directory which contains the source files.
    – archmuon
    Commented Oct 30, 2019 at 1:25
  • 1
    For counsel, you don't need any process, just use it. For company-gtags, you need create tags file using gnu global. There are many choices in Emacs. I suggest starting from light weight solutions. company and counsel are very popular in Emacs community. You can check their downloads from melpa.org by yourself.
    – chen bin
    Commented Oct 30, 2019 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.