Getting started with CEDET

笑着哭i 提交于 2019-12-09 16:58:50

问题


Try as I might, I can't get CEDET to do anything. Emacs 24.3. I downloaded the most recent CEDET snapshot. I took Alex Ott's setup file from the bottom of his (not so) Gentle Introduction, and changed the first line to point to my cedet-bzr.

I visited hello_world.cpp. I execute M-x semantic-mode.

Now what do I do? Should anything look different? (It doesn't.)

A glance at Alex's setup file suggests that C-c? should do something, but Emacs complains that that key combination is not bound. I really need some hand-holding here!

Edit: I really think the problem might be: "What do I do next?" How do I know it's installed and ready? What should I expcect? Should there be new menu items? Do I have to do something to turn it on? What should my first steps be? Right now, Emacs looks and behaves as if nothing has happened, but I may not be trying the right things. More generally: how do I use it?

Edit #2 (still using Alex's setup file)

  1. It works on Kubuntu if I change the load directory to .../cedet-bzr/trunk as opposed to .../cedet-bzr.
  2. No luck yet at all on OS X. In an attempt to use the built-in version I've tried pointing directly at the cedet directory within the Emacs.app bundle. Building the snapshot version outside of the bundle throws warnings: "Insecure world writable dir /Library/Frameworks in PATH, mode 040777", and there are no changes to the menus.
  3. In Cygwin, I had to comment out the references to "eassist" and "java", and with that I have two new menus: Development and SRecorder.

回答1:


Here's my setup on emacs 24.3.1 on ubuntu 13.04:

(load "~/cedet-snapshot/cedet-devel-load.el")
(semantic-add-system-include "~/misc/include/" 'c++-mode)
(set-default 'semantic-case-fold t)

Here, ~/misc/include/ refers to the includes of some library that you could be using that isn't installed to /usr/include/.

I enable 'semantic-mode occasionally since it can be slow, but after it's enabled, 'semantic-ia-complete-symbol works.

UPD

I was installing a fresh Ubuntu on my new SSD and I've discovered that CEDET stopped working. Here's how I got it back on the track:

cd ~/.emacs.d/semanticdb
rm -rf *

Then in a C++ buffer M-x semantic-force-refresh. It may ask you something about debugging the hooks, just say type y.



来源:https://stackoverflow.com/questions/16798962/getting-started-with-cedet

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!