Very specific difficulties setting up CEDET

I have the following setup: I work with C ++ projects under my own build system, and the source code directories are not very stable on my development machine, because I constantly check the specific versions of some projects in my own directories (except for one source directory where I store all the source code) to maintain or develop new features, and then delete them when I finish. I want to use EDE / CEDET, but I do not want to store project definitions in my home area. I would really like it to be some kind of autoloader that seems to exist, but I can't understand the documentation. Can someone please give me instructions on how to set up such a thing?

+4
source share
1 answer

There are several options, but I assume that with your C ++ project appearing in a bunch of random locations, you want to create your own way to automatically create ede-cpp-root projects.

If you look in ede / ede-cpp-root.el or in emacs lisp / cedet / ede / cpp-root.el, in the comments above find ADVANCED EXAMPLE. This shows how to create three simple functions in your .emacs with rules that will create new projects upon discovery.

Suppose each of your projects is located in the following directory:

/home/BD/somewhere/MYPROJ/ 

then you may have code in MY-FILE-FOR-DIR (from the example) that looks like this:

  (when (string-match "/MYPROJ/" dir) (expand-file-name "Makefile" (substring dir (match-end 0)) ) 

or if each project always has a special file, for example, ".SPECIAL", you can have

  (when (file-exists-p (expand-file-name ".SPECIAL" dir))) (expand-file-name ".SPECIAL" dir)) 

You can probably get a lot of money from the simple Emacs Lisp code.

+1
source

Source: https://habr.com/ru/post/1389761/


All Articles