anything.elでsourceを選択するときにウィンドウの先頭から表示するようにしてみた
anything.elは便利だ。anything-next-source/anything-previous-source(←と→)で次/前のsourceを選択できるが、そのときにウィンドウ中央から表示されるのがうざい。sourceを切り換えた時点で前のsourceは見ないのだから次/前のsourceをウィンドウ先頭から表示してほしい。そこでこのadviceをどうぞ。これで快適になる。
(defadvice anything-move-selection (after screen-top activate)
"Display at the top of window when moving selection to the prev/next source."
(if (eq unit 'source)
(save-selected-window
(select-window (get-buffer-window anything-buffer 'visible))
(set-window-start (selected-window)
(save-excursion (forward-line -1) (point))))))