Send patches from emacs to server. Fix how we store bufs. Minor cleanup