【问题标题】:Ctags integration with CEDET/semanticCtags 与 CEDET/语义的集成
【发布时间】:2012-08-15 03:27:16
【问题描述】:

我已经使用http://cedet.sourceforge.net/ 中的信息和 Alex Ott 的文章 (http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html) 使用 CEDET 1.1 设置了我的 Emacs(v 23.3)

我已经解决了与我的 init.el 文件相关的大部分问题。

现在解决问题。我自己构建 TAGS,所以我的项目根目录中有一个 TAGS 文件。 但是语义似乎不想使用该文件和 barfs 并出现以下错误:

Source file `/users/lshvarts/.emacs.d/cedet-1.1/semantic/ctags/semantic-ectag-util.el' newer than byte-compiled file
Exuberent CTags not found. Found ctags that comes with Emacs
semantic-ectag-test-version: Exuberent CTags not found. Use M-x semantic-ectag-version RET
Exuberent CTags not found. Use M-x semantic-ectag-version RET
Exuberent CTags not found. Found ctags that comes with Emacs

我拥有的 Etags 可能不是最新版本,但我很困惑为什么它明确拒绝使用它。
boxy:92> etags --version
etags (GNU Emacs 20.7)
Copyright (C) 1996 Free Software Foundation, Inc. and Ken Arnold
This program is distributed under the same terms as Emacs
boxy:93>

感谢任何帮助/见解。

【问题讨论】:

    标签: emacs cscope cedet


    【解决方案1】:

    您不需要etags,而是丰富的CTags!您可以从您的 linux/mac 存储库(通常名称为 ectags,或在 Debian 上为 exuberant-ctags)或从 it's site 安装它。

    【讨论】:

    • 这太糟糕了——我的开发机器上没有 root 访问权限,也没有 etags。也许我可以和 IT 人员谈谈一些道理。
    • 为什么不将它安装到您的主目录中,并将semantic-ectags-program 变量(通过M-x customize-variable)设置为新位置?它应该可以正常工作
    • 问题在于解开所有的依赖关系——机器上的内核版本也很旧。我试过一次,在那个阶段就放弃了。
    • 为什么不从源代码构建 etags?我认为它应该在旧内核上编译
    【解决方案2】:

    这与您遇到的问题并不完全相关,但在升级到 ubuntu 12.04 后,我遇到了同样的错误(找不到 Exuberent CTags。使用 M-x semantic-ectag-version RET)。

    问题在于 ctags-exuberant --version 返回了一个非数字版本:

    Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
      Compiled: Nov  9 2011, 17:40:39
      Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
      Optional compiled features: +wildcards, +regex
    

    只需替换正则表达式

    "Exuberant Ctags \\([0-9.]+\\),"
    

    "Exuberant Ctags \\([0-9.]+\\)[~,]"
    

    在semantic-ectag-version(在semantic-ectag-util.el)中并重新编译文件。

    【讨论】:

    • 您使用的是哪个版本的 CEDET?我相信,这已在 1.1 版本中修复...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-04
    • 1970-01-01
    • 2014-08-08
    • 2012-10-09
    • 2011-11-28
    • 2013-02-24
    • 1970-01-01
    相关资源
    最近更新 更多