My calendars

我有好几个日历。分类如下:

分别使用3个日历有个不好的地方,不方便查看,想知道自己今天需要做什么,得查看3个地方。

目前的解决方案是使用Thunderbird + Lightning做一个集成的查看终端,RTM提供iCalendar订阅方式,org mode也可以发布为iCalendar文件,所以只要在Lightning里面订阅就可以了。MS Outlook稍微麻烦一点,所幸Google提供了Calendar Sync,可以实现MS Outlook和Google Calendar的双向同步。我只用到其中的单向同步功能,把MS Outlook同步到Google Calendar上,这样就可以用Lightning订阅了。

Google还有一个Mobile Sync,可以把Google Calendar和Blackberry Calendar同步,有了这个东西,我就可以很方便地在家里查看第二天的工作安排了。需要注意的是Google Mobile Sync使用cmnet,而不是cmwap。

hippie-expand

直到前两天才通过Most useful Emacs features – Stack Overflow知道hippie-expand这么好用的东西,然后抄了一段Alex Schroeder的配置,也就是根据可能性重新排列一下补全的规则,如将补全文件名放到链表的后面。另外还从wiki页上抄了一段用tag做补全的配置。

虽然补全文件或路径很少用到,但是在添加load-path的时候就很方便了,感觉就像在mini-buffer里输入路径一样。当然用得最多的还是在写程序的时候了。下面是我的配置:

(global-set-key (kbd "M-/") 'hippie-expand)

(defun he-tag-beg ()
  (let ((p
         (save-excursion
           (backward-word 1)
           (point))))
    p))

(defun try-expand-tag (old)
  (unless  old
    (he-init-string (he-tag-beg) (point))
    (setq he-expand-list (sort
                          (all-completions he-search-string 'tags-complete-tag) 'string-lessp)))
  (while (and he-expand-list
              (he-string-member (car he-expand-list) he-tried-table))
              (setq he-expand-list (cdr he-expand-list)))
  (if (null he-expand-list)
      (progn
        (when old (he-reset-string))
        ())
    (he-substitute-string (car he-expand-list))
    (setq he-expand-list (cdr he-expand-list))
    t))

(setq hippie-expand-try-functions-list
      '(try-expand-all-abbrevs try-expand-dabbrev
 try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill
 try-complete-lisp-symbol-partially try-complete-lisp-symbol
 try-complete-file-name-partially try-complete-file-name try-expand-tag))