2008-09-23
■[emacs]使い捨てコード用のファイルを開く
思い付いたら即コードを書けるように、しかし*scratch*や/tmp以下に書いてもすぐに消えてしまうのでもったいない。どうせだったら後学のために保存しておこうと思った。
http://read-eval-print.blogspot.com/2008/09/emacs.htmlより触発された。ほとんどぱくり。read-stringで拡張子を入力できるようにした。思ったより便利そうだ。さよなら*scratch*バッファ〜
(defun open-junk-file () (interactive) (let* ((file (expand-file-name (format-time-string "%Y/%m/%Y-%m-%d-%H%M%S." (current-time)) "~/memo/junk/")) (dir (file-name-directory file))) (make-directory dir t) (find-file-other-window (read-string "Junk Code: " file))))
トラックバック - http://d.hatena.ne.jp/rubikitch/20080923/1222104034
リンク元
- 25 http://www.rubyist.net/~kazu/samidare/
- 14 http://www.st.ryukoku.ac.jp/~kjm/security/memo/
- 13 http://reader.livedoor.com/reader/
- 12 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=Op&q=anything+refe2&btnG=検索&lr=lang_ja
- 6 http://ezsch.ezweb.ne.jp/search/ezGoogleMain.php?query=疲れがとれない&start-index=4&adpage=3&mode=02
- 5 http://b.hatena.ne.jp/entrylist?sort=hot&of=100&threshold=5
- 5 http://blogs.dion.ne.jp/moe_moe/archives/7481321.html
- 5 http://toolbar.google.co.jp/command?close_browser
- 4 http://b.hatena.ne.jp/t/emacs
- 4 http://fastladder.com/reader/
