2

I started to use emacs a few days ago and still getting the hang of it.

desktop-save-mode is really handy at times as I don't have to reopen all the files that I had already opened in my previous session. But, I wouldn't want emacs to remember the open buffers every time I quit a session. So, is there a way to make emacs prompt to ask yes or no to invoke desktop-save-mode before quitting ?

Cheers

3

My answer at https://stackoverflow.com/a/4485083/324105 might be of interest (even though this is almost the opposite to what you actually asked for).

With the custom my-desktop command, I only load my desktop file when I want to do that. Once loaded, I do automatically save it (but to my mind, if I loaded a desktop file, why wouldn't I want to save it?)

The point being that if you start Emacs and don't want to load and save your desktop file, then you simply don't call my-desktop, and no desktop file is written when you exit.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.