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.67k stars 4.89k forks source link

Proposal: configurable cache directory #4018

Open puzl opened 8 years ago

puzl commented 8 years ago

I like to keep my .emacs.d in my home directory which is NFS mounted, but I'd like to use a local cache for speed reasons. Would it be possible to have an override for the cache directory. I don't mind having to specify it as some custom elisp in a startup script, but obviously it would be cleaner in the .spacemacs file.

duerrp commented 8 years ago

I assume you could override spacemacs-cache-directory if you do it in your init.el before (load-file (concat user-emacs-directory "core/core-load-paths.el")) is called. As far as I remember defconst is just a hint, not a real restriction in elisp.

puzl commented 8 years ago

I don't want to go editing the init.el in my .emacs.d

syl20bnr commented 8 years ago

Did you try to set it in the user-init function of the dotfile ?

StreakyCobra commented 8 years ago

@syl20bnr I tried, it works for most of them, but not all cached files. Probably there are some cache paths that are defined before user-init is called.

syl20bnr commented 8 years ago

This is surprising, the call to init and init-user is made pretty early, I'll look into it.

StreakyCobra commented 8 years ago

( or maybe I tested, again, something in the wrong way :sweat_smile: )

puzl commented 8 years ago

So I've moved my entire .emacs.d to the local disk, removed my $HOME/.emacs.d.

Everything seems to work fine but I do get this odd error rigt after initialisation

Loading c:/cygwin-1.7.31-3/home/hjw/.emacs.d/layers/shell/packages.el (source)...done Loading c:/cygwin-1.7.31-3/home/hjw/.emacs.d/layers/syntax-checking/packages.el (source)...done Loading //irlcor-fil01/home/hjw/.rcm/spacemacs/hjw/packages.el (source)...done Loading //irlcor-fil01/home/hjw/.rcm/spacemacs/hjw/extensions.el (source)...done The variable 'evil-jumper-file' is obsolete. Persistence is done with 'savehist' now. Loading c:/cygwin-1.7.31-3/home/hjw/.emacs.d/init.el (source)...done Loading c:/cygwin-1.7.31-3/home/hjw/.emacs.d/.cache/recentf...done Start checking for new version... Open the quickhelp. error in process sentinel: async-handle-result: Cannot open load file: no such file or directory, //irlcor-fil01/home/hjw/.emacs.d/core/core-load-paths.el error in process sentinel: Cannot open load file: no such file or directory, //irlcor-fil01/home/hjw/.emacs.d/core/core-load-paths.el

I invoke emacs with

runemacs.exe -q --load=~/.rcm/spacemacs/init-local.el

init-local.el looks like:

(load-file (expand-file-name "~/.rcm/spacemacs/hjw/cygwin-emacs.el")) (load-file (expand-file-name "~/.rcm/spacemacs/hjw/cygwin-mount.el")) (cygwin-mount-activate)

(setq-default user-init-file "/home/hjw/.emacs.d/init.el") (setq-default user-emacs-directory "/home/hjw/.emacs.d/") (load user-init-file)

I have to force the cygwinification before loading spacemacs-core because quelpa doesn't work on cygwin properly.

github-actions[bot] commented 4 years ago

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!

pataquets commented 2 years ago

15499 might be of interest