Question

What are the variable names that can customize the directory to store CEDET auto generated files, like ede-projects.el and srecode-map.el? By default they are in ~/.emacs.d, but I want to move them to somewhere else. Thanks!

Was it helpful?

Solution

For "ede-projects.el" I've found the next solution placed directly after loading Cedet:

(setq ede-project-placeholder-cache-file (concat tmp-dir "ede-projects.el"))

where "tmp-dir" is some path you want it be.

The same is for Semantic:

(setq semanticdb-default-save-directory (concat tmp-dir ".semanticdb"))

And for the "srecode-map.el" I've found nothing better to replace line 48 in "..\cedet\lisp\cedet\srecode\map.el":

  (locate-user-emacs-file "srecode-map.el" ".srecode/srecode-map")

with

  (locate-user-emacs-file (concat tmp-dir "srecode-map.el") ".srecode/srecode-map")

I am not definitely sure, but there must be a variable not a hardcoded string.

OTHER TIPS

In complement to AdVocem's answer (which is perfectly correct), here is a more or less systematic way to find such variables: use the command apropos-value.

This command finds all lisp variables whose value matches a given pattern. For example in your case:

  • M-xapropos-valueRETede-projects.elRET yields, among other results:

    [...]
    ----------------
    ede-project-placeholder-cache-file
       "~/.emacs.d/ede-projects.el"
    
    ----------------
    [...]
    
  • M-xapropos-valueRETsrecode-map.elRET yields nothing interesting: just a bunch of standard variables unrelated to CEDET.

Of course, for this to be effective, all relevant libraries must have been loaded beforehand (otherwise, the variables might not be defined yet).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top