1. M-x shell RET 2. C-d (send EOF to exit shell) 3. C-x C-s (save to a file) 4. M-x desktop-save-in-desktop-dir RET 5. Restart Emacs Loading the desktop file fails because the file buffer is saved with shell-mode, but on reading shell-mode fails while trying to eval (process-command (get-buffer-process (current-buffer))) where get-buffer-process returns nil that is unacceptable as an arg to process-command. Possible solutions: 1. Skip and don't save buffers with shell-mode by adding it to the default value of desktop-modes-not-to-save 2. Still save but properly handle shell buffers on reading, i.e. fix shell-mode to check for nil values such as in this patch: