autoscratch - solve the *scratch* buffer problem
This is not the behavior I expect from a scratch buffer, so I modified autoscratch-mode to reset the default-directory (if enabled) to $HOME.Update 2017-07-17:You can complete this scratch buffer setup with the great persistent-scratch.el mode. Here’s my config for it: (require ‘persistent-scratch) (setq persistent-scratch-save-file (expand-file-name “scratches.el” user-init-dir)) (persistent-scratch-setup-default)
(defun tvd-autoscratch-p () “Return non-nil if the current buffer is a scratch buffer” (string-match “scratch*" (buffer-name)))
(setq persistent-scratch-scratch-buffer-p-function ‘tvd-autoscratch-p)