+ -
当前位置:首页 → 问答吧 → emacs的ecb函数列表窗口无显示

emacs的ecb函数列表窗口无显示

时间:2010-05-25

来源:互联网

各位好,我的archlinux中,emacs的ecb模式启动后,打开C语言源码,在左边的函数名列表(即类,方法名列表)的窗口中没有任何显示,请问一下该如何着手解决这个问题呢? 我不知道问题的原因出在哪里。

ecb的左边默认窗口,总共4个部分依次是: (1)目录列表,(2)文件列表,(3)类(方法)名列表,(4)历史, 就是第(3)个没有任何显示,其他小窗口都正常

我已经做的实验包括如下:
(1)由于这个问题比较特殊,google也没有找到线索
(2)已经重新安装几次emacs和ecb,cedet了,问题依旧
(3)我用同样的.emacs配置文件,在debian下安装的这些咚咚,ecb窗口的函数名列表中是可以显示出来的。

先谢谢各位啦

作者: sy5tem   发布时间: 2010-05-25

原来是采用pacman安装的方式

刚才又try了通过源码编译安装的方式,问题依旧, methods-window中还是没有任何显示

作者: sy5tem   发布时间: 2010-05-25

估计还是配置文件的问题(.emacs),和程序安装没什么大的关系。我贴个我这边能正常使用的配置,供你参考:

;;------------------------------------------------------------------------------------

;;配置cedet.el插件,设置C/C++环境
;;------------------------------------------------------------------------------------
(add-hook 'texinfo-mode-hook (lambda () (require 'sb-texinfo)))
(load-file "/home/zh/cedet/cedet.el")
;(semantic-load-enable-code-helpers)
(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(define-key-after (lookup-key global-map [menu-bar tools])
[speedbar]
'("Speedbar" .
speedbar-frame-mode)
[calendar])
;;------------------------------------------------------------------------------------

;;配置ecb插件,就是emacs code browser,就是个代码阅览器
;;------------------------------------------------------------------------------------
(add-to-list 'load-path "/usr/share/emacs/site-lisp/ecb")
(require 'ecb)
;;ecb设置
(require 'ecb-autoloads)
(setq ecb-auto-activate t
ecb-tip-of-the-day nil
inhibit-startup-message t
ecb-auto-compatibility-check nil
ecb-version-check nil)

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(display-time-mode t)
'(ecb-layout-window-sizes (quote (("left8" (0.20967741935483872 . 0.27586206896551724) (0.20967741935483872 . 0.2413793103448276) (0.20967741935483872 . 0.27586206896551724) (0.20967741935483872 . 0.1724137931034483)))))
'(ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1))
'(show-paren-mode t)
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

;;scroll other window
(global-set-key (kbd "C-c C-v") 'scroll-other-window)
(global-set-key (kbd "C-c C-b") 'scroll-other-window-down)
;;---------------------------------------------------------------------------------------

作者: usbtopc   发布时间: 2010-05-26

注意:cedet插件,我是直接用的emacs源码所带的,并将emacs源码中的cedet目录拷贝到"/home/zh/cedet",见配置文件上面的描述。(用pacman安装的cedet,我这边貌似无效)

emacs和ecb,我这边是用pacman安装的。

作者: usbtopc   发布时间: 2010-05-26

附个图,供你参考:
上传的图像
emacs.png (184.0 KB, 17 次查看)

作者: usbtopc   发布时间: 2010-05-26

ecb的装入路径用安装时默认的路径:"/usr/share/emacs/site-lisp/ecb"。

祝你顺利!

作者: usbtopc   发布时间: 2010-05-26

把ecb的目录部分换成speedbar显示,就可以了。
配置就一行:
(ecb-use-speedbar-instead-native-tree-buffer (quote dir))

当然,楼上配置也可以,但感觉界面太复杂了(左边一到两个窗口就可以了,如果你是右撇子,放在右侧更顺手吧)。

作者: jobinson99   发布时间: 2010-05-26

或者手动刷新:点击ECB菜单里面的Rebuild methods buffer,一般都没问题的。

作者: usbtopc   发布时间: 2010-05-28

我在Windows里面使用时,也是不能自动加载,手动刷新一下就可以了,可能也和ECB的某个设置有关系,不过它的设置也太多了,呵呵。

作者: usbtopc   发布时间: 2010-05-28