Skip navigation.

云舒云卷

----我醉欲眠卿且去,明朝有意抱琴来

Posts tagged with "emacs"

Toggle ecb in emacs

,

不知道最新版是否已经可以使用一个键绑定来开关ecb,我的是一年前的版本,没有找到方法。最近写了一点点代码来做这件事:
(defun toggle-ecb-active()
  "Toggle ecb active and deactive"
  (interactive)
  (if ecb-minor-mode
      (ecb-deactivate)
    (ecb-activate))
  )

(global-set-key [f6] 'toggle-ecb-active)

My .emacs

Failed to upload the .emacs or emacs files in 'Files' page directly, I upload the file here as a backup.

emacs

install ecb for ntemacs

, , ,

我只想简单说一下。

  1. 去sourceforge下载ecb和cedet,放在emacs/site-lisp目录下
  2. 在.emacs中加入
    (load-file "f:/gnu/emacs/site-lisp/cedet-1.0pre4/common/cedet.el")
    ;; (load-file "f:/gnu/emacs/site-lisp/cedet-1.0pre4/common/cedet.elc")
    (setq semantic-load-turn-everything-on t)
    (setq semantic-idle-scheduler-idle-time 432000)
    
    (load-file "f:/gnu/emacs/site-lisp/ecb-2.32/ecb.el")
    ;; (load-file "f:/gnu/emacs/site-lisp/ecb-2.32/ecb.elc")
    (require 'ecb)
    
    (setq ecb-auto-compatibility-check nil)
    
    (global-set-key [f6] 'ecb-activate)
    (global-set-key [M-f6] 'ecb-deactivate)
    

  3. 编译cedet的lisp代码。我是在DIRED中使用m和B手动编译的。
  4. 使用M-x ecb-byte-compile编译ecb的lisp代码 (一个一个手动编译会出错的: (tree-node-child-p))
  5. 把上面的load-file换成编译好的字节码文件


其中(setq ecb-auto-compatibility-check nil)禁用了兼容性检查,在启动的时候,就不会弹出要求配置tar等工具的信息。

头文件冲突

,

前几天编译emacs-unicode2的时候,在lib-src中发生错误,定义在/src/config.h中的值总是找不到,后来才在makefile中发现这样的设置:
LOCAL_FLAGS= -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
  -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
  -I../src

而在'../nt/inc'中有我添加的xpm的文件,其中就包含'config.h'。所以在源代码中遇到
#include <config.h>

这样的语句的时候,不会引用到在'../src/'下的正确的'config.h',问题就这样产生了。

而这样的问题,没有一个完美的解决方法。也许把'config.h'改成'emacs_config.h'会是一个简单的解决方法吧。

Opera Newgroup Reader

, , ,

使用opera订阅了osr的新闻组一段时间,终于还是删除了。用过emacs+gnus之后,opera的新闻组功能实在是太弱了。

gnus的^可以显示当前文章的上一级(fetch parent of article),让整个阅读非常方便、高效。

算起来,opera在M2方面,除了一直在更新IMAP之外,新闻组和邮件的功能已经很久没有更新了。要不是因为我的opera是一直开着的,我也不会选择M2。