« July 2010 | Main | September 2010 »

August 28, 2010

August 20, 2010

August 18, 2010

August 17, 2010

August 16, 2010

http://www.emacswiki.org/emacs/WebloggerMode 是一个 Emacs 包,可以让你用
Emacs 来写 Blog,支持多站点配置。

安装也很简单,可以通过 http://tromey.com/elpa 来安装,也可以去
https://launchpad.net/weblogger-el 下载最新的版本,放到 load-path 中,然
后在配置文件中加上 (require 'weblogger) 就 OK 了。

WebloggerMode 还依赖了 XmlRpc,这个也可以通过 ELPA 来安装。

安装好以后,先 M-x weblogger-setup-weblog 来设置一下 blog 站点,关键是把
"Server Endpoint" 设置对就行了。

下面是一些常见 blog 平台的 Server Endpoint:

Blogger.com: http://www.blogger.com/api
Wordpress: http://BLOG-URL/xmlrpc.php (For http://hexmode.wordpress.com/, this is http://hexmode.wordpress.com/xmlrpc.php. For a blog hosted at http://example.com/weblog/ it would be http://example.com/weblog/xmlrpc.php)
LiveJournal: http://www.livejournal.com/interface/blogger/
OpenWeblog: http://www.openweblog.com/interface/blogger/
MovableType: http://CGI-URL/mt-xmlrpc.cgi. If your CGI root is http://www.example.com/cgi-bin/mt/ then the Server Endpoint would be http://www.example.com/cgi-bin/mt/mt-xmlrpc.cgi.
Drupal: Enable the Blogger API and use http://DRUPAL-URL/xmlrpc.php
(like Wordpress).

把站点配置好以后,就可以用 M-x weblogger-start-entry 来写文章了。

用法如下:

;; C-x C-s -- post-and-publish current buffer to the weblog.
;; Calling weblogger-publish-entry with an prefix argument
;; (i.e. C-u C-x C-s) will prompt for which weblog
;; to use.
;; C-c C-c -- save as draft and bury the buffer.
;; C-c C-n -- post (but not publish) the current entry and
;; load the next entry.
;; C-c C-p -- post (but not publish) the current entry and
;; load the previous entry.
;; C-c C-k -- delete the current entry.
;; M-g -- synchronise weblogger.el's idea of the entries available
;; with the weblog server.
;; C-c C-t m -- edit the main template.
;; C-c C-t a -- edit the Archive Index template
;; C-c C-s s -- Change the server being used.
;; C-c C-s w -- Change the weblog.
;; C-c C-s u -- Change the user (re-login).

August 14, 2010

从 Emacs 23 开始,设置字体就很简单了。

原先用的是 (set-default-font "文泉驿等宽正黑-10") 来设置字体,用 C-h f set-default-font 看了帮助以后才知道这个函数已经在 23.1 版本开始不建议使用了,而是用 set-frame-font 来代替。

set-frame-font 是用来设置当前 frame 的字体,如果用 C-x 5 2 来创建一个新的 frame 之后,我们会发现用 set-frame-font 设置的字体没有生效。

http://www.emacswiki.org/emacs/SetFonts#toc2 这里就介绍了设置全局默认字体的方法,就是 (set-face-attribute 'default nil :font FONT) 其中 FONT 是一个描述字体的字符串,和我们前面提到的 set-default-font 参数一样。

所以再要设置全局的默认字体为文泉驿等宽正黑就是 (set-face-attribute 'default nil :font "文泉驿等宽正黑-10")


August 13, 2010

August 12, 2010

August 11, 2010

August 6, 2010

August 5, 2010

August 3, 2010

August 2, 2010

August 1, 2010

MOMENTOS from Nuno Rocha on Vimeo.



今年一直没怎么关注过电影,前几天还是在 twitter 上看到有人提到 http://github.com/karthick18/inception 这个项目,是以代码的方式来解释电影 Inception 中的思想。再一看介绍,这部电影被定义为“发生在意识结构内的当代动作科幻片”,导演正是拍摄了蝙蝠侠系列电影的克里斯托弗·诺兰。 刚才去verycd搜索了一下,找到个预告片。只是不知道国内会不会引进,引进了会不会删减。 IMDB:http://www.imdb.com/title/tt1375666/ 时光网:http://www.mtime.com/movie/99547/