syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

Custom option `desktop-save-mode t` now loads `desktop` automatically upon launch (new behavior) #16292

Closed stradicat closed 4 months ago

stradicat commented 4 months ago

Description :octocat:

For the past 5 years, I've had the custom option '(desktop-save-mode t) set under (custom-set-variables) at the end section of my dotfile. What it did was offering to save my current desktop settings: opened files, buffer order, etc. to a desktop config file under ~/.emacs.d/.cache, so upon launching Emacs again (not in daemon mode), I would have the choise of starting fresh and opening a single file for editing, or pressing SPC SPC and selecting desktop-read to bring up my previously saved session configuration.

However, after the last develop update (that fixed the helm-descbinds vs which-key problem), this behavior has been altered: Now, the custom option desktop-save-mode t loads desktop automatically upon launching (new behavior, instead of requiring me to SPC SPC desktop-read). This is undesired, as one no longer has the choice of either freshly starting up Emacs to edit a couple of files or continuing a workflow.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: After starting Emacs again, after having saved the desktop, this desktop session will be automatically restored, without having the choice of restoring it at will. Disabling '(desktop-save-mode t) is a workaround, but defeats the purpose of automatically saving the desktop.

Expected behaviour: :heart: :smile: Emacs starts as a fresh launch greeting you with the Spacemacs buffer, without any files open, giving you the choice of opening a couple of files for a quick edit and save, asking you if you want to save your desktop or not. You also have the chance of SPC SPC desktop-read to restore your previous session, as usual.

System Info :computer:

stradicat commented 4 months ago

Closing. Cause: PEBCAK

(malformed dotfile, missing (defun dotspacemacs/emacs-custom-settings () header above (custom-set-variables), for some reason.)