Jun 30, 2009

涨价

发改委涨价前与车主的绝密对话——发改委:孙子,我油价要涨了。车主:嗯,知道了,爷,啥时候?发改委:10。车主:10?10什么?10天?10小时?发改委:9,8,7 ……车主:你大爷的。

Jun 23, 2009

Jun 22, 2009

How to automatically generate file header using Emacs

When we use emacs to write text files, file headers containing specific information, such as the author, the date of creation, the data of update, can be generated automatically. The following are steps to make it work.

1. Download the file header2.el. from http://www.emacswiki.org/emacs/header2.el

2. Add the following to your .emacs file, which you can find in the $home directory.
(add-to-list 'load-path' "here is the directory where you store the header2.el")

3. Then put the following to your .emacs file:
(add-hook 'write-file-hooks 'auto-update-file-header)
(add-hook 'emacs-lisp-mode-hook 'auto-make-header)
(add-hook 'c-mode-common-hook 'auto-make-header)
(add-hook 'tex-mode-hook 'auto-make-header)

4. To make the header personal, you can change the header2.el by comment or uncomment different variables.