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!

有帮助吗?

解决方案

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.

其他提示

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).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top