简体   繁体   English

CEDET和ECB在Emacs中的地位24.2

[英]Status of CEDET and ECB in Emacs 24.2

I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1. 我对在Emacs 24.2.1中运行CEDET和ECB需要做些什么感到困惑。

The Emacswiki has the following text : Emacswiki 有以下文字

How to enable the CEDET tools which were merged with Emacs 如何启用与Emacs合并的CEDET工具

In Emacs 23.2, CEDET was merged into the main Emacs distribution. 在Emacs 23.2中,CEDET被合并到主要的Emacs发行版中。 The configuration code which is explained in CEDET tutorials doesn't work anymore. CEDET教程中解释的配置代码不再起作用。 For instance you cannot use (semantic-load-enable-gaudy-code-helpers) to enable the useful features. 例如,您不能使用(semantic-load-enable-gaudy-code-helpers)来启用有用的功能。

TODO: please explain what code you need to load the most useful IDE tools provided by CEDET TODO:请说明加载CEDET提供的最有用的IDE工具所需的代码

I got a basic configuration to work with the following in my .emacs: 我有一个基本配置来处理我的.emacs中的以下内容:

 (global-ede-mode 1) (require 'semantic/sb) (semantic-mode 1) 
  • Q1: Are CEDET and ECB now bundled with Emacs? Q1: CEDET和ECB现在是否与Emacs捆绑在一起? If so, why is there a separate Sourceforge project for it? 如果是这样,为什么有一个单独的Sourceforge项目呢?
  • Q2: How can I enable CEDET and ECB in Emacs 24.2? Q2:如何在Emacs 24.2中启用CEDET和ECB? Do I still need to download the source code from the respective websites and install them separately? 我是否仍需要从各自的网站下载源代码并单独安装?

You need to take into account several things: 你需要考虑几件事:

  • CEDET is bundled with GNU Emacs 24.2, but it's slightly outdated... CEDET 1.1 or CEDET from bzr is better from functional point of view. CEDET与GNU Emacs 24.2捆绑在一起,但它稍微过时......从功能的角度来看,bzr的CEDET 1.1或CEDET更好。 I hope, that Emacs 24.3 will have fresh version of CEDET 我希望,Emacs 24.3将拥有CEDET的新版本
  • I have a fork of ECB , that works with fresh CEDET (1.1 or bzr) & with CEDET bundled with Emacs - but you need to install it manually 我有一个ECB分支 ,可以使用新的CEDET(1.1或bzr)和与Emacs捆绑的CEDET - 但是你需要手动安装它
  • You can enable CEDET bundled with GNU Emacs or CEDET from bzr with following config , for CEDET 1.1 you can use following config . 您可以使用以下配置从bzr启用与GNU Emacs或CEDET捆绑的CEDET,对于CEDET 1.1,您可以使用以下配置

PS I'll try to answer to more questions here, or you can write to me directly via e-mail PS我会在这里回答更多问题,或者你可以直接通过电子邮件给我写信

Q1: Yes and no: CEDET is bundled, but ECB is not. Q1:是和否:CEDET是捆绑的,但欧洲央行不是。 While CEDET is bundled, the main development keeps happening outside of Emacs's repository for partly historical and partly technical reasons. 虽然CEDET捆绑在一起,但由于部分历史和部分技术原因,主要开发仍在Emacs的存储库之外发生。

Q2: (semantic-mode 1) and (global-ede-mode 1) should be sufficient to enable CEDET (no need to (require 'semantic/sb) ). Q2 :( (semantic-mode 1)(global-ede-mode 1)应该足以启用CEDET(不需要(require 'semantic/sb) )。 As for ECB, since it's not bundled, ... 至于欧洲央行,因为它没有捆绑,......

Emacs Code Browser rocks, but it took me a few days to figure out how to set it up to my satisfaction on my current Emacs 24.5.1. Emacs代码浏览器晃动,但我花了几天时间才弄清楚如何在目前的Emacs 24.5.1上将其设置为令我满意。 Hopefully, the following instructions will help make it more popular going forwards. 希望以下说明有助于使其更受欢迎。

Step 1: on Ubuntu: install texinfo via: 第1步:在Ubuntu上:通过以下方式安装texinfo:

sudo apt-get install texinfo

This actually installs makeinfo which is needed in order to install ecb. 这实际上安装了makeinfo,这是安装ecb所必需的。 Macs may already have makeinfo installed -- I don't think I had to install texinfo on my Mac. Mac可能已经安装了makeinfo - 我认为我不必在Mac上安装texinfo。

Step 2: Use el-get to install ecb. 第2步:使用el-get安装ecb。 Do a web search on 'el-get emacs' to find out more about el-get. 在'el-get emacs'上进行网络搜索,了解有关el-get的更多信息。 The advantage of using el-get is that it will automagically take care of adding ecb to your emacs load path. 使用el-get的优点是它会自动处理将ecb添加到emacs加载路径。

BTW, it seems to take a good 15 or so minutes to install ecb using el-get. 顺便说一下,使用el-get安装ecb似乎需要15分钟左右的时间。 Be patient and don't exit emacs if it tells you it has an active process running.. 请耐心等待,如果它告诉您正在运行活动进程,请不要退出emacs。

When el-get has finished, it will show a message : ecb has been installed successfully (or something to that effect) 当el-get完成后,它会显示一条消息:ecb已成功安装(或其他相关内容)

Step 3: Add the following to your emacs init file (either ~/.emacs.d/init.el or ~/.emacs -- make the edits to whichever of these two files is already present) 步骤3:将以下内容添加到您的emacs init文件中(〜/ .emacs.d / init.el或〜/ .emacs - 对已经存在的这两个文件中的任何一个进行编辑)

;; start of ecb configuration/customization:
;;
(require 'ecb)


(setq stack-trace-on-error t)
(setq ecb-version-check nil)
(setq ecb-layout-name "left15")
(setq ecb-tip-of-the-day nil)
(setq ecb-primary-secondary-mouse-buttons 'mouse-1--mouse-2)


(setq ecb-source-file-regexps
  '((".*" .     (("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(pyc\\|elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)")
             ("^\\.\\(emacs\\|gnus\\)$")))))



;;
;; disable global semantic idle scheduler.
;; it doesn't really seem to work all that well in automatically
;; reparsing buffers and it's actually intrusive when i'm typing:

(add-hook 'ecb-activate-hook
          '(lambda()
             (semantic-mode t)
             (ecb-maximize-window-methods)
             (setq global-semantic-idle-scheduler-mode nil)
             ))



(add-hook 'after-save-hook
          '(lambda()
             (when (bound-and-true-p ecb-minor-mode)
               ;; this is to get the methods buffer to refresh correctly.
               ;; semantic idle mode refresh doesn't seem to work all that     well.
               (run-at-time 1 nil 'semantic-force-refresh)
               )
             ))


(set-face-attribute 'ecb-default-general-face nil
                    :inherit 'default)

(set-face-attribute 'ecb-default-highlight-face nil
                    :background "#464646")

(set-face-attribute 'ecb-tag-header-face nil
                    :background "#464646")
;;
;; end of ecb configuration/customization

Step 4: Restart emacs, open a python source file (as a test example) in emacs and then type: Mx ecb-activate 步骤4:重新启动emacs,在emacs中打开python源文件(作为测试示例),然后键入:Mx ecb-activate

If you get a methods list window on the left and the source file view on the right, you've got it working. 如果您在左侧获得方法列表窗口并在右侧获得源文件视图,那么您可以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM