My Emacs configuration

Features

  • support c++/python/perl/ruby-on-rails/javascript
  • eim (Chinese Pinying IME for emacs)
  • org2blog (post wordpress blog by org-mode)

Install

git clone git@github.com:redguardtoo/emacs.d.git ~/.emacs.d;

Some plugins need be compiled for better performance (OPTIONAL)

  • cedet,ecb,emacs-w3m,org-mode,nxml-mode,mmm-mode,auto-complete
cd ~/.emacs.d/site-lisp;make -C cedet;make -C ecb;make -C org-mode;make -C nxml-mode;make -C auto-complete
cd ~/.emacs.d/site-lisp/emacs-w3m;autoconf;./configure;make;sudo make install-info-en;
cd ~/.emacs.d/site-lisp/mmm-mode;./autogen.sh;./configure;make;sudo make install-info;

sh

  • rinari (install info only)
cd ~/.emacs.d/site-lisp/rinari;rake doc:make_info;sudo cp doc/rinari.info /usr/share/info;sudo install-info /usr/share/info/rinari.info /usr/share/info/dir
  • eim
cd ~/.emacs.d/site-lisp/eim;emacs -batch -f batch-byte-compile *.el;

有用的emacs快捷键

  • 列编辑C-x r t yourstring RET (参见How to do select column then do editing in GNU Emacs ?)
  • 记录当前位置到register中 C-r SPC (需安装better-registers.el,且要注释掉其中对快捷键’C-x r’的占用)
  • 跳转至某register, C-j (需better-registers.el)
  • Save frame configuration to register, C-r f (要求同上)
  • Comment current line, M-; (需qiang-comment-dwim-line)
  • Vist the next/previous error message, M-g M-n/M-p
  • find-tag/pop-tag-mark, M-./M-*

用org2blog+emacs发表博客

我有兴趣开始写博,完全是因为我开始爱上emacs,以至有人说emacs的插件org2blog使的写博客非常高效,我就想试试.

我(计划)把所有的文章都放在一个org文件里(BTW,我爱死org-mode了,它本来是做计划管理和日志的,但事实上是无所不能),然后post sub-tree:

M-x org2blog/wp-post-subtree

要正常使用org2blog,必需安装最新的org-mode(我的版本为7.5,`M-x org-version’检查当前版本,警告,7.5不可靠,应升级到最新版本,我用从git服务器取得”d6aba4db”版本).

emacs(版本23.3.1)自带的org-mode太老,和最新的org2blog(<2011-04-12 二>的版本)不兼容.

org2blog安装步骤在上文的链接里都有,也可以参看Blogging with org2blog.

org-mode安装步骤见官方文档.