gabrielelanaro/emacs-for-python — pull request #92 by squarepegsys (2012-06-15 19:39:00+00:00)
Title: Switch desktop directory when switching virttualenvs

Sorry for getting both commits in this one -- only 923e00a6 pertains to this, but github will only let me use master. :(

I found this little ditty here:
http://www.memonic.com/user/pneff/folder/emacs/id/1tCJ

This saves your Emacs buffers in your virtualenv directory. When you type "workon " it will restore those buffers in your Emacs. This gives it a project-like feel.

For this to work, you need the attached patch and the following in `~/.virtualenvs/postactivate`:

/path/to/emacsclient -e "(workon-postactivate \"$VIRTUAL_ENV\")">/dev/null