Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't put settings in ~/.emacs/.cache #7818

Open
Stebalien opened this issue Nov 23, 2016 · 9 comments
Open

Don't put settings in ~/.emacs/.cache #7818

Stebalien opened this issue Nov 23, 2016 · 9 comments
Assignees

Comments

@Stebalien
Copy link
Contributor

Stebalien commented Nov 23, 2016

The name "cache" implies that deleting it should, at worst, slow things down a bit but that's not the case. Bookmarks, custom settings, etc should go into some form of config directory.

@syl20bnr
Copy link
Owner

I moved to an advice so deleting the file should have no impact whatsoever now.
commit 6ae2fbc

@syl20bnr
Copy link
Owner

That's a good point, can we have here an exhaustive list of all the persistent stuff a user would want to keep ?
Maybe we could put them in private/saved folder or something like that.

@Stebalien
Copy link
Contributor Author

Files with explicit (user-specified) content:

  • .cache/bookmarks
  • .cache/abbrev_defs

Auto-generated:

  • .cache/rcirc-logs
  • .cache/erc-logs
  • .cache/projectile-bookmarks.eld (?)
  • .cache/spacemacs-buffer.el
  • .cache/last-version-check
  • .cache/layouts/
  • .cache/games/

Personally, I'd put the autogenerated files in one directory (private/state(data?)?) and the others in another directory (private/settings).

This would also be a nice incremental step towards fixing #3589.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@Stebalien
Copy link
Contributor Author

This is still an issue.

@JAremko JAremko added updated This issue has been updated since becoming stale and removed stale marked as a stale issue/pr (usually by a bot) updated This issue has been updated since becoming stale labels May 26, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Oct 17, 2021
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Oct 18, 2021
Copy link

github-actions bot commented May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 1, 2024
@pataquets
Copy link
Contributor

pataquets commented May 6, 2024

I'd like to just have a single variable which I could configure at some point soon enough which was honored as the data directory for all Spacemacs' layers, even going as far as including this in the dev docs as a (recommended|mandatory) layer development best practice. If I get some advice I might even happily take a stab a it, as my init.el would greatly benefit from offloading these custom config to a Spacemac's built-in, standard functionality. Some smartness could even be baked-in for keeping compatibility, such as automatically using ~/.spacemacs.d/ if present, just to name one.
Such helper functions or framework could be even made available to help users configure additional packages easily.

As an example, I prefer having a lean ~/.emacs.d dir which I can safely delete without data loss for even reinstalling from scratch when troubleshooting, and keep all my customizations on ~/.spacemacs.d/. I even have specific host-named subdirs for things I like to keep different from machine to machine (e.g. work/home PC gnus). Not just init.el but all the configuration, history files, abbrevs, etc. This way, I only care to backup/sync just a small set of files/dirs, instead of sorting out which ones on ~/.emacs.d/ I have to pick.

As an non-comprehensive variable list, here are my most important setq file/dir customizations:

  • abbrev-file-name
  • persistent-scratch-save-file
  • spacemacs-private-directory
  • gnus-* (most of them, ie. not cache)
  • bookmark-default-file
  • bm-repository-file (from bm layer)
  • tramp-persistency-file-name
  • projectile-known-projects-file
  • persp-save-dir
  • recentf-save-file
  • savehist-file
  • save-place-file
  • helm-adaptive-history-file
  • dired-recent
  • desktop-dirname
  • desktop-path

They might be incomplete/not-required/too-many/etc due to me overlooking something, other related vars, recent changes or just my lack of knowledge. Some of them were added long ago and were much of trial-and-error-until-just-worked. See my past self struggling with it on #15499 😄.

@syl20bnr : if more planning/discussion/design is done/needed to gather usage cases and examples and ease peer reviewing, feel free to point to or ask for it. I have done some partial write-up about the rationale and usability issues, but felt it too much/offtopic for this issue. We could also collect and track related issues there.

@github-actions github-actions bot removed the stale marked as a stale issue/pr (usually by a bot) label May 6, 2024
@pataquets
Copy link
Contributor

Dropping potentially useful package here, both in case somebody isn't aware of it and for completeness, although it's fairly popular:
emacscollective/no-littering: Help keeping ~/.config/emacs clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants