Closed cpaulik closed 8 years ago
Try this:
(with-eval-after-load "persp-mode"
(add-to-list 'persp-save-buffer-functions
#'(lambda (b)
(when (eq 'dired-mode (buffer-local-value 'major-mode b))
`(def-buffer ,(buffer-name b)
,(buffer-local-value 'default-directory b)
,(buffer-local-value 'major-mode b))))))
Thanks, that works. Should this be default or should I keep it in my own config?
Should this be default or should I keep it in my own config?
I think it should be(and so it will be) a part of the persp-mode.
Now it's in the persp-mode 59ab217948808b486e2983d1b68235d999f90f39.
When doing
persp-save-state-to-file
dired buffers are stored as e.g.(def-buffer "cp" nil dired-mode)
which does not load them correctly. Replacing this by(def-buffer "cp" "/home/cp" dired-mode)
makes it work.This is in spacemacs with persp-mode-20160425.2309