ぼくは emacs でメモをとるとき「この情報はこのテキストファイルに書いてあるよ」ってことを示すために,こんな風に書くことがあります.
ほげほげ File: ./memo.txt
ポイントが "./memo.txt" の上にあるときとか,サッと ./memo.txt を開きたいなーとか思ったので,とりあえず作った.
(defun open-file-at-point() "Open filename, guessing from text at point" (interactive) (let ((filename (thing-at-point 'filename))) (when filename (find-file filename))))
そのものズバリな名前の find-file-at-point っていう関数が ffap.el には書いてあるんだけど,結構読むのが大変な感じだったので,クソ単純なのを作ってみました.Carbon Emacs に(たぶん)デフォで入っている thingatpt.el の中の thing-at-point なんて便利なもんを見つけたので,とりあえずそれ使った.