0

I am using Spacemacs but I think this shouldn't matter for this question.

For some reason I am not able to find the place where Emacs is storing the files to reopen after launch.
I've greped for a file it always loads and found some instances of that path in the .emacs.d/.cache folder. I've deleted these files. Didn't work.
I even deleted the entire .cache folder. Even then the same files are reloaded after startup.

Where is Emacs saving these locations so I can delete them?

I have also not found a way to overwrite the state by deleting all buffers before quitting Emacs.

Edit for clarification:
All files being reloaded were .org files.

2
  • Please clarify the question (and maybe your answer), to mention what kinds of file you're saying Emacs is saving, and when it is doing that. Your answer suggests this is about Org mode, so I've added that tag - remove it if I misunderstand that, or mention Org in your question, if it's relevant.
    – Drew
    Mar 21 at 18:34
  • Do you mean the backup files? They are usually saved in .emacs.d/auto-save-list/ (unless you changed that in your .emacs.
    – rs028
    Mar 22 at 11:44
0

I think it would normally be enough to delete the .cache folder.

In my instance Emacs loads all the org-agenda-files I have defined in my config. That was the "problem".

Realizing the reopened files were .org files gave me the hint that it had to do with the org agenda.

Though I don't load my agenda directly, it could very well be that some config in my init loads it.
I would have to investigate the root cause further but for now I at least understand it is me that is loading the files and not some desktop save or persistent workspace gone awry.

1
  • Are you opening up your agenda from your init file? That's what I do and that's why the agenda files get opened. But note thate emacs does not do that on its own: it's only when you've enabled something that (run the agenda, restore the desktop, whatever). In all these cases, starting with emacs -q does not load your init file and therefore will not open any files: that's a useful way to check that it's not emacs doing something, it's you (through whatever you've added to your init file).
    – NickD
    Mar 21 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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