Emacs IPython Notebook
I found a perfect Emacs project ,which is called Emacs IPython Notebook. It can connect to a running IPython notebook server, and work as the IPython notebook do in browser.
Maybe it can provide some ideas for Sage-mode. Without syntax highlight and line number shown in the textarea, it is hard to deal with long code.